Hi All,
This template was working well to sum together my total ‘tracked’ power usage, which is helpful in identifying the ‘untracked’ (total - tracked) energy use in the house… But, has recently stopped working
{{ states.sensor
| selectattr('attributes.unit_of_measurement', 'equalto', 'W')
| selectattr('entity_id', '!=', 'sensor.household_power_usage')
| selectattr('entity_id', '!=', ' sensor.shelly_shem_c45bbe79043f_2_current_consumption')
| selectattr('entity_id', '!=', 'sensor.total_tracked_devices_energy_now')
| selectattr('entity_id', '!=', 'sensor.unaccounted_energy_use')
| map(attribute='state') | map('float') | list | sum }}
I now get an error: UndefinedError: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'unit_of_measurement'
Could someone point me in the right direction, I’m guessing a recent upgrade has made my code problematic?
TIA