1
0

Change brightness and move blinds to scripts

This commit is contained in:
Przemek Grondek 2022-09-26 21:33:44 +02:00
parent ae0e6ad3d7
commit 1269579f82
3 changed files with 44 additions and 35 deletions

View File

@ -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

View File

@ -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

View 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