i have this template sensor in homeassistant
{% set rooms = states.sensor
| selectattr(‘entity_id’, ‘match’, ‘sensor.tablet_.battery_power_time_since_update’)
| selectattr(‘state’, ‘is_number’)
| selectattr(‘state’, ‘defined’)
| selectattr(‘state’, ‘!=’, ‘unknown’)
| selectattr(‘state’,‘>’, ‘200’)
| map(attribute=‘entity_id’)
| map(‘regex_replace’, 'sensor.tablet(.)_battery_power_time_since_update’, ‘\1’)
| list
%}
{{ rooms | join(', ') if rooms else ‘None’ }}
it work, but it compare the “state” with “200”, not 200 , so pls kindly help me to filter in correct way. i want to filter the sensor have value >200
Thank you