If you experience this again, it would be worth capturing openhab logs. But as I said, I doubt it is related to this binding.
I managed to reproduce the issue. Here is what’s happening: I turn the TV off, this triggers a ‘shutdown’ mode for the lights in my living room (basically, all but 1 light turn off, and that last light turns off after a couple of minutes). A second or so later, I get an event that the TV turned on, but the TV isn’t actually on at this time (it just looks like it’s off).Tthis didn’t happen during the day, only after it has been on for a couple of hours (this is all consistent with the maintenance mode theory).
As I get a TV on event, my rules switch to ‘TV mode’, which turns the lights back on. My flatmate then presses the ‘off’ button on the wall, which triggers the same ‘shutdown’ mode as when turning off the TV, only it also sends an ‘OFF’ signal to the TV, which for some reason turns the TV back ON if it’s in maintenance mode (it doesn’t do anything after that). This in turn turns all the lights back on. Then, about 4 minutes later when the TV finishes it’s maintenance cycle, I get a ‘TV off’ event once more, and everything shuts down as it’s supposed to.
What I’m going to do for now is add a timer and ignore the ‘OFF’ event for a little while after receiving it.
Addition: after this happened the LG WebOS binding was confused as to the state of the TV, it thought the TV was OFF when in fact it was ON.