Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: template
- sensors:
- chores_number_due:
- value_template: "{{ states.input_boolean | selectattr('state','eq', 'on') | map(attribute='entity_id') | select('match', 'input_boolean.chore_') | list | count }}"
- # Script for button press on the "upcoming chores" field because cannot template a service call entity_id
- script:
- chores_upcoming_button_press:
- sequence:
- - service: input_button.press
- target:
- entity_id: "input_button.{{ button_id | replace('input_boolean.','') | replace('_due','') }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement