I’m trying to create a template sensor for the status of my roomba, like this:
- platform: template
sensors:
roomba_status:
friendly_name: "Status"
entity_id: vacuum.roomba_status
value_template: "{{ state_attr('vacuum.roomba', 'status') }}"
icon_template: "{{ state_attr('vacuum.roomba', 'battery_icon')}}"
But the only values I get for state and icon are “None”.
When I look at the vacuum.roomba device, the attributes are:
status: Stopped
battery_level: 89
battery_icon: mdi:battery-90
bin_present: true
software_version: v2.4.6-3
position: (173, 0, 0)
bin_full: false
What’s wrong with my device?