Closed cmorlok closed 6 years ago
I am using a config like this:
sensor:
- platform: zigate
name: thermometer
address: 'abcd01'
- platform: template
sensors:
temperature:
unit_of_measurement: '°C'
value_template: '{{ states.sensor.thermometer.attributes.temperature | round(1) }}'
humidity:
unit_of_measurement: '%'
value_template: '{{ states.sensor.thermometer.attributes.humidity | round }}'
Since thermometer
has no default_attr
set, its state is always UNKNOWN
. The sensors temperature
and humidity
will therefore never get any state set, even though thermometer.attributes
shows the correct values.
Totaly Agree with that change request ! When batterie information is push to home-assistant, no push to influxDB is triggered
is it possible to update that pull request ? :)
I won't have that much time to do anything for this project on summer.
If no
default_attr
is specified, and ifdefault_attr
is set toNone
by default, the state will always beUNKOWN
. Therefore HA's state change detection will never see changed sensor data which is hidden in attributes.Setting the default to
ZGT_LAST_SEEN
will raise a state change event independently of which attribute has changed.