mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
Replace lights. Add Osram and Neo
This commit is contained in:
@@ -71,7 +71,7 @@ cards:
|
||||
- light: light.light_le_4
|
||||
- fade: switch.light_le_4_fade
|
||||
- wifi: sensor.light_le_4_wifi
|
||||
- light.light_le_8
|
||||
- light.pc
|
||||
- light.living_room_ambient
|
||||
- light.living_room_ambient_main
|
||||
- type: custom:fold-entity-row
|
||||
@@ -158,17 +158,17 @@ cards:
|
||||
entities:
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
- light.light_orbecco_1
|
||||
- light.neo_1
|
||||
- type: divider
|
||||
- light.kitchen_secondary
|
||||
- type: custom:fold-entity-row
|
||||
entity: light.kitchen_secondary
|
||||
name: Secondary lights
|
||||
entities:
|
||||
- light.light_le_5
|
||||
- light.light_le_6
|
||||
- light.light_le_9
|
||||
- light.light_le_10
|
||||
- light.osram_6
|
||||
- light.osram_7
|
||||
- light.osram_8
|
||||
- light.osram_9
|
||||
|
||||
- type: entities
|
||||
title: Hallway
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
conditions:
|
||||
- entity: binary_sensor.floorplan_night_mode
|
||||
state: "on"
|
||||
- entity: light.light_le_8
|
||||
- entity: light.pc
|
||||
state: "on"
|
||||
- entity: light.living_room_main
|
||||
state: "off"
|
||||
@@ -42,7 +42,7 @@
|
||||
conditions:
|
||||
- entity: binary_sensor.floorplan_night_mode
|
||||
state: "on"
|
||||
- entity: light.light_le_8
|
||||
- entity: light.pc
|
||||
state: "off"
|
||||
- entity: light.living_room_main
|
||||
state: "on"
|
||||
@@ -60,7 +60,7 @@
|
||||
conditions:
|
||||
- entity: binary_sensor.floorplan_night_mode
|
||||
state: "on"
|
||||
- entity: light.light_le_8
|
||||
- entity: light.pc
|
||||
state: "on"
|
||||
- entity: light.living_room_main
|
||||
state: "on"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
- type: custom:decluttering-card
|
||||
template: floorplan_state_icon
|
||||
variables:
|
||||
- entity: light.light_le_8
|
||||
- entity: light.pc
|
||||
- top: 69.8%
|
||||
- left: 77.8%
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ cards:
|
||||
name: Main
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: light.light_le_8
|
||||
entity: light.pc
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: light.living_room_ambient
|
||||
|
||||
@@ -31,7 +31,7 @@ cards:
|
||||
name: Main
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: light.light_le_8
|
||||
entity: light.pc
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: light.living_room_ambient
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
name: Main
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: light.light_le_8
|
||||
entity: light.pc
|
||||
name: PC
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
name: Main
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: light.light_le_8
|
||||
entity: light.pc
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: light.living_room_ambient
|
||||
|
||||
@@ -38,7 +38,7 @@ automation:
|
||||
{% elif groupId == 0 %}
|
||||
{% set entityId = 'light.living_room_main' %}
|
||||
{% elif groupId == 1 %}
|
||||
{% set entityId = 'light.light_le_8' %}
|
||||
{% set entityId = 'light.pc' %}
|
||||
{% elif groupId == 2 %}
|
||||
{% set entityId = 'light.living_room_ambient' %}
|
||||
{% elif groupId == 3 %}
|
||||
@@ -74,7 +74,7 @@ automation:
|
||||
{% elif groupId == 0 %}
|
||||
light.living_room_main
|
||||
{% elif groupId == 1 %}
|
||||
light.light_le_8
|
||||
light.pc
|
||||
{% elif groupId == 2 %}
|
||||
light.living_room_ambient
|
||||
{% elif groupId == 3 %}
|
||||
@@ -102,7 +102,7 @@ automation:
|
||||
{% elif groupId == 0 %}
|
||||
{% set entityId = 'light.living_room_main' %}
|
||||
{% elif groupId == 1 %}
|
||||
{% set entityId = 'light.light_le_8' %}
|
||||
{% set entityId = 'light.pc' %}
|
||||
{% elif groupId == 2 %}
|
||||
{% set entityId = 'light.living_room_ambient' %}
|
||||
{% elif groupId == 3 %}
|
||||
|
||||
@@ -79,7 +79,7 @@ automation:
|
||||
- service: light.toggle
|
||||
entity_id:
|
||||
- light.living_room_main
|
||||
- light.light_le_8
|
||||
- light.pc
|
||||
|
||||
- alias: Wallmote · Living room · 3 · Hold · Toggle Ambient lights
|
||||
trigger:
|
||||
|
||||
@@ -6,7 +6,6 @@ alexa:
|
||||
- light.living_room_main
|
||||
- light.master_bedroom_main
|
||||
- light.bedside
|
||||
- light.tuya_kitchen
|
||||
- light.hallway_entrance
|
||||
- light.hallway
|
||||
- light.tuya_hallway_main
|
||||
@@ -48,8 +47,6 @@ alexa:
|
||||
name: "Living room"
|
||||
light.master_bedroom_main:
|
||||
name: "Bedroom"
|
||||
light.tuya_kitchen:
|
||||
name: "Kitchen"
|
||||
light.hallway:
|
||||
name: "Hallway"
|
||||
light.hallway_entrance:
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
automation:
|
||||
- alias: iOS · Alarm off
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: ios.action_fired
|
||||
action:
|
||||
choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.actionName == 'alarm_off' }}"
|
||||
sequence:
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "📱 *iOS Module*"
|
||||
message: "iOS alarm is off. Switching to Day Mode!"
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.house_mode
|
||||
data:
|
||||
option: "day"
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.actionName == 'wind_down' }}"
|
||||
sequence:
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "📱 *iOS Module*"
|
||||
message: "iOS wind_down is on. Switching to Bed Mode!"
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.house_mode
|
||||
data:
|
||||
option: "bed"
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.actionName == 'bedtime' }}"
|
||||
sequence:
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "📱 *iOS Module*"
|
||||
message: "iOS bedtime is on. Switching to Night Mode!"
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.house_mode
|
||||
data:
|
||||
option: "night"
|
||||
|
||||
@@ -17,27 +17,17 @@ automation:
|
||||
entity_id:
|
||||
- scene.living_room_ambient_neon
|
||||
- scene.bedroom_ambient_neon
|
||||
- service: light.turn_on
|
||||
entity_id: light.light_orbecco_1
|
||||
data:
|
||||
brightness_pct: 100
|
||||
rgb_color: [255, 182, 109]
|
||||
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.living_room_main
|
||||
- light.pc
|
||||
- light.master_bedroom_main
|
||||
- light.light_lohas_6
|
||||
- light.kitchen_secondary
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
- light.hallway
|
||||
- light.kitchen
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp: 500
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.living_room_main
|
||||
- light.hallway_main
|
||||
- light.tuya_kitchen
|
||||
|
||||
- service: automation.turn_on
|
||||
entity_id:
|
||||
- automation.lighting_hallway_motion_on
|
||||
@@ -46,7 +36,6 @@ automation:
|
||||
- automation.lighting_kitchen_motion_off
|
||||
|
||||
|
||||
|
||||
- alias: Light · Color · Blue
|
||||
trigger:
|
||||
platform: state
|
||||
@@ -62,13 +51,9 @@ automation:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.living_room_main
|
||||
- light.hallway_main
|
||||
# kitchen....
|
||||
- light.tuya_kitchen_main
|
||||
- light.tuya_kitchen_secondary
|
||||
- light.kitchen_secondary
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
- light.hallway
|
||||
- light.kitchen
|
||||
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.living_room_ambient_main
|
||||
@@ -82,14 +67,8 @@ automation:
|
||||
entity_id:
|
||||
- light.light_avatar_small_1 # living room ambient Secondary
|
||||
- light.light_lohas_6 # entrance 1
|
||||
- light.light_orbecco_1
|
||||
- light.neo_1 # Kitchen
|
||||
- light.pc
|
||||
data:
|
||||
rgb_color: [0, 0, 255]
|
||||
brightness_pct: 100
|
||||
|
||||
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.kitchen_secondary
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
|
||||
@@ -11,7 +11,7 @@ light:
|
||||
name: Living room ceiling
|
||||
entities:
|
||||
- light.living_room_main
|
||||
- light.light_le_8
|
||||
- light.pc
|
||||
|
||||
- platform: group
|
||||
name: Living room ambient
|
||||
@@ -45,15 +45,15 @@ light:
|
||||
entities:
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
- light.light_orbecco_1
|
||||
- light.neo_1
|
||||
|
||||
- platform: group
|
||||
name: Kitchen secondary
|
||||
entities:
|
||||
- light.light_le_5
|
||||
- light.light_le_6
|
||||
- light.light_le_9
|
||||
- light.light_le_10
|
||||
- light.osram_6
|
||||
- light.osram_7
|
||||
- light.osram_8
|
||||
- light.osram_9
|
||||
|
||||
- platform: group
|
||||
name: Kitchen
|
||||
@@ -61,11 +61,11 @@ light:
|
||||
- light.kitchen_main
|
||||
- light.kitchen_secondary
|
||||
|
||||
- platform: group
|
||||
name: Tuya Kitchen
|
||||
entities:
|
||||
- light.tuya_kitchen_main
|
||||
- light.tuya_kitchen_secondary
|
||||
# - platform: group
|
||||
# name: Tuya Kitchen
|
||||
# entities:
|
||||
# - light.tuya_kitchen_main
|
||||
# - light.tuya_kitchen_secondary
|
||||
|
||||
- platform: group
|
||||
name: Hallway entrance
|
||||
@@ -89,14 +89,14 @@ light:
|
||||
name: On after dark
|
||||
entities:
|
||||
- light.living_room
|
||||
- light.master_bedroom_main
|
||||
- light.master_bedroom
|
||||
- light.hallway
|
||||
|
||||
- platform: group
|
||||
name: Ceiling
|
||||
entities:
|
||||
- light.living_room_main
|
||||
- light.light_le_8
|
||||
- light.pc
|
||||
- light.master_bedroom_main
|
||||
- light.kitchen
|
||||
- light.hallway
|
||||
@@ -114,7 +114,6 @@ homeassistant:
|
||||
light.ceiling:
|
||||
icon: mdi:ceiling-light
|
||||
|
||||
|
||||
# Living room
|
||||
light.living_room:
|
||||
icon: mdi:lightbulb-group
|
||||
@@ -132,7 +131,7 @@ homeassistant:
|
||||
light.light_le_4:
|
||||
friendly_name: Living room 4
|
||||
|
||||
light.light_le_8:
|
||||
light.pc:
|
||||
friendly_name: PC
|
||||
icon: bha:outdoor-lamp-variant
|
||||
|
||||
@@ -141,10 +140,6 @@ homeassistant:
|
||||
light.light_avatar_small_1:
|
||||
friendly_name: Living room ambient secondary
|
||||
|
||||
# Out of comission
|
||||
# light.pc:
|
||||
# icon: bha:outdoor-lamp-variant
|
||||
|
||||
# Master bedroom
|
||||
light.master_bedroom:
|
||||
friendly_name: Bedroom
|
||||
@@ -167,8 +162,8 @@ homeassistant:
|
||||
icon: mdi:desk-lamp
|
||||
|
||||
# Kitchen
|
||||
light.tuya_kitchen:
|
||||
icon: mdi:lightbulb-group
|
||||
# light.tuya_kitchen:
|
||||
# icon: mdi:lightbulb-group
|
||||
light.kitchen_main:
|
||||
icon: bha:ceiling-lamp-plafond
|
||||
light.kitchen_secondary:
|
||||
@@ -194,8 +189,3 @@ homeassistant:
|
||||
friendly_name: Hallway 1
|
||||
light.osram_4:
|
||||
friendly_name: Hallway 2
|
||||
|
||||
# light.light_le_7:
|
||||
# friendly_name: Hallway 1
|
||||
# light.light_le_8:
|
||||
# friendly_name: Hallway 2
|
||||
|
||||
@@ -300,6 +300,29 @@ light:
|
||||
qos: 1
|
||||
retain: false
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "ledvance_1"
|
||||
state_topic: "z2m_deconz/ledvance_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: true
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/ledvance_1/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
effect: true
|
||||
effect_list:
|
||||
- "blink"
|
||||
- "breathe"
|
||||
- "okay"
|
||||
- "channel_change"
|
||||
- "finish_effect"
|
||||
- "stop_effect"
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "light_hama_1_wifi"
|
||||
@@ -411,6 +434,16 @@ sensor:
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "ledvance_1_lqi"
|
||||
state_topic: "z2m_deconz/ledvance_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
|
||||
## Switch
|
||||
|
||||
switch:
|
||||
- platform: mqtt
|
||||
name: "light_hama_1_fade"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
light:
|
||||
- platform: "mqtt"
|
||||
name: "neo_1"
|
||||
state_topic: "z2m_deconz/neo_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: true
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/neo_1/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
- platform: "mqtt"
|
||||
name: "pc"
|
||||
state_topic: "z2m_deconz/neo_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: true
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/neo_2/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
sensor:
|
||||
- platform: "mqtt"
|
||||
name: "neo_1_lqi"
|
||||
state_topic: "z2m_deconz/neo_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "pc_lqi"
|
||||
state_topic: "z2m_deconz/neo_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
@@ -69,6 +69,62 @@ light:
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_6"
|
||||
state_topic: "z2m_deconz/osram_6"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_6/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_7"
|
||||
state_topic: "z2m_deconz/osram_7"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_7/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_8"
|
||||
state_topic: "z2m_deconz/osram_8"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_8/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_9"
|
||||
state_topic: "z2m_deconz/osram_9"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_9/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
sensor:
|
||||
- platform: "mqtt"
|
||||
name: "osram_1_lqi"
|
||||
@@ -105,3 +161,31 @@ sensor:
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_6_lqi"
|
||||
state_topic: "z2m_deconz/osram_6"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_7_lqi"
|
||||
state_topic: "z2m_deconz/osram_7"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_8_lqi"
|
||||
state_topic: "z2m_deconz/osram_8"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_9_lqi"
|
||||
state_topic: "z2m_deconz/osram_9"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
|
||||
@@ -9,78 +9,78 @@
|
||||
# 4. Automate ON/OFF when an input_boolean is toggled.
|
||||
|
||||
# Light groups in Tuya. Name: "tuya_{{scene_name}}_lights_state"
|
||||
input_boolean:
|
||||
tuya_kitchen_main_lights_state:
|
||||
tuya_kitchen_secondary_lights_state:
|
||||
tuya_hallway_main_lights_state:
|
||||
# input_boolean:
|
||||
# tuya_kitchen_main_lights_state:
|
||||
# tuya_kitchen_secondary_lights_state:
|
||||
# tuya_hallway_main_lights_state:
|
||||
|
||||
light:
|
||||
- platform: template
|
||||
lights:
|
||||
tuya_kitchen_main:
|
||||
friendly_name: Kitchen main lights (scene)
|
||||
value_template: "{{ is_state('input_boolean.tuya_kitchen_main_lights_state', 'on') }}"
|
||||
icon_template: bha:ceiling-lamp-plafond
|
||||
turn_on:
|
||||
service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tuya_kitchen_main_lights_state
|
||||
turn_off:
|
||||
service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tuya_kitchen_main_lights_state
|
||||
# light:
|
||||
# - platform: template
|
||||
# lights:
|
||||
# tuya_kitchen_main:
|
||||
# friendly_name: Kitchen main lights (scene)
|
||||
# value_template: "{{ is_state('input_boolean.tuya_kitchen_main_lights_state', 'on') }}"
|
||||
# icon_template: bha:ceiling-lamp-plafond
|
||||
# turn_on:
|
||||
# service: input_boolean.turn_on
|
||||
# entity_id: input_boolean.tuya_kitchen_main_lights_state
|
||||
# turn_off:
|
||||
# service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.tuya_kitchen_main_lights_state
|
||||
|
||||
tuya_kitchen_secondary:
|
||||
friendly_name: Kitchen secondary lights (scene)
|
||||
value_template: "{{ is_state('input_boolean.tuya_kitchen_secondary_lights_state', 'on') }}"
|
||||
icon_template: bha:ceiling-lamp-plafond
|
||||
turn_on:
|
||||
service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tuya_kitchen_secondary_lights_state
|
||||
turn_off:
|
||||
service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tuya_kitchen_secondary_lights_state
|
||||
# tuya_kitchen_secondary:
|
||||
# friendly_name: Kitchen secondary lights (scene)
|
||||
# value_template: "{{ is_state('input_boolean.tuya_kitchen_secondary_lights_state', 'on') }}"
|
||||
# icon_template: bha:ceiling-lamp-plafond
|
||||
# turn_on:
|
||||
# service: input_boolean.turn_on
|
||||
# entity_id: input_boolean.tuya_kitchen_secondary_lights_state
|
||||
# turn_off:
|
||||
# service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.tuya_kitchen_secondary_lights_state
|
||||
|
||||
tuya_hallway_main:
|
||||
friendly_name: Hallway main lights (scene)
|
||||
value_template: "{{ is_state('input_boolean.tuya_hallway_main_lights_state', 'on') }}"
|
||||
icon_template: bha:ceiling-lamp-plafond
|
||||
turn_on:
|
||||
service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tuya_hallway_main_lights_state
|
||||
turn_off:
|
||||
service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tuya_hallway_main_lights_state
|
||||
# tuya_hallway_main:
|
||||
# friendly_name: Hallway main lights (scene)
|
||||
# value_template: "{{ is_state('input_boolean.tuya_hallway_main_lights_state', 'on') }}"
|
||||
# icon_template: bha:ceiling-lamp-plafond
|
||||
# turn_on:
|
||||
# service: input_boolean.turn_on
|
||||
# entity_id: input_boolean.tuya_hallway_main_lights_state
|
||||
# turn_off:
|
||||
# service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.tuya_hallway_main_lights_state
|
||||
|
||||
# Try to keep input_booleans consistent.
|
||||
automation:
|
||||
- alias: Lighting · Tuya · Update kitchen lights
|
||||
mode: queued
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id:
|
||||
- input_boolean.tuya_kitchen_main_lights_state
|
||||
- input_boolean.tuya_kitchen_secondary_lights_state
|
||||
- input_boolean.tuya_hallway_main_lights_state
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
data_template:
|
||||
entity_id: >
|
||||
# # Try to keep input_booleans consistent.
|
||||
# automation:
|
||||
# - alias: Lighting · Tuya · Update kitchen lights
|
||||
# mode: queued
|
||||
# trigger:
|
||||
# platform: state
|
||||
# entity_id:
|
||||
# - input_boolean.tuya_kitchen_main_lights_state
|
||||
# - input_boolean.tuya_kitchen_secondary_lights_state
|
||||
# - input_boolean.tuya_hallway_main_lights_state
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# data_template:
|
||||
# entity_id: >
|
||||
|
||||
{% set scene_name = trigger.entity_id.split('tuya_')[1].split('_lights')[0] %}
|
||||
{% set state = states(trigger.entity_id) %}
|
||||
scene.tuya_{{ scene_name }}_{{ state }}
|
||||
# {% set scene_name = trigger.entity_id.split('tuya_')[1].split('_lights')[0] %}
|
||||
# {% set state = states(trigger.entity_id) %}
|
||||
# scene.tuya_{{ scene_name }}_{{ state }}
|
||||
|
||||
- alias: Lighting · Tuya · Update states on start
|
||||
trigger:
|
||||
platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- delay: 00:00:03
|
||||
# - alias: Lighting · Tuya · Update states on start
|
||||
# trigger:
|
||||
# platform: homeassistant
|
||||
# event: start
|
||||
# action:
|
||||
# - delay: 00:00:03
|
||||
|
||||
- service_template: "input_boolean.turn_{{ states('light.kitchen_main') }}"
|
||||
entity_id: input_boolean.tuya_kitchen_main_lights_state
|
||||
# - service_template: "input_boolean.turn_{{ states('light.kitchen_main') }}"
|
||||
# entity_id: input_boolean.tuya_kitchen_main_lights_state
|
||||
|
||||
- service_template: "input_boolean.turn_{{ states('light.kitchen_secondary') }}"
|
||||
entity_id: input_boolean.tuya_kitchen_secondary_lights_state
|
||||
# - service_template: "input_boolean.turn_{{ states('light.kitchen_secondary') }}"
|
||||
# entity_id: input_boolean.tuya_kitchen_secondary_lights_state
|
||||
|
||||
- service_template: "input_boolean.turn_{{ states('light.hallway_main') }}"
|
||||
entity_id: input_boolean.tuya_hallway_main_lights_state
|
||||
# - service_template: "input_boolean.turn_{{ states('light.hallway_main') }}"
|
||||
# entity_id: input_boolean.tuya_hallway_main_lights_state
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
script:
|
||||
lighting_temperature_adjust:
|
||||
alias: Lighting · Temperature · Adjust
|
||||
sequence:
|
||||
- condition: template
|
||||
value_template: "{{ is_state(entity_id, 'on') }}"
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: "{{ entity_id }}"
|
||||
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||
|
||||
automation:
|
||||
- alias: Lighting · Temperature · Adjust on start
|
||||
mode: parallel
|
||||
@@ -20,36 +9,62 @@ automation:
|
||||
- light.light_lohas_2
|
||||
- light.light_lohas_3
|
||||
- light.light_lohas_4
|
||||
- light.light_lohas_6
|
||||
- light.light_le_1
|
||||
- light.light_le_2
|
||||
- light.light_le_3
|
||||
- light.light_le_4
|
||||
- light.osram_1
|
||||
- light.osram_4
|
||||
- light.osram_5
|
||||
- light.light_lohas_6
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
- light.osram_6
|
||||
- light.osram_7
|
||||
- light.osram_8
|
||||
- light.osram_9
|
||||
to: "on"
|
||||
action:
|
||||
# Can't use the script here, because they all could be fired at the same time.
|
||||
# Hass can't run the script multiple times simultaneously.
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: "{{ trigger.entity_id }}"
|
||||
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||
|
||||
- alias: Lighting · Temperature · Adjust based on time
|
||||
mode: parallel
|
||||
# TODO: this trigger is not good. Figure out something else.
|
||||
trigger:
|
||||
platform: sun
|
||||
event: sunset
|
||||
action:
|
||||
- service: script.lighting_temperature_adjust
|
||||
data:
|
||||
entity_id: light.master_bedroom_main
|
||||
- service: script.lighting_temperature_adjust
|
||||
data:
|
||||
entity_id: light.living_room_main
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id:
|
||||
- light.master_bedroom_main
|
||||
- light.living_room_main
|
||||
- light.kitchen
|
||||
- light.hallway
|
||||
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: "💡 Lighting Module · "
|
||||
message: >-
|
||||
Adjusting temperature - sun changed from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}
|
||||
domain: light
|
||||
|
||||
# switch:
|
||||
# - platform: flux
|
||||
# disable_brightness_adjust: true
|
||||
# lights:
|
||||
# - light.living_room_main
|
||||
# - light.master_bedroom_main
|
||||
# - light.pc
|
||||
|
||||
# circadian_lighting:
|
||||
|
||||
# switch:
|
||||
# - platform: circadian_lighting
|
||||
# name: Circadian lights
|
||||
# disable_brightness_adjust: true
|
||||
# lights_ct:
|
||||
# - light.master_bedroom_main
|
||||
# - light.pc
|
||||
# - light.living_room_main
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# https://www.home-assistant.io/integrations/spotify
|
||||
spotify:
|
||||
client_id: !secret spotify_client_id
|
||||
client_secret: !secret spotify_client_secret
|
||||
|
||||
script:
|
||||
music_play:
|
||||
alias: Music · Play
|
||||
|
||||
@@ -23,7 +23,7 @@ automation:
|
||||
scene_id: plex_before_start
|
||||
snapshot_entities:
|
||||
- light.living_room_main
|
||||
- light.light_le_8
|
||||
- light.pc
|
||||
- light.living_room_ambient_main
|
||||
- light.light_avatar_small_1
|
||||
- light.master_bedroom_main
|
||||
@@ -34,7 +34,7 @@ automation:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.living_room_main
|
||||
- light.light_le_8
|
||||
- light.pc
|
||||
- light.living_room_ambient_main
|
||||
- light.light_avatar_small_1
|
||||
- light.master_bedroom_main
|
||||
|
||||
@@ -35,56 +35,170 @@ pi_hole:
|
||||
homekit:
|
||||
filter:
|
||||
include_entities:
|
||||
# Living Room
|
||||
- light.living_room_main
|
||||
- light.light_le_8
|
||||
- light.living_room_ambient
|
||||
- light.pc
|
||||
- binary_sensor.living_room_right_window
|
||||
- sensor.multisensor_6_temperature
|
||||
- sensor.multisensor_6_relative_humidity
|
||||
- climate.toshiba_ac
|
||||
- switch.desk_outlet
|
||||
- switch.titanium
|
||||
- sensor.living_room_radiator_temperature
|
||||
- media_player.living_room_tv
|
||||
- media_player.nvidia_shield
|
||||
|
||||
# Bedroom
|
||||
- light.master_bedroom_main
|
||||
- light.bedside
|
||||
- light.bed_led
|
||||
- sensor.bedroom_weather_temperature
|
||||
- sensor.bedroom_weather_humidity
|
||||
- fan.philips_airpurifier
|
||||
- sensor.purifier_air_quality
|
||||
- sensor.purifier_allergens
|
||||
- binary_sensor.bedroom_door
|
||||
- binary_sensor.bedroom_left_window
|
||||
- binary_sensor.bedroom_right_window
|
||||
- media_player.master_bedroom
|
||||
|
||||
# Kitchen
|
||||
- light.kitchen_main
|
||||
- light.kitchen_secondary
|
||||
- binary_sensor.kitchen_motion_occupancy
|
||||
- climate.kitchen_radiator_mode
|
||||
- sensor.kitchen_weather_temperature
|
||||
- sensor.kitchen_weather_humidity
|
||||
- vacuum.vacuum
|
||||
|
||||
# Bathroom
|
||||
- sensor.bathroom_weather_temperature
|
||||
- sensor.bathroom_weather_humidity
|
||||
|
||||
# Hallway
|
||||
- light.hallway_entrance
|
||||
- light.hallway_main
|
||||
- light.tuya_kitchen
|
||||
- binary_sensor.kitchen_motion_occupancy
|
||||
- binary_sensor.hallway_motion_occupany
|
||||
- binary_sensor.trisensor_motion
|
||||
- binary_sensor.multisensor_motion
|
||||
- sensor.bedroom_weather_temperature
|
||||
- sensor.living_room_radiator_temperature
|
||||
- sensor.trisensor_temperature
|
||||
- sensor.multisensor_6_temperature
|
||||
- sensor.hallway_motion_illuminance
|
||||
- sensor.kitchen_motion_illuminance
|
||||
- sensor.purifier_humidity
|
||||
- sensor.bedroom_weather_humidity
|
||||
- climate.living_room_radiator_mode
|
||||
- climate.toshiba_ac
|
||||
- media_player.master_bedroom
|
||||
- switch.desk_outlet
|
||||
- switch.titanium
|
||||
- fan.philips_airpurifier
|
||||
- group.hallway_motion
|
||||
- sensor.hallway_weather_temperature
|
||||
- sensor.hallway_weather_humidity
|
||||
|
||||
entity_config:
|
||||
light.light_le_8:
|
||||
name: PC
|
||||
binary_sensor.kitchen_motion_occupancy:
|
||||
linked_battery_sensor: sensor.kitchen_motion_battery
|
||||
light.living_room_main:
|
||||
name: Living Room Main
|
||||
light.living_room_ambient:
|
||||
name: Living Room Ambient
|
||||
light.pc:
|
||||
name: PC Light
|
||||
binary_sensor.living_room_right_window:
|
||||
linked_battery_sensor: sensor.living_room_right_window_battery
|
||||
low_battery_threshold: 20
|
||||
name: Kitchen Motion
|
||||
binary_sensor.hallway_motion_occupany:
|
||||
linked_battery_sensor: sensor.hallway_motion_battery
|
||||
name: Hallway Motion
|
||||
binary_sensor.trisensor_motion:
|
||||
linked_battery_sensor: sensor.trisensor_battery_level
|
||||
name: Desk Motion
|
||||
binary_sensor.multisensor_motion:
|
||||
name: Living Room Window
|
||||
sensor.multisensor_6_temperature:
|
||||
linked_battery_sensor: sensor.multisensor_6_battery_level
|
||||
name: Living room Motion
|
||||
low_battery_threshold: 20
|
||||
name: Living Room Temperature
|
||||
sensor.multisensor_6_relative_humidity:
|
||||
linked_battery_sensor: sensor.multisensor_6_battery_level
|
||||
low_battery_threshold: 20
|
||||
name: Living Room Humidity
|
||||
climate.living_room_radiator_mode:
|
||||
linked_battery_sensor: sensor.living_room_radiator_battery_level
|
||||
low_battery_threshold: 20
|
||||
name: Living Room Radiator
|
||||
switch.desk_outlet:
|
||||
type: outlet
|
||||
|
||||
# Bedroom
|
||||
light.master_bedroom_main:
|
||||
name: Bedroom Main
|
||||
light.bedside:
|
||||
name: Bedside Lamp
|
||||
light.bed_led:
|
||||
name: Bed LED
|
||||
sensor.bedroom_weather_temperature:
|
||||
linked_battery_sensor: sensor.bedroom_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bedroom Temperature
|
||||
sensor.bedroom_weather_humidity:
|
||||
linked_battery_sensor: sensor.bedroom_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bedroom Humidity
|
||||
fan.philips_airpurifier:
|
||||
name: Purifier
|
||||
sensor.purifier_air_quality:
|
||||
name: Bedroom Air Quality
|
||||
sensor.purifier_allergens:
|
||||
name: Bedroom Allergens
|
||||
binary_sensor.bedroom_door:
|
||||
linked_battery_sensor: sensor.bedroom_door_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bedroom Door
|
||||
binary_sensor.bedroom_left_window:
|
||||
linked_battery_sensor: sensor.bedroom_left_window_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bedroom Left Window
|
||||
binary_sensor.bedroom_right_window:
|
||||
linked_battery_sensor: sensor.bedroom_right_window_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bedroom Right Window
|
||||
climate.bedroom_radiator_mode:
|
||||
linked_battery_sensor: sensor.bedroom_radiator_battery_level
|
||||
low_battery_threshold: 20
|
||||
name: Bedroom Radiator
|
||||
media_player.master_bedroom:
|
||||
feature_list:
|
||||
- feature: play_pause
|
||||
- feature: play_stop
|
||||
- feature: toggle_mute
|
||||
switch.desk_outlet:
|
||||
type: outlet
|
||||
|
||||
# Kitchen
|
||||
light.kitchen_main:
|
||||
name: Kitchen Main
|
||||
light.kitchen_secondary:
|
||||
name: Kitchen Secondary
|
||||
binary_sensor.kitchen_motion_occupancy:
|
||||
linked_battery_sensor: sensor.kitchen_motion_battery
|
||||
low_battery_threshold: 20
|
||||
name: Kitchen Motion
|
||||
sensor.kitchen_weather_temperature:
|
||||
linked_battery_sensor: sensor.kitchen_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Kitchen Temperature
|
||||
sensor.kitchen_weather_humidity:
|
||||
linked_battery_sensor: sensor.kitchen_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Kitchen Humidity
|
||||
climate.kitchen_radiator_mode:
|
||||
name: Kitchen Radiator
|
||||
|
||||
# Bathroom
|
||||
sensor.bathroom_weather_temperature:
|
||||
linked_battery_sensor: sensor.bathroom_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bathroom Temperature
|
||||
sensor.bathroom_weather_humidity:
|
||||
linked_battery_sensor: sensor.bathroom_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Bathroom Humidity
|
||||
|
||||
# Hallway
|
||||
light.hallway_entrance:
|
||||
name: Hallway Entrance
|
||||
light.hallway_main:
|
||||
name: Hallway Main
|
||||
group.hallway_motion:
|
||||
name: Hallway Motion
|
||||
sensor.hallway_weather_temperature:
|
||||
linked_battery_sensor: sensor.hallway_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Hallway Temperature
|
||||
sensor.hallway_weather_humidity:
|
||||
linked_battery_sensor: sensor.hallway_weather_battery
|
||||
low_battery_threshold: 20
|
||||
name: Hallway Humidity
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ─── ENTITIES ───────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user