Hi everyone,
any ideas on how to create a sensor that has status on when there is at least one item containing a certain word within a to-do list?
Thanks in advance
Hi everyone,
any ideas on how to create a sensor that has status on when there is at least one item containing a certain word within a to-do list?
Thanks in advance
template:
- trigger:
- platform: event
event_type: event_template_reloaded
- platform: state
entity_id: todo.chores
action:
- service: todo.get_items
data:
status: needs_action
target:
entity_id: todo.chores
response_variable: mylist
binary_sensor:
- name: Example in ToDo (exact match)
state: |
{{'Example' in mylist['todo.chores']['items']
| map(attribute='summary') | list }}
- name: Example in ToDo (search, ignore case)
state: >
{{ mylist['todo.chores']['items'] | map(attribute='summary')
| select('search', 'Example', true) | list | count > 0 }}
thank youuuuuuuuuuu