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 f0f46ec
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions includes/scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,26 @@ watering_zone:
- service: script.water_zone
data:
water_period: "{{ states('input_select.garden_water_time') }}"


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

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

0 comments on commit f0f46ec

Please sign in to comment.