Way to make "unavailable" to mean "off"?

I have a Yeelight M2 BT Mesh bulb in a lamp that I sometimes like to switch off manually by the lamp’s physical switch. That obviously cuts off power to the smart bulb.

Problem: this makes HA think the bulb is “on” showing as such in Lovelace and potentially screwing up some automations.

Can I make HA presume the bulb is off when it’s unavailable?

Thanks! Please don’t offer tips on turning off the bulb with buttons or otherwise - that’s not what I’m asking.

Not that I’ve done it, but you should be able to trick HA into thinking the light is off by creating a template light and using that in place of the actual light entity.

Help us out, which is it? Unavailable or on?

Even with Template Light. You can’t ‘trick’ HA. It is either ‘on’, ‘off’, or ‘unavailable’.

It sounds like the problem may be in the way the automation is written. Because you can always check state (excluding a bug). And most people only include on or off.

If the BT Mesh bulbs are unavailable, they show as “on” in Lovelace. Connected via Aqara Hub 3rd Gen. It’s probably a quirk of the hub integration.

Automations are a secondary thing here, irrelevant for the original question.

My Sengled lights show as off and greyed out in lovelace when they are powered off.

Does the actual state still say “on” in the states page for the light when it’s got no power to it?

Yes. The power is cut off to the bulb and it’s actual state in HA is “on”.

Does this eventually change to unavailable?

1 Like

No, it doesn’t.

The integration is this.

That was the next question…

I see it’s probably an issue with the integration. Makes sense. I’ll file a bug report with them.

I concur. Normal HA expectation is that it reports accurately.

1 Like

I’m not sure that it is.

My Sengled bulbs take a bit to notice they are unavailable also.

it’s just the nature of the beast since the bulb isn’t sending a status update anymore (because it has no power) the controller has to wait for a reasonable amount of time before it decides the device is dead instead of just asleep or it’s just not needing to send any messages. The last it knew the bulb was “on” and then eventually it decides it’s dead.



it doesn’t?

I thought you posted the post above as the solution?

never mind…

It really doesn’t. And I accidentally touched the Solution button on my phone (and quickly unchecked) :slight_smile:

Edit: right now it’s four hours switched physically off and it’s state is still “on”.

1 Like

That’s what I get for being too quick on the reply button… :wink:

1 Like

well that sucks. definitely something to report.

That’s also what makes the HA community so great! Thanks guys, I’ll ask the dev of the hub integration. It’s just a small annoyance.

1 Like

something new folks?