Change brightness and move blinds to scripts
This commit is contained in:
parent
ae0e6ad3d7
commit
1269579f82
@ -22,10 +22,10 @@
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.office_illuminance
|
||||
below: '140'
|
||||
below: '160'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
minutes: 2
|
||||
seconds: 0
|
||||
condition:
|
||||
- condition: or
|
||||
@ -72,8 +72,8 @@
|
||||
- service: cover.open_cover
|
||||
target:
|
||||
entity_id:
|
||||
- cover.office_blinds
|
||||
- cover.dining_blinds
|
||||
- service: script.office_blinds_up
|
||||
|
||||
- id: brightness-bright
|
||||
alias: '[Brightness] Bright - close covers'
|
||||
@ -81,7 +81,7 @@
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.office_illuminance
|
||||
above: '1200'
|
||||
above: '1300'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
@ -90,5 +90,5 @@
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id:
|
||||
- cover.office_blinds
|
||||
- cover.dining_blinds
|
||||
- service: script.office_blinds_down
|
||||
|
@ -7,21 +7,7 @@
|
||||
type: remote_button_short_press
|
||||
subtype: turn_on
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: cover.office_blinds
|
||||
attribute: current_position
|
||||
below: 51
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
entity_id: cover.office_blinds
|
||||
default:
|
||||
- service: cover.set_cover_position
|
||||
data:
|
||||
position: 50
|
||||
target:
|
||||
entity_id: cover.office_blinds
|
||||
- service: script.office_blinds_down
|
||||
mode: single
|
||||
|
||||
- id: office-blinds-button-up
|
||||
@ -33,21 +19,7 @@
|
||||
type: remote_button_short_press
|
||||
subtype: turn_off
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: cover.office_blinds
|
||||
attribute: current_position
|
||||
above: 49
|
||||
sequence:
|
||||
- service: cover.open_cover
|
||||
entity_id: cover.office_blinds
|
||||
default:
|
||||
- service: cover.set_cover_position
|
||||
data:
|
||||
position: 50
|
||||
target:
|
||||
entity_id: cover.office_blinds
|
||||
- service: script.office_blinds_up
|
||||
mode: single
|
||||
|
||||
- id: office-blinds-button-down-all
|
||||
|
37
scripts/110.office-blinds.yaml
Normal file
37
scripts/110.office-blinds.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
office_blinds_up:
|
||||
alias: '[Office] Blinds up'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: cover.office_blinds
|
||||
attribute: current_position
|
||||
above: 49
|
||||
sequence:
|
||||
- service: cover.open_cover
|
||||
entity_id: cover.office_blinds
|
||||
default:
|
||||
- service: cover.set_cover_position
|
||||
data:
|
||||
position: 50
|
||||
target:
|
||||
entity_id: cover.office_blinds
|
||||
|
||||
office_blinds_down:
|
||||
alias: '[Office] Blinds down'
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: cover.office_blinds
|
||||
attribute: current_position
|
||||
below: 51
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
entity_id: cover.office_blinds
|
||||
default:
|
||||
- service: cover.set_cover_position
|
||||
data:
|
||||
position: 50
|
||||
target:
|
||||
entity_id: cover.office_blinds
|
Loading…
Reference in New Issue
Block a user