Open Draganis opened 2 years ago
Hi, could you check memory consumption? For me, similar is happening when OOM killer take action.
I don't think this is a memory issue
Some off behaviour i saw. If i remove the initial_value: 'off' then after i changed the value of the binary_sensor to on it immediately (3 seconds after) changes back to off
And here is the answer to this topic. I found that the virtual envorinment hast it's own services (if someone has tzhe ability to read, they should do it XD ) I found that setting the binary sensors with virtual.turn_on / virtual.turn_off makes them stay in their position no matter what. Just like this:
service: virtual.turn_on
data:
entity_id: binary_sensor.virtual_schlafzimmer_fenster
Glad you found service call.
As you've guessed you can't set a sensor
or binary_sensor
directly, Home Assistant expects them to change under external influence, hence the new virtual.*
service calls.
This issue is stale because it has been open for 365 days with no activity. This issue will be automatically closed within 28 days if there is no further activity.
I have Tuya WiFi Window Sensors in use. Though they are shown as "not available" when they idle around I made automations for every window sensor to update a virtual binary_sensor on state change. Works like a charm in Winter. In Summer the windows are mostly open (sometimes for days) and now the virtual binary sensors reset theirselves to the initial value from time to time.
HA Version: Home Assistant 2022.8.6 Virtual Components Version: 0.7.7
Virtual sensor:
Automations:
python_scripts/set_state.py :