Hello, I’m new to Home Assistant and I am trying to create a new template sensor for my Xiaomi Vacuum.
In my configuration.yaml I am adding:
- platform: template
sensors:
vacuum_status:
value_template: ‘{{ state.vacuum.xiaomi_vacuum_cleaner.attributes.status }}’
When I validate the configuration I receive the following error:
Invalid config for [sensor.template]: expected a dictionary for dictionary value @ data[‘sensors’][‘vacuum_status’]. Got None
expected a dictionary for dictionary value @ data[‘sensors’][‘value_template’]. Got ‘{{ state.vacuum.xiaomi_vacuum_cleaner.attributes.status }}’. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.template/
In the developer entities area I can see the following attributes of my vacuum:
status: Charging
battery_level: 100
battery_icon: mdi:battery-charging-100
fan_speed: Balanced
fan_speed_list: Quiet,Balanced,Turbo,Max
do_not_disturb: off
do_not_disturb_start: 22:00:00
do_not_disturb_end: 08:00:00
cleaning_time: 0
cleaned_area: 0
cleaning_count: 169
total_cleaned_area: 6307
total_cleaning_time: 6684
main_brush_left: 188
side_brush_left: 88
filter_left: 38
friendly_name: Xiaomi Vacuum cleaner
supported_features: 2047
Did anyone created somtehing similar? Can you help me?
Thanks!!!