Advertisement
Guest User

Untitled

a guest
Jan 19th, 2023
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. sensor:
  2. - platform: template
  3. sensors:
  4. chores_number_due:
  5. value_template: "{{ states.input_boolean | selectattr('state','eq', 'on') | map(attribute='entity_id') | select('match', 'input_boolean.chore_') | list | count }}"
  6.  
  7. # Script for button press on the "upcoming chores" field because cannot template a service call entity_id
  8. script:
  9. chores_upcoming_button_press:
  10. sequence:
  11. - service: input_button.press
  12. target:
  13. entity_id: "input_button.{{ button_id | replace('input_boolean.','') | replace('_due','') }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement