M4nu
February 20, 2022, 4:33pm
1
Hello,
Since a recent update (maybe the 2022.2.9), all my binary_sensors
are now unknown. For exemple, I have this one :
alarm:
friendly_name: Alarm
value_template: "{{ 'disarmed' != states('alarm_control_panel.home') }}"
In the developer console I get :
{{ 'disarmed' != states('alarm_control_panel.home') }}
=> false
{{ states('binary_sensor.alarm') }}
=> unknown
Sale issue for all my binary_sensors. Do I need to change something ?
Thank you !
bertreb
February 20, 2022, 4:52pm
2
Binary_sensors got recently the extra state ‘unknown’. After a restart/reload the binary_sensor gets the state ‘unknown’ until the first state update.
rccoleman
(Rob Coleman)
February 20, 2022, 4:52pm
3
I just tried both the old and new template binary_sensor
formats and both respond as expected:
binary_sensor:
- platform: template
sensors:
test2:
value_template: "{{ 'armed_away' != states('alarm_control_panel.aarlo_base_station') }}"
template:
- binary_sensor:
- name: test
state: "{{ 'armed_away' != states('alarm_control_panel.aarlo_base_station') }}"
Both result in a state of ‘on’ when the state of the entity is not ‘armed_away’. I recommend looking in DevTools->States to see whether you’re using the right entity_id. It’s possible that there’s a name conflict and the name has been changed to binary_sensor.alarm_2
or something like that.
M4nu
February 20, 2022, 5:58pm
4
Thank you for your answers ! I finally found that my history was empty, so I deleted my database file and all is ok now !