From 900f180c6975a7d623731510bc8eda840d1ff24c Mon Sep 17 00:00:00 2001 From: Philipp Hansen Date: Wed, 28 Dec 2022 17:54:28 +0100 Subject: [PATCH] Many updates --- automations.yaml | 11 +++ configuration.yaml | 0 lovelace/dashboard/hello_world.yaml | 41 ++++---- lovelace/dashboard/laundry.yaml | 7 ++ lovelace/dashboard/lights.yaml | 59 +++++++++-- packages/laundry/laundry_timer.yaml | 30 ++++++ packages/laundry/timer.yaml | 3 + packages/light/adaptive.yaml | 4 +- packages/light/bedroom_group.yaml | 7 ++ packages/light/buttons/automation.yaml | 57 ----------- packages/light/buttons/bedrooms.yaml | 99 +++++++++++++++++++ packages/light/livingroom_group.yaml | 5 +- packages/livingroom/button/button.yaml | 0 .../remote}/remote.yaml | 45 ++++++++- packages/office/button.yaml | 50 ++++++++++ packages/office/pc.yaml | 7 ++ packages/pc/pc.yaml | 21 ---- resources.yaml | 5 +- ui-lovelace.yaml | 10 +- 19 files changed, 351 insertions(+), 110 deletions(-) create mode 100644 automations.yaml mode change 100755 => 100644 configuration.yaml create mode 100755 lovelace/dashboard/laundry.yaml create mode 100755 packages/laundry/laundry_timer.yaml create mode 100755 packages/laundry/timer.yaml create mode 100755 packages/light/bedroom_group.yaml delete mode 100755 packages/light/buttons/automation.yaml create mode 100755 packages/light/buttons/bedrooms.yaml create mode 100755 packages/livingroom/button/button.yaml rename packages/{living_room_remote => livingroom/remote}/remote.yaml (57%) create mode 100755 packages/office/button.yaml create mode 100755 packages/office/pc.yaml delete mode 100755 packages/pc/pc.yaml diff --git a/automations.yaml b/automations.yaml new file mode 100644 index 0000000..eeedb7f --- /dev/null +++ b/automations.yaml @@ -0,0 +1,11 @@ +- id: '1672243158980' + description: '' + trigger: + - device_id: 85e0a07a3b952671b37fd008f7b2a299 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + condition: [] + action: [] + mode: single diff --git a/configuration.yaml b/configuration.yaml old mode 100755 new mode 100644 diff --git a/lovelace/dashboard/hello_world.yaml b/lovelace/dashboard/hello_world.yaml index c4ad4d3..9e7826e 100755 --- a/lovelace/dashboard/hello_world.yaml +++ b/lovelace/dashboard/hello_world.yaml @@ -25,23 +25,30 @@ icon: "mdi:television-off" #OPTIONAL name: TV OFF color: "black" - -- type: 'custom:button-card' - color_type: icon - entity: switch.mailbox - name: Mailbox - tap_action: none - show_label: true - size: 20% - state: - - operator: template - value: > - [[[ return states['switch.mailbox'].state === 'on' ]]] - icon: mdi:mailbox - label: Mail - - operator: default - icon: mdi:mailbox-outline - label: No Mail + +- type: horizontal-stack + cards: + - type: 'custom:button-card' + color_type: icon + entity: switch.mailbox + name: Mailbox + tap_action: none + show_label: true + size: 20% + state: + - operator: template + value: > + [[[ return states['switch.mailbox'].state === 'on' ]]] + icon: mdi:mailbox + - operator: default + icon: mdi:mailbox-outline + - type: 'custom:button-card' + #color_type: icon + entity: timer.laundry + name: laundry + tap_action: none + show_label: true + size: 20% - type: horizontal-stack cards: diff --git a/lovelace/dashboard/laundry.yaml b/lovelace/dashboard/laundry.yaml new file mode 100755 index 0000000..b49f510 --- /dev/null +++ b/lovelace/dashboard/laundry.yaml @@ -0,0 +1,7 @@ +- type: 'custom:flipdown-timer-card' + entity: timer.laundry + show_hour: auto + show_title: true + show_header: true + theme: dark + diff --git a/lovelace/dashboard/lights.yaml b/lovelace/dashboard/lights.yaml index 129d2fb..148928e 100755 --- a/lovelace/dashboard/lights.yaml +++ b/lovelace/dashboard/lights.yaml @@ -1,4 +1,4 @@ -- type: 'custom:button-card' +- type: "custom:button-card" template: card_title name: Adaptive label: Bulbs @@ -14,7 +14,6 @@ ulm_card_light_force_background_color: true ulm_card_light_name: Office ulm_card_light_enable_collapse: true - ulm_card_light_enable_color: true - type: "custom:button-card" template: card_light entity: light.bedroom_bulb_light @@ -25,21 +24,42 @@ ulm_card_light_name: Bedroom ulm_card_light_enable_collapse: true +- type: horizontal-stack + cards: + - type: "custom:button-card" + template: card_light + entity: light.bedroom_bulb_toni_light + variables: + ulm_card_light_enable_slider: true + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: true + ulm_card_light_name: "Bedroom Toni" + ulm_card_light_enable_collapse: true + - type: "custom:button-card" + template: card_light + entity: light.bedroom_bulb_philipp_light + variables: + ulm_card_light_enable_slider: true + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: true + ulm_card_light_name: "Bedroom Philipp" + ulm_card_light_enable_collapse: true + - type: "horizontal-stack" cards: - - type: 'custom:button-card' + - type: "custom:button-card" template: card_input_boolean entity: switch.adaptive_lighting_default variables: ulm_card_input_boolean_name: Adaptive - - type: 'custom:button-card' + - type: "custom:button-card" template: card_input_boolean entity: switch.adaptive_lighting_sleep_mode_default variables: ulm_card_input_boolean_name: Sleep -- type: 'custom:button-card' +- type: "custom:button-card" template: card_title name: Living Room label: Lights @@ -60,6 +80,8 @@ ulm_card_light_enable_color: true ulm_card_light_force_background_color: true ulm_card_light_name: Couch +- type: horizontal-stack + cards: - type: "custom:button-card" template: card_light entity: light.living_room_switch_lamp_sill @@ -67,6 +89,18 @@ ulm_card_light_enable_color: true ulm_card_light_force_background_color: true ulm_card_light_name: Sill + - type: "custom:button-card" + template: card_light + entity: light.livingroom_switch_lamp + variables: + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: true + ulm_card_light_name: Tanne + +- type: "custom:button-card" + template: card_title + name: TV + label: Sockets - type: "custom:button-card" template: card_light @@ -75,9 +109,18 @@ ulm_card_light_icon: mdi:television ulm_card_light_enable_color: true ulm_card_light_force_background_color: true - ulm_card_light_name: TV + ulm_card_light_name: Livingroom -- type: 'custom:button-card' +- type: "custom:button-card" + template: card_light + entity: light.bedroom_switch_lamp + variables: + ulm_card_light_icon: mdi:television + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: true + ulm_card_light_name: Bedroom + +- type: "custom:button-card" template: card_title name: Hallway label: Light @@ -88,4 +131,4 @@ variables: ulm_card_light_enable_color: true ulm_card_light_force_background_color: true - ulm_card_light_name: Hallway \ No newline at end of file + ulm_card_light_name: Hallway diff --git a/packages/laundry/laundry_timer.yaml b/packages/laundry/laundry_timer.yaml new file mode 100755 index 0000000..5c953d9 --- /dev/null +++ b/packages/laundry/laundry_timer.yaml @@ -0,0 +1,30 @@ +automation: + - alias: laundry_standard + trigger: [] + condition: [] + action: + - service: timer.start + data: + duration: "03:20:00" + target: + entity_id: timer.laundry + + - alias: laundry_30 + trigger: [] + condition: [] + action: + - service: timer.start + data: + duration: "03:05:00" + target: + entity_id: timer.laundry + + - alias: laundry_auto + trigger: [] + condition: [] + action: + - service: timer.start + data: + duration: "03:40:00" + target: + entity_id: timer.laundry \ No newline at end of file diff --git a/packages/laundry/timer.yaml b/packages/laundry/timer.yaml new file mode 100755 index 0000000..e0fcc48 --- /dev/null +++ b/packages/laundry/timer.yaml @@ -0,0 +1,3 @@ +timer: + laundry: + #duration: "03:20:00" \ No newline at end of file diff --git a/packages/light/adaptive.yaml b/packages/light/adaptive.yaml index bbdcb2a..bec24d4 100755 --- a/packages/light/adaptive.yaml +++ b/packages/light/adaptive.yaml @@ -5,4 +5,6 @@ adaptive_lighting: interval: 20 lights: - light.office_bulb - - light.bedroom_bulb_light \ No newline at end of file + - light.bedroom_bulb_light + - light.bedroom_bulb_toni_light + - light.bedroom_bulb_philipp_light \ No newline at end of file diff --git a/packages/light/bedroom_group.yaml b/packages/light/bedroom_group.yaml new file mode 100755 index 0000000..e0ce701 --- /dev/null +++ b/packages/light/bedroom_group.yaml @@ -0,0 +1,7 @@ +light: + - platform: group + name: "Bedroom Lights" + entities: + - light.bedroom_bulb_toni_light + - light.bedroom_bulb_philipp_light + - light.bedroom_bulb_light \ No newline at end of file diff --git a/packages/light/buttons/automation.yaml b/packages/light/buttons/automation.yaml deleted file mode 100755 index 4aa3cd1..0000000 --- a/packages/light/buttons/automation.yaml +++ /dev/null @@ -1,57 +0,0 @@ -#Guest Room Button Light -automation: - - alias: guestroom_light_button - trigger: - - device_id: c6b9d0a0f7a56e9f2966cdb8cb312614 - domain: zha - platform: device - type: remote_button_short_press - subtype: button - action: - - type: toggle - device_id: 1fcba92f6a53183e10c1dc35a9bb82ce - entity_id: light.guestroom_switch_lamp - domain: light - #Bedroom Button Light - - alias: bedroom_light_button - trigger: - - device_id: 5eaa44bd80bff72ec68727486d1259cd - domain: zha - platform: device - type: remote_button_short_press - subtype: button - action: - - type: toggle - device_id: e0e71e574631d1fd7ebf960b883d1b6f - entity_id: light.bedroom_bulb_light - domain: light - # Office Button Light - - alias: office_light_button_single_press - trigger: - - device_id: ab68a51751fcc28c6576ba467a77581d - domain: zha - platform: device - type: remote_button_short_press - subtype: button - action: - - type: toggle - device_id: ce016fbf6d9602740bbabe1fe9915c88 - entity_id: light.office_bulb - domain: light - - # Office Button Light double press - - alias: office_light_button_double_press - trigger: - - device_id: ab68a51751fcc28c6576ba467a77581d - domain: zha - platform: device - type: remote_button_double_press - subtype: button - action: - - service: light.turn_on - target: - entity_id: light.office_bulb - data: - color_temp: 255 - brightness: 255 - diff --git a/packages/light/buttons/bedrooms.yaml b/packages/light/buttons/bedrooms.yaml new file mode 100755 index 0000000..ec3a59b --- /dev/null +++ b/packages/light/buttons/bedrooms.yaml @@ -0,0 +1,99 @@ +# Guest Room Button Light +automation: + - alias: guestroom_light_button + trigger: + - device_id: c6b9d0a0f7a56e9f2966cdb8cb312614 + domain: zha + platform: device + type: remote_button_short_press + subtype: button + action: + - type: toggle + device_id: 1fcba92f6a53183e10c1dc35a9bb82ce + entity_id: light.guestroom_switch_lamp + domain: light + +###### Bedroom ###### + + # Bedroom Button Philipp Light single press + - alias: bedroom_light_button_philipp_single_press + trigger: + - device_id: 5eaa44bd80bff72ec68727486d1259cd + domain: zha + platform: device + type: remote_button_short_press + subtype: button + action: + - type: toggle + device_id: f472f0815009f1343028a8d6a41b34ae + entity_id: light.bedroom_bulb_philipp_light + domain: light + + # Bedroom Button Philipp Light double press + - alias: bedroom_light_button_philipp_double_press + trigger: + - device_id: 5eaa44bd80bff72ec68727486d1259cd + domain: zha + platform: device + type: remote_button_double_press + subtype: button + action: + - type: toggle + device_id: e0e71e574631d1fd7ebf960b883d1b6f + entity_id: light.bedroom_bulb_light + domain: light + + # Bedroom Button Philipp Light long press + - alias: bedroom_light_button_philipp_long_press + trigger: + - device_id: 5eaa44bd80bff72ec68727486d1259cd + domain: zha + platform: device + type: remote_button_long_press + subtype: button + action: + - service: light.toggle + target: + entity_id: light.bedroom_lights + + + # Bedroom Button Toni Light + - alias: bedroom_light_button_toni_single_press + trigger: + - device_id: ab68a51751fcc28c6576ba467a77581d + domain: zha + platform: device + type: remote_button_short_press + subtype: button + action: + - type: toggle + device_id: f472f0815009f1343028a8d6a41b34ae + entity_id: light.bedroom_bulb_toni_light + domain: light + + # Bedroom Button Toni Light double press + - alias: bedroom_light_button_toni_double_press + trigger: + - device_id: ab68a51751fcc28c6576ba467a77581d + domain: zha + platform: device + type: remote_button_double_press + subtype: button + action: + - type: toggle + device_id: e0e71e574631d1fd7ebf960b883d1b6f + entity_id: light.bedroom_bulb_light + domain: light + + # Bedroom Button Toni Light long press + - alias: bedroom_light_button_toni_long_press + trigger: + - device_id: ab68a51751fcc28c6576ba467a77581d + domain: zha + platform: device + type: remote_button_long_press + subtype: button + action: + - service: light.toggle + target: + entity_id: light.bedroom_lights diff --git a/packages/light/livingroom_group.yaml b/packages/light/livingroom_group.yaml index 187c09c..f1e6b81 100755 --- a/packages/light/livingroom_group.yaml +++ b/packages/light/livingroom_group.yaml @@ -4,5 +4,6 @@ light: name: "Living Room Lights" entities: - light.livingroom_switch_lamp_table - - light.livingroom_switch_lamp_couch - - light.living_room_switch_lamp_sill + #- light.livingroom_switch_lamp_couch + #- light.living_room_switch_lamp_sill + - light.livingroom_switch_lamp diff --git a/packages/livingroom/button/button.yaml b/packages/livingroom/button/button.yaml new file mode 100755 index 0000000..e69de29 diff --git a/packages/living_room_remote/remote.yaml b/packages/livingroom/remote/remote.yaml similarity index 57% rename from packages/living_room_remote/remote.yaml rename to packages/livingroom/remote/remote.yaml index c07015a..d50e870 100755 --- a/packages/living_room_remote/remote.yaml +++ b/packages/livingroom/remote/remote.yaml @@ -51,7 +51,7 @@ automation: target: entity_id: script.denon_listen_music - # Living Room button Spotify + # Living Room button Turn Off - alias: living_room_turn_off_everything trigger: - device_id: 86384e5da7e890f4a7a84d186383d1c1 @@ -65,4 +65,45 @@ automation: entity_id: script.denon_tv_turn_off - service: light.turn_off target: - entity_id: light.living_room_lights \ No newline at end of file + entity_id: light.living_room_lights + +#### Door Button #### + # Living Room door button turn light on + - alias: livingroom_button_door_turn_on + trigger: + - device_id: 85e0a07a3b952671b37fd008f7b2a299 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + action: + - service: light.turn_on + target: + entity_id: light.living_room_lights + + - alias: livingroom_button_door_turn_off + trigger: + - device_id: 85e0a07a3b952671b37fd008f7b2a299 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_off + action: + - service: light.turn_off + target: + entity_id: light.living_room_lights + + - alias: livingroom_button_door_turn_off_long + trigger: + - device_id: 85e0a07a3b952671b37fd008f7b2a299 + domain: zha + platform: device + type: remote_button_long_press + subtype: dim_down + action: + - service: light.turn_off + target: + entity_id: light.living_room_lights + - service: script.turn_on + target: + entity_id: script.denon_tv_turn_off diff --git a/packages/office/button.yaml b/packages/office/button.yaml new file mode 100755 index 0000000..7a944df --- /dev/null +++ b/packages/office/button.yaml @@ -0,0 +1,50 @@ +automation: + # Living Room button turn light off + - alias: office_light_button_turn_off + trigger: + - device_id: ca1b84b5a0bc1aaa9e1a6b856d77b37e + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_off + action: + - type: turn_off + entity_id: light.office_bulb + device_id: ce016fbf6d9602740bbabe1fe9915c88 + domain: light + - type: turn_off + entity_id: light.office_switch_socket + device_id: 343b205f3ed48a715e59c5490050150f + domain: light + + # Office button turn light on + - alias: office_light_button_turn_on + trigger: + - device_id: ca1b84b5a0bc1aaa9e1a6b856d77b37e + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + action: + - type: turn_on + entity_id: light.office_bulb + device_id: ce016fbf6d9602740bbabe1fe9915c88 + domain: light + + # Office button turn light on long + - alias: office_light_button_turn_on_long + trigger: + - device_id: ca1b84b5a0bc1aaa9e1a6b856d77b37e + domain: zha + platform: device + type: remote_button_long_press + subtype: dim_up + action: + - type: turn_on + entity_id: light.office_bulb + device_id: ce016fbf6d9602740bbabe1fe9915c88 + domain: light + - type: turn_on + entity_id: light.office_switch_socket + device_id: 343b205f3ed48a715e59c5490050150f + domain: light \ No newline at end of file diff --git a/packages/office/pc.yaml b/packages/office/pc.yaml new file mode 100755 index 0000000..b5a2296 --- /dev/null +++ b/packages/office/pc.yaml @@ -0,0 +1,7 @@ +wake_on_lan: + +switch: + - platform: wake_on_lan + mac: !secret tower_mac + name: tower + diff --git a/packages/pc/pc.yaml b/packages/pc/pc.yaml deleted file mode 100755 index 988cc24..0000000 --- a/packages/pc/pc.yaml +++ /dev/null @@ -1,21 +0,0 @@ -wake_on_lan: - -switch: - - platform: wake_on_lan - mac: !secret tower_mac - name: tower - -#Office Steckdosenleiste -automation: - - alias: office_light_socket - trigger: - - device_id: ab68a51751fcc28c6576ba467a77581d - domain: zha - platform: device - type: remote_button_long_press - subtype: button - action: - - type: toggle - device_id: 343b205f3ed48a715e59c5490050150f - entity_id: light.office_switch_socket - domain: light diff --git a/resources.yaml b/resources.yaml index ebc423a..b30c53c 100755 --- a/resources.yaml +++ b/resources.yaml @@ -33,4 +33,7 @@ - url: /hacsfiles/lovelace-layout-card/layout-card.js type: module - url: /hacsfiles/weather-card/weather-card.js - type: module \ No newline at end of file + type: module +- url: /hacsfiles/flipdown-timer-card/flipdown-timer-card.js + type: module + \ No newline at end of file diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index 671a7f7..e98e910 100755 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -39,8 +39,16 @@ views: cards: !include lovelace/dashboard/harmony/volume_control.yaml - type: custom:vertical-layout - title: "Kunibert" + title: "Laundry" path: 2 + cards: + - type: custom:vertical-layout + type: vertical-stack + cards: + !include lovelace/dashboard/laundry.yaml + - type: custom:vertical-layout + title: "Kunibert" + path: 3 cards: - type: custom:vertical-layout type: vertical-stack