mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
431 lines
14 KiB
YAML
431 lines
14 KiB
YAML
light:
|
|
- platform: mqtt
|
|
name: "light_le_1"
|
|
state_topic: "tele/light_le_1/STATE"
|
|
state_value_template: "{{ value_json.POWER }}"
|
|
command_topic: "cmnd/light_le_1/POWER"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
availability_topic: "tele/light_le_1/LWT"
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
on_command_type: "brightness"
|
|
brightness_command_topic: "cmnd/light_le_1/Dimmer"
|
|
brightness_state_topic: "tele/light_le_1/STATE"
|
|
brightness_scale: 100
|
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
color_temp_command_topic: "cmnd/light_le_1/CT"
|
|
color_temp_state_topic: "tele/light_le_1/STATE"
|
|
color_temp_value_template: "{{ value_json.CT }}"
|
|
qos: 1
|
|
retain: false
|
|
|
|
- platform: mqtt
|
|
name: "light_le_2"
|
|
state_topic: "tele/light_le_2/STATE"
|
|
state_value_template: "{{ value_json.POWER }}"
|
|
command_topic: "cmnd/light_le_2/POWER"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
availability_topic: "tele/light_le_2/LWT"
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
on_command_type: "brightness"
|
|
brightness_command_topic: "cmnd/light_le_2/Dimmer"
|
|
brightness_state_topic: "tele/light_le_2/STATE"
|
|
brightness_scale: 100
|
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
color_temp_command_topic: "cmnd/light_le_2/CT"
|
|
color_temp_state_topic: "tele/light_le_2/STATE"
|
|
color_temp_value_template: "{{ value_json.CT }}"
|
|
qos: 1
|
|
retain: false
|
|
|
|
- platform: mqtt
|
|
name: "light_le_3"
|
|
state_topic: "tele/light_le_3/STATE"
|
|
state_value_template: "{{ value_json.POWER }}"
|
|
command_topic: "cmnd/light_le_3/POWER"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
availability_topic: "tele/light_le_3/LWT"
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
on_command_type: "brightness"
|
|
brightness_command_topic: "cmnd/light_le_3/Dimmer"
|
|
brightness_state_topic: "tele/light_le_3/STATE"
|
|
brightness_scale: 100
|
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
color_temp_command_topic: "cmnd/light_le_3/CT"
|
|
color_temp_state_topic: "tele/light_le_3/STATE"
|
|
color_temp_value_template: "{{ value_json.CT }}"
|
|
qos: 1
|
|
retain: false
|
|
|
|
- platform: mqtt
|
|
name: "light_le_4"
|
|
state_topic: "tele/light_le_4/STATE"
|
|
state_value_template: "{{ value_json.POWER }}"
|
|
command_topic: "cmnd/light_le_4/POWER"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
availability_topic: "tele/light_le_4/LWT"
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
on_command_type: "brightness"
|
|
brightness_command_topic: "cmnd/light_le_4/Dimmer"
|
|
brightness_state_topic: "tele/light_le_4/STATE"
|
|
brightness_scale: 100
|
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
color_temp_command_topic: "cmnd/light_le_4/CT"
|
|
color_temp_state_topic: "tele/light_le_4/STATE"
|
|
color_temp_value_template: "{{ value_json.CT }}"
|
|
qos: 1
|
|
retain: false
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_2"
|
|
state_topic: "tele/light_lohas_2/STATE"
|
|
state_value_template: "{{ value_json.POWER }}"
|
|
command_topic: "cmnd/light_lohas_2/POWER"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
availability_topic: "tele/light_lohas_2/LWT"
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
on_command_type: "brightness"
|
|
brightness_command_topic: "cmnd/light_lohas_2/Dimmer"
|
|
brightness_state_topic: "tele/light_lohas_2/STATE"
|
|
brightness_scale: 100
|
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
hs_command_topic: "cmnd/light_lohas_2/HSBColor"
|
|
hs_state_topic: "tele/light_lohas_2/STATE"
|
|
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
|
color_temp_command_topic: "cmnd/light_lohas_2/CT"
|
|
color_temp_state_topic: "tele/light_lohas_2/STATE"
|
|
color_temp_value_template: "{{ value_json.CT }}"
|
|
# rgb_command_topic: "cmnd/light_lohas_2/Color"
|
|
# rgb_state_topic: "tele/light_lohas_2/STATE"
|
|
# rgb_command_template: "{{ '%02X%02X%02X' | format(red, green, blue) }}"
|
|
# rgb_value_template: "{{ (value_json.Color[0:2]|int(base=16),value_json.Color[2:4]|int(base=16),value_json.Color[4:6]|int(base=16)) | join(',')}}"
|
|
qos: 1
|
|
retain: false
|
|
effect_command_topic: "cmnd/light_lohas_2/Scheme"
|
|
effect_state_topic: "tele/light_lohas_2/STATE"
|
|
effect_value_template: "{{value_json.Scheme}}"
|
|
effect_list: [0, 1, 2, 3, 4]
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_6"
|
|
state_topic: "tele/light_lohas_6/STATE"
|
|
state_value_template: "{{ value_json.POWER }}"
|
|
command_topic: "cmnd/light_lohas_6/POWER"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
availability_topic: "tele/light_lohas_6/LWT"
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
on_command_type: "brightness"
|
|
brightness_command_topic: "cmnd/light_lohas_6/Dimmer"
|
|
brightness_state_topic: "tele/light_lohas_6/STATE"
|
|
brightness_scale: 100
|
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
hs_command_topic: "cmnd/light_lohas_6/HSBColor"
|
|
hs_state_topic: "tele/light_lohas_6/STATE"
|
|
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
|
color_temp_command_topic: "cmnd/light_lohas_6/CT"
|
|
color_temp_state_topic: "tele/light_lohas_6/STATE"
|
|
color_temp_value_template: "{{ value_json.CT }}"
|
|
# rgb_command_topic: "cmnd/light_lohas_6/Color"
|
|
# rgb_state_topic: "tele/light_lohas_6/STATE"
|
|
# rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}"
|
|
# rgb_value_template: "{{ (value_json.Color[0:2]|int(base=16),value_json.Color[2:4]|int(base=16),value_json.Color[4:6]|int(base=16)) | join(',')}}"
|
|
qos: 1
|
|
retain: false
|
|
effect_command_topic: "cmnd/light_lohas_6/Scheme"
|
|
effect_state_topic: "tele/light_lohas_6/STATE"
|
|
effect_value_template: "{{value_json.Scheme}}"
|
|
effect_list: [0, 1, 2, 3, 4]
|
|
|
|
- platform: "mqtt"
|
|
name: "ledvance_1"
|
|
state_topic: "z2m_deconz/ledvance_1"
|
|
availability_topic: "z2m_deconz/bridge/state"
|
|
brightness: true
|
|
color_temp: true
|
|
xy: false
|
|
hs: false
|
|
schema: "json"
|
|
command_topic: "z2m_deconz/ledvance_1/set"
|
|
brightness_scale: 254
|
|
max_mireds: 500
|
|
min_mireds: 150
|
|
|
|
sensor:
|
|
- platform: mqtt
|
|
name: "light_le_1_wifi"
|
|
availability_topic: "tele/light_le_1/LWT"
|
|
device_class: signal_strength
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
state_topic: "tele/light_le_1/STATE"
|
|
unit_of_measurement: "%"
|
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_le_2_wifi"
|
|
availability_topic: "tele/light_le_2/LWT"
|
|
device_class: signal_strength
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
state_topic: "tele/light_le_2/STATE"
|
|
unit_of_measurement: "%"
|
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_le_3_wifi"
|
|
availability_topic: "tele/light_le_3/LWT"
|
|
device_class: signal_strength
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
state_topic: "tele/light_le_3/STATE"
|
|
unit_of_measurement: "%"
|
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_le_4_wifi"
|
|
availability_topic: "tele/light_le_4/LWT"
|
|
device_class: signal_strength
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
state_topic: "tele/light_le_4/STATE"
|
|
unit_of_measurement: "%"
|
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_2_wifi"
|
|
availability_topic: "tele/light_lohas_2/LWT"
|
|
device_class: signal_strength
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
state_topic: "tele/light_lohas_2/STATE"
|
|
unit_of_measurement: "%"
|
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_6_wifi"
|
|
availability_topic: "tele/light_lohas_6/LWT"
|
|
device_class: signal_strength
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
state_topic: "tele/light_lohas_6/STATE"
|
|
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"
|
|
device_class: "signal_strength"
|
|
|
|
## Switch
|
|
|
|
switch:
|
|
- platform: mqtt
|
|
name: "light_le_1_fade"
|
|
availability_topic: "tele/light_le_1/LWT"
|
|
command_topic: "cmnd/light_le_1/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_le_1/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_le_2_fade"
|
|
availability_topic: "tele/light_le_2/LWT"
|
|
command_topic: "cmnd/light_le_2/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_le_2/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_le_3_fade"
|
|
availability_topic: "tele/light_le_3/LWT"
|
|
command_topic: "cmnd/light_le_3/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_le_3/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_le_4_fade"
|
|
availability_topic: "tele/light_le_4/LWT"
|
|
command_topic: "cmnd/light_le_4/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_le_4/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_2_fade"
|
|
availability_topic: "tele/light_lohas_2/LWT"
|
|
command_topic: "cmnd/light_lohas_2/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_lohas_2/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_3_fade"
|
|
availability_topic: "tele/light_lohas_3/LWT"
|
|
command_topic: "cmnd/light_lohas_3/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_lohas_3/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
- platform: mqtt
|
|
name: "light_lohas_6_fade"
|
|
availability_topic: "tele/light_lohas_6/LWT"
|
|
command_topic: "cmnd/light_lohas_6/FADE"
|
|
icon: mdi:gradient
|
|
payload_available: "Online"
|
|
payload_not_available: "Offline"
|
|
qos: 1
|
|
state_topic: "tele/light_lohas_6/STATE"
|
|
value_template: "{{ value_json.Fade }}"
|
|
|
|
automation:
|
|
- alias: Lighting · Sync Tasmota states on start-up
|
|
initial_state: true
|
|
trigger:
|
|
platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "cmnd/tasmotas/STATE"
|
|
payload: ""
|
|
|
|
- alias: Lighting · Sync Zigbee states on start-up
|
|
initial_state: true
|
|
trigger:
|
|
platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_white_1/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_white_2/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_white_4/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_white_5/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_white_6/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_1/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_2/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_3/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_4/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_5/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_6/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_7/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_ambiance_8/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_1/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_2/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_3/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_4/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/hue_5/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/ledvance_1/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/neo_1/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/neo_2/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/light_hallway_main/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/light_hallway_entrance/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/light_kitchen_main/get"
|
|
payload: ""
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "z2m_deconz/light_kitchen_secondary/get"
|
|
payload: ""
|