mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-07 10:18:44 +00:00
Add osram lights to config. Add color mode
This commit is contained in:
@@ -11,7 +11,7 @@ light:
|
||||
name: Living room ceiling
|
||||
entities:
|
||||
- light.living_room_main
|
||||
- light.light_avatar_small_2
|
||||
- light.light_le_8
|
||||
|
||||
- platform: group
|
||||
name: Living room ambient
|
||||
@@ -43,8 +43,8 @@ light:
|
||||
- platform: group
|
||||
name: Kitchen main
|
||||
entities:
|
||||
- light.light_le_11
|
||||
- light.light_le_12
|
||||
- light.osram_2
|
||||
- light.osram_3
|
||||
- light.light_orbecco_1
|
||||
|
||||
- platform: group
|
||||
@@ -55,6 +55,12 @@ light:
|
||||
- light.light_le_9
|
||||
- light.light_le_10
|
||||
|
||||
- platform: group
|
||||
name: Kitchen
|
||||
entities:
|
||||
- light.kitchen_main
|
||||
- light.kitchen_secondary
|
||||
|
||||
- platform: group
|
||||
name: Tuya Kitchen
|
||||
entities:
|
||||
@@ -64,21 +70,20 @@ light:
|
||||
- platform: group
|
||||
name: Hallway entrance
|
||||
entities:
|
||||
# - light.light_lohas_5
|
||||
- light.light_hama_1
|
||||
- light.osram_5
|
||||
- light.light_lohas_6
|
||||
|
||||
- platform: group
|
||||
name: Hallway main
|
||||
entities:
|
||||
- light.light_le_7
|
||||
- light.light_le_8
|
||||
- light.osram_1
|
||||
- light.osram_4
|
||||
|
||||
- platform: group
|
||||
name: Hallway
|
||||
entities:
|
||||
- light.hallway_entrance
|
||||
- light.tuya_hallway_main
|
||||
- light.hallway_main
|
||||
|
||||
- platform: group
|
||||
name: On after dark
|
||||
@@ -91,9 +96,9 @@ light:
|
||||
name: Ceiling
|
||||
entities:
|
||||
- light.living_room_main
|
||||
- light.light_avatar_small_2
|
||||
- light.light_le_8
|
||||
- light.master_bedroom_main
|
||||
- light.tuya_kitchen
|
||||
- light.kitchen
|
||||
- light.hallway
|
||||
|
||||
- platform: group
|
||||
@@ -101,7 +106,7 @@ light:
|
||||
entities:
|
||||
- light.living_room
|
||||
- light.master_bedroom
|
||||
- light.tuya_kitchen
|
||||
- light.kitchen
|
||||
- light.hallway
|
||||
|
||||
homeassistant:
|
||||
@@ -127,7 +132,7 @@ homeassistant:
|
||||
light.light_le_4:
|
||||
friendly_name: Living room 4
|
||||
|
||||
light.light_avatar_small_2:
|
||||
light.light_le_8:
|
||||
friendly_name: PC
|
||||
icon: bha:outdoor-lamp-variant
|
||||
|
||||
@@ -177,14 +182,20 @@ homeassistant:
|
||||
icon: bha:ceiling-lamp-plafond
|
||||
# light.light_lohas_5:
|
||||
# friendly_name: Entrance 1
|
||||
light.light_hama_1:
|
||||
light.osram_5:
|
||||
friendly_name: Entrance 1
|
||||
light.light_lohas_6:
|
||||
friendly_name: Entrance 2
|
||||
|
||||
light.hallway_main:
|
||||
icon: bha:ceiling-lamp-plafond
|
||||
light.light_le_7:
|
||||
|
||||
light.osram_1:
|
||||
friendly_name: Hallway 1
|
||||
light.light_le_8:
|
||||
light.osram_4:
|
||||
friendly_name: Hallway 2
|
||||
|
||||
# light.light_le_7:
|
||||
# friendly_name: Hallway 1
|
||||
# light.light_le_8:
|
||||
# friendly_name: Hallway 2
|
||||
|
||||
@@ -300,31 +300,6 @@ light:
|
||||
qos: 1
|
||||
retain: false
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_avatar_small_2"
|
||||
availability_topic: "tele/light_avatar_small_2/LWT"
|
||||
command_topic: "cmnd/light_avatar_small_2/POWER"
|
||||
state_topic: "tele/light_avatar_small_2/STATE"
|
||||
state_value_template: "{{ value_json.POWER }}"
|
||||
brightness_command_topic: "cmnd/light_avatar_small_2/Dimmer"
|
||||
brightness_scale: 100
|
||||
brightness_state_topic: "tele/light_avatar_small_2/STATE"
|
||||
brightness_value_template: "{{ value_json.Dimmer }}"
|
||||
on_command_type: "brightness"
|
||||
white_value_command_topic: "cmnd/light_avatar_small_2/WHITE"
|
||||
white_value_scale: 100
|
||||
white_value_state_topic: "tele/light_avatar_small_2/STATE"
|
||||
white_value_template: "{{ value_json.White }}"
|
||||
rgb_command_topic: "cmnd/light_avatar_small_2/Color"
|
||||
rgb_state_topic: "tele/light_avatar_small_2/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
qos: 1
|
||||
retain: false
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "light_hama_1_wifi"
|
||||
@@ -416,16 +391,6 @@ sensor:
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
# - platform: mqtt
|
||||
# name: "light_lohas_5_wifi"
|
||||
# availability_topic: "tele/light_lohas_5/LWT"
|
||||
# device_class: signal_strength
|
||||
# payload_available: "Online"
|
||||
# payload_not_available: "Offline"
|
||||
# state_topic: "tele/light_lohas_5/STATE"
|
||||
# unit_of_measurement: "%"
|
||||
# value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_6_wifi"
|
||||
availability_topic: "tele/light_lohas_6/LWT"
|
||||
@@ -446,16 +411,6 @@ sensor:
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_avatar_small_2_wifi"
|
||||
availability_topic: "tele/light_avatar_small_2/LWT"
|
||||
device_class: signal_strength
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_avatar_small_2/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
switch:
|
||||
- platform: mqtt
|
||||
name: "light_hama_1_fade"
|
||||
@@ -556,17 +511,6 @@ switch:
|
||||
state_topic: "stat/light_lohas_4/RESULT"
|
||||
value_template: "{{ value_json.Fade }}"
|
||||
|
||||
# - platform: mqtt
|
||||
# name: "light_lohas_5_fade"
|
||||
# availability_topic: "tele/light_lohas_5/LWT"
|
||||
# command_topic: "cmnd/light_lohas_5/FADE"
|
||||
# icon: mdi:gradient
|
||||
# payload_available: "Online"
|
||||
# payload_not_available: "Offline"
|
||||
# qos: 1
|
||||
# state_topic: "stat/light_lohas_5/RESULT"
|
||||
# value_template: "{{ value_json.Fade }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_6_fade"
|
||||
availability_topic: "tele/light_lohas_6/LWT"
|
||||
@@ -589,18 +533,6 @@ switch:
|
||||
state_topic: "stat/light_avatar_small_1/RESULT"
|
||||
value_template: "{{ value_json.Fade }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_avatar_small_2_fade"
|
||||
availability_topic: "tele/light_avatar_small_2/LWT"
|
||||
command_topic: "cmnd/light_avatar_small_2/FADE"
|
||||
icon: mdi:gradient
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
qos: 1
|
||||
state_topic: "stat/light_avatar_small_2/RESULT"
|
||||
value_template: "{{ value_json.Fade }}"
|
||||
|
||||
|
||||
automation:
|
||||
- alias: Lighting · Sync Tasmota states on start-up
|
||||
initial_state: true
|
||||
@@ -612,3 +544,26 @@ automation:
|
||||
data:
|
||||
topic: "cmnd/tasmotas/STATE"
|
||||
payload: ""
|
||||
|
||||
- alias: Lighting · Sync Osram states on start-up
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "z2m_deconz/osram_1/get"
|
||||
payload: ""
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "z2m_deconz/osram_2/get"
|
||||
payload: ""
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "z2m_deconz/osram_3/get"
|
||||
payload: ""
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "z2m_deconz/osram_4/get"
|
||||
payload: ""
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
light:
|
||||
- platform: "mqtt"
|
||||
name: "osram_1"
|
||||
state_topic: "z2m_deconz/osram_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_1/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_2"
|
||||
state_topic: "z2m_deconz/osram_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_2/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_3"
|
||||
state_topic: "z2m_deconz/osram_3"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_3/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_4"
|
||||
state_topic: "z2m_deconz/osram_4"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_4/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
- platform: "mqtt"
|
||||
name: "osram_5"
|
||||
state_topic: "z2m_deconz/osram_5"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
brightness: true
|
||||
color_temp: true
|
||||
xy: false
|
||||
hs: false
|
||||
schema: "json"
|
||||
command_topic: "z2m_deconz/osram_5/set"
|
||||
brightness_scale: 254
|
||||
max_mireds: 500
|
||||
min_mireds: 150
|
||||
|
||||
sensor:
|
||||
- platform: "mqtt"
|
||||
name: "osram_1_lqi"
|
||||
state_topic: "z2m_deconz/osram_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_2_lqi"
|
||||
state_topic: "z2m_deconz/osram_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_3_lqi"
|
||||
state_topic: "z2m_deconz/osram_3"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_4_lqi"
|
||||
state_topic: "z2m_deconz/osram_4"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
- platform: "mqtt"
|
||||
name: "osram_5_lqi"
|
||||
state_topic: "z2m_deconz/osram_5"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
unit_of_measurement: "lqi"
|
||||
icon: "mdi:signal"
|
||||
Reference in New Issue
Block a user