Just a note.
Check the life on the HEF. Make sure you’re not going to burn it out in your design.
As a suggestion for that, and if you only need to store ON and OFF states, a simplistic but very effective form of wear leaving would be...
If you're not using it for anything else, start with it erased to all 1's.
When the light is supposed to be ON, write the first bit to a zero.
When the light is supposed to be OFF, write the second bit to a zero.
etc for third, fourth bits.
When the device gets a POR or BOR, read the number of consecutive zero bits.
ODD = Light state was ON
EVEN = Light state was OFF
When you reach the end of the HEF (all bits programmed 0's), erase it and start over.
However I expect if you are only writing when the user changes state, 100,000 erase/write cycles is probably enough. Roughly 30 years at 10 power cycles a day.