From be904eee31224112ef58628e90156617f64ea740 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 27 Aug 2024 15:37:27 +0400 Subject: Integrate new LEDs in living room --- .storage/lovelace.lovelace_control | 16 ++++++-- automations.yaml | 77 +++++++++++++++++++++++--------------- 2 files changed, 58 insertions(+), 35 deletions(-) diff --git a/.storage/lovelace.lovelace_control b/.storage/lovelace.lovelace_control index ad27fd3..ee93ce8 100644 --- a/.storage/lovelace.lovelace_control +++ b/.storage/lovelace.lovelace_control @@ -150,13 +150,13 @@ "cards": [ { "type": "light", - "entity": "light.yeelight_color_0x7caaf86", - "name": "Office Bulb" + "entity": "light.smart_light", + "name": "Bedroom Bulb" }, { "type": "light", - "entity": "light.smart_light", - "name": "Bedroom Bulb" + "entity": "light.yeelight_color_0x7caaf86", + "name": "Office Bulb" } ] }, @@ -180,6 +180,14 @@ "entity": "switch.living_lights_center", "name": "Lustre-2" }, + { + "entity": "light.living_led", + "name": "LED" + }, + { + "entity": "light.office_led_office_led", + "name": "Office" + }, { "entity": "light.yeelight_color_0x7caaf86", "name": "Bulb" diff --git a/automations.yaml b/automations.yaml index 97244a2..68d248d 100644 --- a/automations.yaml +++ b/automations.yaml @@ -125,7 +125,7 @@ path: lights/light_switch.yaml input: switch: switch.living_lights_right - light: light.yeelight_color_0x7caaf86 + light: light.lights_office dblclick: - parallel: - service: script.sleep_and_wake @@ -874,38 +874,53 @@ entity_id: switch.living_tablelampsocket else: - if: - - condition: or - conditions: - - condition: state - entity_id: switch.smart_power_strip_pro_socket_2 - state: 'off' - - condition: state - entity_id: switch.office_table - state: unavailable + - condition: state + entity_id: light.office_led_office_led + state: 'on' then: - parallel: - - service: script.sleep_and_wake - data: - mode: wake - target: office - - if: - - condition: numeric_state - entity_id: sun.sun - attribute: elevation - below: '5' - then: - - service: script.turn_on_office_lights - data: - temperature: 4000 + - service: homeassistant.turn_off + target: + entity_id: + - light.office_led_office_led + - service: switch.turn_on + target: + entity_id: switch.living_tablelampsocket else: - - service: script.turn_on_office_lights - data: - temperature: 4000 + - if: + - condition: or + conditions: + - condition: state + entity_id: switch.smart_power_strip_pro_socket_2 + state: 'off' + - condition: state + entity_id: switch.office_table + state: unavailable + then: + - parallel: + - service: script.sleep_and_wake + data: + mode: wake + target: office + - if: + - condition: numeric_state + entity_id: sun.sun + attribute: elevation + below: '5' + then: + - service: script.turn_on_office_lights + data: + temperature: 4000 + else: + - service: script.turn_on_office_lights + data: + temperature: 4000 off_click: - - service: switch.turn_on - data: {} + - service: homeassistant.turn_on target: - entity_id: switch.living_tablelampsocket + entity_id: + - light.office_led_office_led + data: {} dblclick: - if: - condition: state @@ -1379,13 +1394,13 @@ trigger: - platform: state entity_id: - - binary_sensor.network_route_vivacell - to: 'on' + - binary_sensor.network_route_crd + to: 'off' condition: [] action: - service: notify.notify data: - message: Connected via Vivacell + message: CRD net failure mode: single - id: '1680824553612' alias: 'Motions: Bedroom' -- cgit v1.2.3