diff --git a/config/lovelace/advanced_dashboard/08_automations.yaml b/config/lovelace/advanced_dashboard/08_automations.yaml index fa54c8d..b41d044 100644 --- a/config/lovelace/advanced_dashboard/08_automations.yaml +++ b/config/lovelace/advanced_dashboard/08_automations.yaml @@ -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 diff --git a/config/lovelace/button_card_templates/mixins/with_state_background_button.yaml b/config/lovelace/button_card_templates/mixins/with_state_background_button.yaml index 086c5b5..0996891 100644 --- a/config/lovelace/button_card_templates/mixins/with_state_background_button.yaml +++ b/config/lovelace/button_card_templates/mixins/with_state_background_button.yaml @@ -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 diff --git a/config/lovelace/hallway_dashboard/at_home_dashboard.yaml b/config/lovelace/hallway_dashboard/at_home_dashboard.yaml index 79722c0..9e94308 100644 --- a/config/lovelace/hallway_dashboard/at_home_dashboard.yaml +++ b/config/lovelace/hallway_dashboard/at_home_dashboard.yaml @@ -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 diff --git a/config/lovelace/hallway_dashboard/coming_home_dashboard.yaml b/config/lovelace/hallway_dashboard/coming_home_dashboard.yaml index 5b5bcc4..b7d54a2 100644 --- a/config/lovelace/hallway_dashboard/coming_home_dashboard.yaml +++ b/config/lovelace/hallway_dashboard/coming_home_dashboard.yaml @@ -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 diff --git a/config/lovelace/hallway_dashboard/leaving_home_dashboard.yaml b/config/lovelace/hallway_dashboard/leaving_home_dashboard.yaml index 1b42a86..2c1a92d 100644 --- a/config/lovelace/hallway_dashboard/leaving_home_dashboard.yaml +++ b/config/lovelace/hallway_dashboard/leaving_home_dashboard.yaml @@ -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 diff --git a/config/lovelace/home_dashboard/living_room_dashboard.yaml b/config/lovelace/home_dashboard/living_room_dashboard.yaml index c4d5cc6..273ff25 100644 --- a/config/lovelace/home_dashboard/living_room_dashboard.yaml +++ b/config/lovelace/home_dashboard/living_room_dashboard.yaml @@ -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 diff --git a/config/lovelace/home_dashboard/main_dashboard.yaml b/config/lovelace/home_dashboard/main_dashboard.yaml index 34717f4..0691b99 100644 --- a/config/lovelace/home_dashboard/main_dashboard.yaml +++ b/config/lovelace/home_dashboard/main_dashboard.yaml @@ -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 diff --git a/config/packages/devices/hallway/hallway_tablet.yaml b/config/packages/devices/hallway/hallway_tablet.yaml index 13ef277..120b2a1 100644 --- a/config/packages/devices/hallway/hallway_tablet.yaml +++ b/config/packages/devices/hallway/hallway_tablet.yaml @@ -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: diff --git a/config/packages/devices/living_room/cover.yaml b/config/packages/devices/living_room/cover.yaml new file mode 100644 index 0000000..8a9d78d --- /dev/null +++ b/config/packages/devices/living_room/cover.yaml @@ -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 diff --git a/config/packages/devices/living_room/wallmote.yaml b/config/packages/devices/living_room/wallmote.yaml index 693ebb0..b777bbb 100644 --- a/config/packages/devices/living_room/wallmote.yaml +++ b/config/packages/devices/living_room/wallmote.yaml @@ -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 diff --git a/config/packages/routines/coming_home.yaml b/config/packages/routines/coming_home.yaml index d654c1d..f8372ce 100644 --- a/config/packages/routines/coming_home.yaml +++ b/config/packages/routines/coming_home.yaml @@ -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: diff --git a/config/packages/routines/leaving_home.yaml b/config/packages/routines/leaving_home.yaml index 9b80037..787e725 100644 --- a/config/packages/routines/leaving_home.yaml +++ b/config/packages/routines/leaving_home.yaml @@ -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*"