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:
@@ -210,9 +210,9 @@ cards:
|
|||||||
- type: custom:decluttering-card
|
- type: custom:decluttering-card
|
||||||
template: light_with_fade_and_switch
|
template: light_with_fade_and_switch
|
||||||
variables:
|
variables:
|
||||||
- light: light.light_lohas_5
|
- light: light.light_hama_1
|
||||||
- fade: switch.light_lohas_5_fade
|
- fade: switch.light_hama_1_fade
|
||||||
- wifi: sensor.light_lohas_5_wifi
|
- wifi: sensor.light_hama_1_wifi
|
||||||
- type: custom:decluttering-card
|
- type: custom:decluttering-card
|
||||||
template: light_with_fade_and_switch
|
template: light_with_fade_and_switch
|
||||||
variables:
|
variables:
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ light:
|
|||||||
- platform: group
|
- platform: group
|
||||||
name: Hallway entrance
|
name: Hallway entrance
|
||||||
entities:
|
entities:
|
||||||
- light.light_lohas_5
|
# - light.light_lohas_5
|
||||||
|
- light.light_hama_1
|
||||||
- light.light_lohas_6
|
- light.light_lohas_6
|
||||||
|
|
||||||
- platform: group
|
- platform: group
|
||||||
@@ -174,7 +175,9 @@ homeassistant:
|
|||||||
|
|
||||||
light.hallway_entrance:
|
light.hallway_entrance:
|
||||||
icon: bha:ceiling-lamp-plafond
|
icon: bha:ceiling-lamp-plafond
|
||||||
light.light_lohas_5:
|
# light.light_lohas_5:
|
||||||
|
# friendly_name: Entrance 1
|
||||||
|
light.light_hama_1:
|
||||||
friendly_name: Entrance 1
|
friendly_name: Entrance 1
|
||||||
light.light_lohas_6:
|
light.light_lohas_6:
|
||||||
friendly_name: Entrance 2
|
friendly_name: Entrance 2
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
light:
|
light:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "PC" # should be hama_1.
|
name: "light_hama_1"
|
||||||
state_topic: "tele/pc_light/STATE"
|
state_topic: "tele/light_hama_1/STATE"
|
||||||
state_value_template: "{{ value_json.POWER }}"
|
state_value_template: "{{ value_json.POWER }}"
|
||||||
command_topic: "cmnd/pc_light/POWER"
|
command_topic: "cmnd/light_hama_1/POWER"
|
||||||
payload_on: "ON"
|
payload_on: "ON"
|
||||||
payload_off: "OFF"
|
payload_off: "OFF"
|
||||||
availability_topic: "tele/pc_light/LWT"
|
availability_topic: "tele/light_hama_1/LWT"
|
||||||
payload_available: "Online"
|
payload_available: "Online"
|
||||||
payload_not_available: "Offline"
|
payload_not_available: "Offline"
|
||||||
on_command_type: "brightness"
|
on_command_type: "brightness"
|
||||||
brightness_command_topic: "cmnd/pc_light/Dimmer"
|
brightness_command_topic: "cmnd/light_hama_1/Dimmer"
|
||||||
brightness_state_topic: "tele/pc_light/STATE"
|
brightness_state_topic: "tele/light_hama_1/STATE"
|
||||||
brightness_scale: 100
|
brightness_scale: 100
|
||||||
brightness_value_template: "{{ value_json.Dimmer }}"
|
brightness_value_template: "{{ value_json.Dimmer }}"
|
||||||
hs_command_topic: "cmnd/pc_light/HSBColor"
|
hs_command_topic: "cmnd/light_hama_1/HSBColor"
|
||||||
hs_state_topic: "tele/pc_light/STATE"
|
hs_state_topic: "tele/light_hama_1/STATE"
|
||||||
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
||||||
color_temp_command_topic: "cmnd/pc_light/CT"
|
color_temp_command_topic: "cmnd/light_hama_1/CT"
|
||||||
color_temp_state_topic: "tele/pc_light/STATE"
|
color_temp_state_topic: "tele/light_hama_1/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/pc_light/Color"
|
rgb_command_topic: "cmnd/light_hama_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(',') }}"
|
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
@@ -132,7 +132,7 @@ light:
|
|||||||
color_temp_state_topic: "tele/light_lohas_1/STATE"
|
color_temp_state_topic: "tele/light_lohas_1/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/light_lohas_1/Color"
|
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(',') }}"
|
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
@@ -159,7 +159,7 @@ light:
|
|||||||
color_temp_state_topic: "tele/light_lohas_2/STATE"
|
color_temp_state_topic: "tele/light_lohas_2/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/light_lohas_2/Color"
|
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(',') }}"
|
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
@@ -186,7 +186,7 @@ light:
|
|||||||
color_temp_state_topic: "tele/light_lohas_3/STATE"
|
color_temp_state_topic: "tele/light_lohas_3/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/light_lohas_3/Color"
|
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(',') }}"
|
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
@@ -213,37 +213,37 @@ light:
|
|||||||
color_temp_state_topic: "tele/light_lohas_4/STATE"
|
color_temp_state_topic: "tele/light_lohas_4/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/light_lohas_4/Color"
|
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(',') }}"
|
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
|
|
||||||
- platform: mqtt
|
# - platform: mqtt
|
||||||
name: "light_lohas_5"
|
# name: "light_lohas_5"
|
||||||
state_topic: "tele/light_lohas_5/STATE"
|
# state_topic: "tele/light_lohas_5/STATE"
|
||||||
state_value_template: "{{ value_json.POWER }}"
|
# state_value_template: "{{ value_json.POWER }}"
|
||||||
command_topic: "cmnd/light_lohas_5/POWER"
|
# command_topic: "cmnd/light_lohas_5/POWER"
|
||||||
payload_on: "ON"
|
# payload_on: "ON"
|
||||||
payload_off: "OFF"
|
# payload_off: "OFF"
|
||||||
availability_topic: "tele/light_lohas_5/LWT"
|
# availability_topic: "tele/light_lohas_5/LWT"
|
||||||
payload_available: "Online"
|
# payload_available: "Online"
|
||||||
payload_not_available: "Offline"
|
# payload_not_available: "Offline"
|
||||||
on_command_type: "brightness"
|
# on_command_type: "brightness"
|
||||||
brightness_command_topic: "cmnd/light_lohas_5/Dimmer"
|
# brightness_command_topic: "cmnd/light_lohas_5/Dimmer"
|
||||||
brightness_state_topic: "tele/light_lohas_5/STATE"
|
# brightness_state_topic: "tele/light_lohas_5/STATE"
|
||||||
brightness_scale: 100
|
# brightness_scale: 100
|
||||||
brightness_value_template: "{{ value_json.Dimmer }}"
|
# brightness_value_template: "{{ value_json.Dimmer }}"
|
||||||
hs_command_topic: "cmnd/light_lohas_5/HSBColor"
|
# hs_command_topic: "cmnd/light_lohas_5/HSBColor"
|
||||||
hs_state_topic: "tele/light_lohas_5/STATE"
|
# hs_state_topic: "tele/light_lohas_5/STATE"
|
||||||
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
# hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
||||||
color_temp_command_topic: "cmnd/light_lohas_5/CT"
|
# color_temp_command_topic: "cmnd/light_lohas_5/CT"
|
||||||
color_temp_state_topic: "tele/light_lohas_5/STATE"
|
# color_temp_state_topic: "tele/light_lohas_5/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
# color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/light_lohas_5/Color"
|
# rgb_command_topic: "cmnd/light_lohas_5/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(',') }}"
|
# rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
# qos: 1
|
||||||
retain: false
|
# retain: false
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "light_lohas_6"
|
name: "light_lohas_6"
|
||||||
@@ -267,7 +267,7 @@ light:
|
|||||||
color_temp_state_topic: "tele/light_lohas_6/STATE"
|
color_temp_state_topic: "tele/light_lohas_6/STATE"
|
||||||
color_temp_value_template: "{{ value_json.CT }}"
|
color_temp_value_template: "{{ value_json.CT }}"
|
||||||
rgb_command_topic: "cmnd/light_lohas_6/Color"
|
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(',') }}"
|
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
|
||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
@@ -324,12 +324,12 @@ light:
|
|||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "PC light WiFi"
|
name: "light_hama_1_wifi"
|
||||||
availability_topic: "tele/pc_light/LWT"
|
availability_topic: "tele/light_hama_1/LWT"
|
||||||
device_class: signal_strength
|
device_class: signal_strength
|
||||||
payload_available: "Online"
|
payload_available: "Online"
|
||||||
payload_not_available: "Offline"
|
payload_not_available: "Offline"
|
||||||
state_topic: "tele/pc_light/STATE"
|
state_topic: "tele/light_hama_1/STATE"
|
||||||
unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||||
|
|
||||||
@@ -413,15 +413,15 @@ sensor:
|
|||||||
unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||||
|
|
||||||
- platform: mqtt
|
# - platform: mqtt
|
||||||
name: "light_lohas_5_wifi"
|
# name: "light_lohas_5_wifi"
|
||||||
availability_topic: "tele/light_lohas_5/LWT"
|
# availability_topic: "tele/light_lohas_5/LWT"
|
||||||
device_class: signal_strength
|
# device_class: signal_strength
|
||||||
payload_available: "Online"
|
# payload_available: "Online"
|
||||||
payload_not_available: "Offline"
|
# payload_not_available: "Offline"
|
||||||
state_topic: "tele/light_lohas_5/STATE"
|
# state_topic: "tele/light_lohas_5/STATE"
|
||||||
unit_of_measurement: "%"
|
# unit_of_measurement: "%"
|
||||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
# value_template: "{{ value_json.Wifi.RSSI }}"
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "light_lohas_6_wifi"
|
name: "light_lohas_6_wifi"
|
||||||
@@ -455,14 +455,14 @@ sensor:
|
|||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "PC Light Fade"
|
name: "light_hama_1_fade"
|
||||||
availability_topic: "tele/pc_light/LWT"
|
availability_topic: "tele/light_hama_1/LWT"
|
||||||
command_topic: "cmnd/pc_light/FADE"
|
command_topic: "cmnd/light_hama_1/FADE"
|
||||||
icon: mdi:gradient
|
icon: mdi:gradient
|
||||||
payload_available: "Online"
|
payload_available: "Online"
|
||||||
payload_not_available: "Offline"
|
payload_not_available: "Offline"
|
||||||
qos: 1
|
qos: 1
|
||||||
state_topic: "stat/pc_light/RESULT"
|
state_topic: "stat/light_hama_1/RESULT"
|
||||||
value_template: "{{ value_json.Fade }}"
|
value_template: "{{ value_json.Fade }}"
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
@@ -553,16 +553,16 @@ switch:
|
|||||||
state_topic: "stat/light_lohas_4/RESULT"
|
state_topic: "stat/light_lohas_4/RESULT"
|
||||||
value_template: "{{ value_json.Fade }}"
|
value_template: "{{ value_json.Fade }}"
|
||||||
|
|
||||||
- platform: mqtt
|
# - platform: mqtt
|
||||||
name: "light_lohas_5_fade"
|
# name: "light_lohas_5_fade"
|
||||||
availability_topic: "tele/light_lohas_5/LWT"
|
# availability_topic: "tele/light_lohas_5/LWT"
|
||||||
command_topic: "cmnd/light_lohas_5/FADE"
|
# command_topic: "cmnd/light_lohas_5/FADE"
|
||||||
icon: mdi:gradient
|
# icon: mdi:gradient
|
||||||
payload_available: "Online"
|
# payload_available: "Online"
|
||||||
payload_not_available: "Offline"
|
# payload_not_available: "Offline"
|
||||||
qos: 1
|
# qos: 1
|
||||||
state_topic: "stat/light_lohas_5/RESULT"
|
# state_topic: "stat/light_lohas_5/RESULT"
|
||||||
value_template: "{{ value_json.Fade }}"
|
# value_template: "{{ value_json.Fade }}"
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "light_lohas_6_fade"
|
name: "light_lohas_6_fade"
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ automation:
|
|||||||
- light.light_lohas_2
|
- light.light_lohas_2
|
||||||
- light.light_lohas_3
|
- light.light_lohas_3
|
||||||
- light.light_lohas_4
|
- light.light_lohas_4
|
||||||
- light.light_lohas_5
|
|
||||||
- light.light_lohas_6
|
|
||||||
- light.light_le_1
|
- light.light_le_1
|
||||||
- light.light_le_2
|
- light.light_le_2
|
||||||
- light.light_le_3
|
- light.light_le_3
|
||||||
@@ -46,9 +44,6 @@ automation:
|
|||||||
- service: script.lighting_temperature_adjust
|
- service: script.lighting_temperature_adjust
|
||||||
data:
|
data:
|
||||||
entity_id: light.living_room_main
|
entity_id: light.living_room_main
|
||||||
- service: script.lighting_temperature_adjust
|
|
||||||
data:
|
|
||||||
entity_id: light.hallway_entrance
|
|
||||||
- service: logbook.log
|
- service: logbook.log
|
||||||
data_template:
|
data_template:
|
||||||
name: "💡 Lighting Module · "
|
name: "💡 Lighting Module · "
|
||||||
|
|||||||
Reference in New Issue
Block a user