mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-06 18:08:45 +00:00
Switch lights - lohas_5 (RIP) with hama_1
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
light:
|
||||
- platform: mqtt
|
||||
name: "PC" # should be hama_1.
|
||||
state_topic: "tele/pc_light/STATE"
|
||||
name: "light_hama_1"
|
||||
state_topic: "tele/light_hama_1/STATE"
|
||||
state_value_template: "{{ value_json.POWER }}"
|
||||
command_topic: "cmnd/pc_light/POWER"
|
||||
command_topic: "cmnd/light_hama_1/POWER"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
availability_topic: "tele/pc_light/LWT"
|
||||
availability_topic: "tele/light_hama_1/LWT"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
on_command_type: "brightness"
|
||||
brightness_command_topic: "cmnd/pc_light/Dimmer"
|
||||
brightness_state_topic: "tele/pc_light/STATE"
|
||||
brightness_command_topic: "cmnd/light_hama_1/Dimmer"
|
||||
brightness_state_topic: "tele/light_hama_1/STATE"
|
||||
brightness_scale: 100
|
||||
brightness_value_template: "{{ value_json.Dimmer }}"
|
||||
hs_command_topic: "cmnd/pc_light/HSBColor"
|
||||
hs_state_topic: "tele/pc_light/STATE"
|
||||
hs_command_topic: "cmnd/light_hama_1/HSBColor"
|
||||
hs_state_topic: "tele/light_hama_1/STATE"
|
||||
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
||||
color_temp_command_topic: "cmnd/pc_light/CT"
|
||||
color_temp_state_topic: "tele/pc_light/STATE"
|
||||
color_temp_command_topic: "cmnd/light_hama_1/CT"
|
||||
color_temp_state_topic: "tele/light_hama_1/STATE"
|
||||
color_temp_value_template: "{{ value_json.CT }}"
|
||||
rgb_command_topic: "cmnd/pc_light/Color"
|
||||
rgb_state_topic: "tele/pc_light/STATE"
|
||||
rgb_command_topic: "cmnd/light_hama_1/Color"
|
||||
rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
@@ -132,7 +132,7 @@ light:
|
||||
color_temp_state_topic: "tele/light_lohas_1/STATE"
|
||||
color_temp_value_template: "{{ value_json.CT }}"
|
||||
rgb_command_topic: "cmnd/light_lohas_1/Color"
|
||||
rgb_state_topic: "tele/pc_light/STATE"
|
||||
rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
@@ -159,7 +159,7 @@ light:
|
||||
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/pc_light/STATE"
|
||||
rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
@@ -186,7 +186,7 @@ light:
|
||||
color_temp_state_topic: "tele/light_lohas_3/STATE"
|
||||
color_temp_value_template: "{{ value_json.CT }}"
|
||||
rgb_command_topic: "cmnd/light_lohas_3/Color"
|
||||
rgb_state_topic: "tele/pc_light/STATE"
|
||||
rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
@@ -213,37 +213,37 @@ light:
|
||||
color_temp_state_topic: "tele/light_lohas_4/STATE"
|
||||
color_temp_value_template: "{{ value_json.CT }}"
|
||||
rgb_command_topic: "cmnd/light_lohas_4/Color"
|
||||
rgb_state_topic: "tele/pc_light/STATE"
|
||||
rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_5"
|
||||
state_topic: "tele/light_lohas_5/STATE"
|
||||
state_value_template: "{{ value_json.POWER }}"
|
||||
command_topic: "cmnd/light_lohas_5/POWER"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
availability_topic: "tele/light_lohas_5/LWT"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
on_command_type: "brightness"
|
||||
brightness_command_topic: "cmnd/light_lohas_5/Dimmer"
|
||||
brightness_state_topic: "tele/light_lohas_5/STATE"
|
||||
brightness_scale: 100
|
||||
brightness_value_template: "{{ value_json.Dimmer }}"
|
||||
hs_command_topic: "cmnd/light_lohas_5/HSBColor"
|
||||
hs_state_topic: "tele/light_lohas_5/STATE"
|
||||
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
||||
color_temp_command_topic: "cmnd/light_lohas_5/CT"
|
||||
color_temp_state_topic: "tele/light_lohas_5/STATE"
|
||||
color_temp_value_template: "{{ value_json.CT }}"
|
||||
rgb_command_topic: "cmnd/light_lohas_5/Color"
|
||||
rgb_state_topic: "tele/pc_light/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
# - platform: mqtt
|
||||
# name: "light_lohas_5"
|
||||
# state_topic: "tele/light_lohas_5/STATE"
|
||||
# state_value_template: "{{ value_json.POWER }}"
|
||||
# command_topic: "cmnd/light_lohas_5/POWER"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# availability_topic: "tele/light_lohas_5/LWT"
|
||||
# payload_available: "Online"
|
||||
# payload_not_available: "Offline"
|
||||
# on_command_type: "brightness"
|
||||
# brightness_command_topic: "cmnd/light_lohas_5/Dimmer"
|
||||
# brightness_state_topic: "tele/light_lohas_5/STATE"
|
||||
# brightness_scale: 100
|
||||
# brightness_value_template: "{{ value_json.Dimmer }}"
|
||||
# hs_command_topic: "cmnd/light_lohas_5/HSBColor"
|
||||
# hs_state_topic: "tele/light_lohas_5/STATE"
|
||||
# hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
||||
# color_temp_command_topic: "cmnd/light_lohas_5/CT"
|
||||
# color_temp_state_topic: "tele/light_lohas_5/STATE"
|
||||
# color_temp_value_template: "{{ value_json.CT }}"
|
||||
# rgb_command_topic: "cmnd/light_lohas_5/Color"
|
||||
# rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
# rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
# qos: 1
|
||||
# retain: false
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_6"
|
||||
@@ -267,7 +267,7 @@ light:
|
||||
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/pc_light/STATE"
|
||||
rgb_state_topic: "tele/light_hama_1/STATE"
|
||||
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||
qos: 1
|
||||
retain: false
|
||||
@@ -324,12 +324,12 @@ light:
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "PC light WiFi"
|
||||
availability_topic: "tele/pc_light/LWT"
|
||||
name: "light_hama_1_wifi"
|
||||
availability_topic: "tele/light_hama_1/LWT"
|
||||
device_class: signal_strength
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/pc_light/STATE"
|
||||
state_topic: "tele/light_hama_1/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
@@ -413,15 +413,15 @@ 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_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"
|
||||
@@ -455,14 +455,14 @@ sensor:
|
||||
|
||||
switch:
|
||||
- platform: mqtt
|
||||
name: "PC Light Fade"
|
||||
availability_topic: "tele/pc_light/LWT"
|
||||
command_topic: "cmnd/pc_light/FADE"
|
||||
name: "light_hama_1_fade"
|
||||
availability_topic: "tele/light_hama_1/LWT"
|
||||
command_topic: "cmnd/light_hama_1/FADE"
|
||||
icon: mdi:gradient
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
qos: 1
|
||||
state_topic: "stat/pc_light/RESULT"
|
||||
state_topic: "stat/light_hama_1/RESULT"
|
||||
value_template: "{{ value_json.Fade }}"
|
||||
|
||||
- platform: mqtt
|
||||
@@ -553,16 +553,16 @@ 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_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"
|
||||
|
||||
Reference in New Issue
Block a user