Skip to content

Commit

Permalink
feat: add script to conditionally open cover
Browse files Browse the repository at this point in the history
  • Loading branch information
TribuneX committed Jun 10, 2024
1 parent e26c901 commit 69c48d3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions includes/scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,22 @@ watering_zone:
- service: script.water_zone
data:
water_period: "{{ states('input_select.garden_water_time') }}"


open_single_cover:
- choose:
- conditions:
- condition: template
value_template: '{{ state_attr("{{ cover_name }}", "current_position") < 100 }}'
sequence:
- service: cover.open
entity_id: '{{ cover.name }}'

close_single_cover:
- choose:
- conditions:
- condition: template
value_template: '{{ state_attr("{{ cover_name }}", "current_position") > 0 }}'
sequence:
- service: cover.close
entity_id: '{{ cover.name }}'

0 comments on commit 69c48d3

Please sign in to comment.