How to FORCE a state change for an unavailable device?

I have a several (light) devices which are connected to HA via zigbee2mqtt. Those devices are currently unavailable because work at the circuit board.

I’m using powercalc to calculate the power and energy usage which seems to be using the latest state, which is ON. Is there a way to manually override the state from ON to OFF or maybe a trick in powercalc to override power usage to 0 based on last seen timestamp?

Developer tools set state

1 Like

Thanks. I have been using home assistant for many years and never saw this feature :slight_smile: So simple.

You need to be aware that Developer Tools only changes what HA perceives to be the state of an entity - it’s mostly used for testing. If there is an actual change - for example if the lights start working briefly then become unavailable again - your setting will be replaced by the real state. Also, it may not survive a restart.

Might be safer to change the Powercalc configuration temporarily.

If its using mqtt you could use a script or automation to publish to whatever the topic that says ON.

You could also make a binary template sensor that is off when the light is unavailable and use that in Powercalc.

The light was not unavailable, that was the main issue to begin with