Add living room cover

This commit is contained in:
2021-04-30 18:39:28 +03:00
parent 4bf8d9060e
commit 8465bebd64
12 changed files with 121 additions and 26 deletions
@@ -229,3 +229,11 @@ cards:
- automation.simulation_mode_1400
- automation.simulation_mode_1700
- automation.simulation_mode_2200
- type: entities
title: Covers
icon: mdi:blinds
show_header_toggle: false
entities:
- automation.cover_living_room_open_at_morning
- automation.cover_living_room_close_after_sunset
@@ -21,3 +21,10 @@ with_state_background:
- color: black
icon:
- color: black
- value: 'open'
styles:
card:
- background-color: var(--primary-color)
- color: black
icon:
- color: black
@@ -82,7 +82,9 @@ cards:
# Column 2
- type: vertical-stack
cards:
- type: horizontal-stack
- type: grid
columns: 4
square: false
cards:
- type: custom:button-card
template: [small, with_state_background]
@@ -106,8 +108,7 @@ cards:
entity: switch.mercury_home_mode
name: Mercury Home
- type: horizontal-stack
cards:
- type: custom:button-card
template: small
entity: media_player.living_room_tv
@@ -138,14 +139,7 @@ cards:
variables:
state_indicator_id: automation.titanium_turn_off_when_idle
- type: custom:button-card
template: [small, with_state_background]
entity: binary_sensor.pi_hole_enabled
name: Pi-Hole
icon: mdi:pi-hole
- type: horizontal-stack
cards:
- type: custom:button-card
template: [ac_button, small]
- type: custom:button-card
@@ -160,8 +154,14 @@ cards:
template: [radiator_button, small]
entity: climate.kitchen_radiator_mode
name: "Kitchen"
- type: horizontal-stack
cards:
- type: custom:button-card
template: [small, with_state_background]
entity: cover.living_room
name: LR Cover
tap_action:
action: call-service
service: script.toggle_living_room_cover
- type: custom:button-card
template: [small, with_state_background, with_state_indicator]
entity: fan.philips_airpurifier
@@ -151,7 +151,14 @@ cards:
entity: climate.kitchen_radiator_mode
name: "Kitchen"
- type: custom:button-card
template: [small, with_state_indicator]
template: [small, with_state_background]
entity: cover.living_room
name: LR Cover
tap_action:
action: call-service
service: script.toggle_living_room_cover
- type: custom:button-card
template: [small, with_state_background, with_state_indicator]
entity: fan.philips_airpurifier
variables:
state_indicator_id: binary_sensor.purifier_filter_needs_change
@@ -17,6 +17,13 @@ cards:
square: false
columns: 4
cards:
- type: custom:button-card
template: [small, with_state_background]
entity: cover.living_room
name: LR Cover
tap_action:
action: call-service
service: script.toggle_living_room_cover
- type: custom:button-card
template: [small, with_state_background]
entity: binary_sensor.living_room_right_window
@@ -136,6 +136,13 @@
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
entity: cover.living_room
name: Cover
tap_action:
action: call-service
service: script.toggle_living_room_cover
- type: custom:button-card
template: default
entity: binary_sensor.living_room_right_window
@@ -224,6 +224,13 @@
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
entity: cover.living_room
name: LR Cover
tap_action:
action: call-service
service: script.toggle_living_room_cover
- type: custom:button-card
template: default
entity: binary_sensor.multisensor_motion
@@ -11,8 +11,8 @@ automation:
- alias: "Hallway tablet · Set to home after 10 minutes"
trigger:
platform: state
entity_id: input_select.hallway_dashboard_mode
to: "Coming Home"
entity_id: binary_sensor.georgi_home
to: "on"
for:
minutes: 10
action:
@@ -0,0 +1,40 @@
script:
toggle_living_room_cover:
sequence:
- choose:
- conditions: >
{{ state_attr('cover.living_room', 'current_position') == 0 }}
sequence:
- service: cover.set_cover_position
entity_id: cover.living_room
data:
position: 80
- conditions: >
{{ state_attr('cover.living_room', 'current_position') >= 80 }}
sequence:
- service: cover.close_cover
entity_id: cover.living_room
default:
- service: cover.close_cover
entity_id: cover.living_room
automation:
- alias: Cover · Living Room · Open at morning
trigger:
platform: time
at: "10:00:00"
action:
- service: cover.set_cover_position
entity_id: cover.living_room
data:
position: 80
- alias: Cover · Living Room · Close after sunset
trigger:
platform: sun
event: sunset
offset: "+01:00:00"
action:
- service: cover.close_cover
entity_id: cover.living_room
@@ -1,11 +1,3 @@
# "event_type": "zwave.scene_activated",
# "data": {
# "entity_id": "zwave.aeon_labs_zw130_wallmote_quad",
# "node_id": 5,
# "scene_id": 2,
# "scene_data": 1
# },
automation:
- alias: Wallmote · Living room · 1 · Tap · Toggle lights
trigger:
@@ -106,7 +98,7 @@ automation:
action:
- service: script.toshiba_ac_toggle_cool
- alias: Wallmote · Living room · 4 · Hold · Toggle Titanium
- alias: Wallmote · Living room · 4 · Hold · Toggle Cover
trigger:
platform: event
event_type: zwave.scene_activated
@@ -116,5 +108,4 @@ automation:
scene_id: 4
scene_data: 1
action:
- service: switch.toggle
entity_id: switch.titanium
- service: script.toggle_living_room_cover
+18
View File
@@ -20,6 +20,7 @@ script:
- service: script.bed_led_on
- service: switch.turn_on
entity_id: switch.mercury_home_mode
- service: script.routine_coming_home_during_daytime
- service: script.routine_coming_home_after_sunset
- service: input_select.select_option
entity_id: input_select.hallway_dashboard_mode
@@ -31,6 +32,23 @@ script:
- service: script.turn_on_all_radiators
routine_coming_home_during_daytime:
alias: Routine · Coming home · During daytime
sequence:
- condition: and
conditions:
- condition: sun
after: sunrise
- condition: sun
before: sunset
- service: cover.set_cover_position
entity_id: cover.living_room
data:
poisition: 80
routine_coming_home_after_sunset:
alias: Routine · Coming home · After sunset
sequence:
@@ -23,6 +23,9 @@ script:
data:
option: "Coming Home"
- service: cover.close_cover
entity_id: cover.living_room
- service: notify.telegram
data:
title: "🏠 *Presence Module · Leaving Home*"