Had this working from a previous install but not sure why it isn’t working now. Taking the battery state of the wyzesense and making battery sensors. Fails configuration check for unit_of_measurement. Any ideas would be appreciated:
- platform: template
sensors:
battery_office_window:
friendly_name: "Office Window Battery Level"
entity_id: binary_sensor.wyzesense_xxxxxxxx
unit_of_measurement: '%'
value_template: >-
{{ state_attr('binary_sensor.wyzesense_xxxxxxxxx', 'battery_level') }}
device_class: battery
icon_template: mdi:battery
Throws back the following when I check configuration:
Invalid config for [binary_sensor.template]: [unit_of_measurement] is an invalid option for [binary_sensor.template]. Check: binary_sensor.template->sensors->battery_office_window->unit_of_measurement. (See ?, line ?).
Based on what I read here about battery sensors: