Update lights setup

This commit is contained in:
2021-10-13 21:51:37 +03:00
parent 6f6c06b6ad
commit 2fe0f40a6d
8 changed files with 165 additions and 195 deletions
@@ -85,12 +85,12 @@ 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_avatar_small_1 - light: light.light_lohas_2
- fade: switch.light_avatar_small_1_fade - fade: switch.light_lohas_2
- wifi: sensor.light_avatar_small_1_wifi - wifi: sensor.light_lohas_2_wifi
entities: entities:
- type: custom:slider-entity-row - type: custom:slider-entity-row
entity: light.light_avatar_small_1 entity: light.light_lohas_2
name: Brightness name: Brightness
hide_state: true hide_state: true
step: 5 step: 5
@@ -243,3 +243,15 @@ cards:
- light: light.hue_1 - light: light.hue_1
- lqi: sensor.hue_1_lqi - lqi: sensor.hue_1_lqi
- update: binary_sensor.hue_1_update_available - update: binary_sensor.hue_1_update_available
- type: entities
title: Guest Bedroom
icon: mdi:door-closed
show_header_toggle: false
entities:
- type: custom:decluttering-card
template: light_with_fade_and_switch
variables:
- light: light.light_lohas_6
- fade: switch.light_lohas_6
- wifi: sensor.light_lohas_6_wifi
@@ -88,7 +88,7 @@
name: Ambient Main name: Ambient Main
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: light.light_avatar_small_1 entity: light.light_lohas_2
name: Ambient 2nd name: Ambient 2nd
- type: vertical-stack - type: vertical-stack
@@ -44,7 +44,7 @@ automation:
{% elif groupId == 3 %} {% elif groupId == 3 %}
{% set entityId = 'light.living_room_ambient_main' %} {% set entityId = 'light.living_room_ambient_main' %}
{% elif groupId == 4 %} {% elif groupId == 4 %}
{% set entityId = 'light.light_avatar_small_1' %} {% set entityId = 'light.light_lohas_2' %}
{% endif %} {% endif %}
{{ entityId }} {{ entityId }}
@@ -80,7 +80,7 @@ automation:
{% elif groupId == 3 %} {% elif groupId == 3 %}
light.living_room_ambient_main light.living_room_ambient_main
{% elif groupId == 4 %} {% elif groupId == 4 %}
light.light_avatar_small_1 light.light_lohas_2
{% endif %} {% endif %}
brightness_pct: 100 brightness_pct: 100
@@ -108,7 +108,7 @@ automation:
{% elif groupId == 3 %} {% elif groupId == 3 %}
{% set entityId = 'light.living_room_ambient_main' %} {% set entityId = 'light.living_room_ambient_main' %}
{% elif groupId == 4 %} {% elif groupId == 4 %}
{% set entityId = 'light.light_avatar_small_1' %} {% set entityId = 'light.light_lohas_2' %}
{% endif %} {% endif %}
{{ entityId }} {{ entityId }}
@@ -2,7 +2,7 @@ scene:
- name: Living Room Ambient Neon - name: Living Room Ambient Neon
icon: "mdi:weather-night" icon: "mdi:weather-night"
entities: entities:
light.light_avatar_small_1: light.light_lohas_2:
state: "on" state: "on"
xy_color: [0.668, 0.284] xy_color: [0.668, 0.284]
brightness_pct: 80 brightness_pct: 80
@@ -13,9 +13,9 @@ scene:
- name: Living Room Ambient Default - name: Living Room Ambient Default
icon: "mdi:weather-sunny" icon: "mdi:weather-sunny"
entities: entities:
light.light_avatar_small_1: light.light_lohas_2:
state: "on" state: "on"
white_value: 255 color_temp: 500
brightness_pct: 100 brightness_pct: 100
light.living_room_ambient_main: light.living_room_ambient_main:
state: "on" state: "on"
@@ -65,7 +65,7 @@ automation:
- service: light.turn_on - service: light.turn_on
entity_id: entity_id:
- light.bed_led - light.bed_led
- light.light_avatar_small_1 # living room ambient Secondary - light.light_lohas_2 # living room ambient Secondary
- light.hue_1 # Hallway - light.hue_1 # Hallway
- light.neo_1 # Kitchen - light.neo_1 # Kitchen
- light.neo_2 # Kitchen - light.neo_2 # Kitchen
@@ -83,7 +83,7 @@ light:
name: Living room ambient name: Living room ambient
entities: entities:
- light.living_room_ambient_main - light.living_room_ambient_main
- light.light_avatar_small_1 - light.light_lohas_2
- platform: group - platform: group
name: Living room name: Living room
@@ -263,7 +263,7 @@ homeassistant:
light.living_room_ambient: light.living_room_ambient:
icon: mdi:floor-lamp-dual icon: mdi:floor-lamp-dual
light.light_avatar_small_1: light.light_lohas_2:
friendly_name: Living room ambient secondary friendly_name: Living room ambient secondary
# Master bedroom # Master bedroom
@@ -293,3 +293,7 @@ homeassistant:
light.hallway_main: light.hallway_main:
icon: bha:ceiling-spot-lamp icon: bha:ceiling-spot-lamp
# Guest Bedroom
light.light_lohas_6:
icon: bha:table-lamp-variant
+133 -179
View File
@@ -1,28 +1,28 @@
light: light:
- platform: mqtt # - platform: mqtt
name: "light_hama_1" # name: "light_hama_1"
state_topic: "stat/light_hama_1/RESULT" # state_topic: "stat/light_hama_1/RESULT"
state_value_template: "{{ value_json.POWER }}" # state_value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/light_hama_1/POWER" # command_topic: "cmnd/light_hama_1/POWER"
payload_on: "ON" # payload_on: "ON"
payload_off: "OFF" # payload_off: "OFF"
availability_topic: "tele/light_hama_1/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/light_hama_1/Dimmer" # brightness_command_topic: "cmnd/light_hama_1/Dimmer"
brightness_state_topic: "tele/light_hama_1/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 }}"
color_temp_command_topic: "cmnd/light_hama_1/CT" # color_temp_command_topic: "cmnd/light_hama_1/CT"
color_temp_state_topic: "tele/light_hama_1/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/light_hama_1/Color" # rgb_command_topic: "cmnd/light_hama_1/Color"
rgb_state_topic: "tele/light_hama_1/STATE" # rgb_state_topic: "tele/light_hama_1/STATE"
rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}" # rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}"
rgb_value_template: "{{ (value_json.Color[0]|int(base=16),value_json.Color[1]|int(base=16),value_json.Color[2]|int(base=16)) | join(',')}}" # rgb_value_template: "{{ (value_json.Color[0]|int(base=16),value_json.Color[1]|int(base=16),value_json.Color[2]|int(base=16)) | join(',')}}"
qos: 1 # qos: 1
retain: false # retain: false
- platform: mqtt - platform: mqtt
name: "light_le_1" name: "light_le_1"
@@ -129,68 +129,68 @@ light:
color_temp_command_topic: "cmnd/light_lohas_2/CT" color_temp_command_topic: "cmnd/light_lohas_2/CT"
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/light_lohas_2/STATE" # rgb_state_topic: "tele/light_lohas_2/STATE"
rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}" # 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(',')}}" # 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 qos: 1
retain: false retain: false
- platform: mqtt # - platform: mqtt
name: "light_lohas_3" # name: "light_lohas_3"
state_topic: "tele/light_lohas_3/STATE" # state_topic: "tele/light_lohas_3/STATE"
state_value_template: "{{ value_json.POWER }}" # state_value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/light_lohas_3/POWER" # command_topic: "cmnd/light_lohas_3/POWER"
payload_on: "ON" # payload_on: "ON"
payload_off: "OFF" # payload_off: "OFF"
availability_topic: "tele/light_lohas_3/LWT" # availability_topic: "tele/light_lohas_3/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_3/Dimmer" # brightness_command_topic: "cmnd/light_lohas_3/Dimmer"
brightness_state_topic: "tele/light_lohas_3/STATE" # brightness_state_topic: "tele/light_lohas_3/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_3/HSBColor" # hs_command_topic: "cmnd/light_lohas_3/HSBColor"
hs_state_topic: "tele/light_lohas_3/STATE" # hs_state_topic: "tele/light_lohas_3/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_3/CT" # color_temp_command_topic: "cmnd/light_lohas_3/CT"
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/light_lohas_3/STATE" # rgb_state_topic: "tele/light_lohas_3/STATE"
rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}" # 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(',')}}" # 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 # qos: 1
retain: false # retain: false
- platform: mqtt # - platform: mqtt
name: "light_lohas_4" # name: "light_lohas_4"
state_topic: "tele/light_lohas_4/STATE" # state_topic: "tele/light_lohas_4/STATE"
state_value_template: "{{ value_json.POWER }}" # state_value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/light_lohas_4/POWER" # command_topic: "cmnd/light_lohas_4/POWER"
payload_on: "ON" # payload_on: "ON"
payload_off: "OFF" # payload_off: "OFF"
availability_topic: "tele/light_lohas_4/LWT" # availability_topic: "tele/light_lohas_4/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_4/Dimmer" # brightness_command_topic: "cmnd/light_lohas_4/Dimmer"
brightness_state_topic: "tele/light_lohas_4/STATE" # brightness_state_topic: "tele/light_lohas_4/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_4/HSBColor" # hs_command_topic: "cmnd/light_lohas_4/HSBColor"
hs_state_topic: "tele/light_lohas_4/STATE" # hs_state_topic: "tele/light_lohas_4/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_4/CT" # color_temp_command_topic: "cmnd/light_lohas_4/CT"
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/light_lohas_4/STATE" # rgb_state_topic: "tele/light_lohas_4/STATE"
rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}" # 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(',')}}" # 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 # qos: 1
retain: false # retain: false
# - platform: mqtt # - platform: mqtt
# name: "light_lohas_5" # name: "light_lohas_5"
@@ -240,35 +240,10 @@ light:
color_temp_command_topic: "cmnd/light_lohas_6/CT" color_temp_command_topic: "cmnd/light_lohas_6/CT"
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/light_lohas_6/STATE" # rgb_state_topic: "tele/light_lohas_6/STATE"
rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}" # 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(',')}}" # 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
- platform: mqtt
name: "light_avatar_small_1"
availability_topic: "tele/light_avatar_small_1/LWT"
command_topic: "cmnd/light_avatar_small_1/POWER"
state_topic: "tele/light_avatar_small_1/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/light_avatar_small_1/Dimmer"
brightness_state_topic: "tele/light_avatar_small_1/STATE"
brightness_scale: 100
brightness_value_template: "{{ value_json.Dimmer }}"
on_command_type: "brightness"
white_value_command_topic: "cmnd/light_avatar_small_1/WHITE"
white_value_scale: 100
white_value_state_topic: "tele/light_avatar_small_1/STATE"
white_value_template: "{{ value_json.White }}"
rgb_command_topic: "cmnd/light_avatar_small_1/Color"
rgb_state_topic: "tele/light_avatar_small_1/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 qos: 1
retain: false retain: false
@@ -287,15 +262,15 @@ light:
min_mireds: 150 min_mireds: 150
sensor: sensor:
- platform: mqtt # - platform: mqtt
name: "light_hama_1_wifi" # name: "light_hama_1_wifi"
availability_topic: "tele/light_hama_1/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/light_hama_1/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 }}"
- platform: mqtt - platform: mqtt
name: "light_le_1_wifi" name: "light_le_1_wifi"
@@ -347,25 +322,25 @@ 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_3_wifi" # name: "light_lohas_3_wifi"
availability_topic: "tele/light_lohas_3/LWT" # availability_topic: "tele/light_lohas_3/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_3/STATE" # state_topic: "tele/light_lohas_3/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_4_wifi" # name: "light_lohas_4_wifi"
availability_topic: "tele/light_lohas_4/LWT" # availability_topic: "tele/light_lohas_4/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_4/STATE" # state_topic: "tele/light_lohas_4/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"
@@ -377,16 +352,6 @@ sensor:
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json.Wifi.RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt
name: "light_avatar_small_1_wifi"
availability_topic: "tele/light_avatar_small_1/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/light_avatar_small_1/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json.Wifi.RSSI }}"
- platform: "mqtt" - platform: "mqtt"
name: "ledvance_1_lqi" name: "ledvance_1_lqi"
state_topic: "z2m_deconz/ledvance_1" state_topic: "z2m_deconz/ledvance_1"
@@ -398,16 +363,16 @@ sensor:
## Switch ## Switch
switch: switch:
- platform: mqtt # - platform: mqtt
name: "light_hama_1_fade" # name: "light_hama_1_fade"
availability_topic: "tele/light_hama_1/LWT" # availability_topic: "tele/light_hama_1/LWT"
command_topic: "cmnd/light_hama_1/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/light_hama_1/RESULT" # state_topic: "stat/light_hama_1/RESULT"
value_template: "{{ value_json.Fade }}" # value_template: "{{ value_json.Fade }}"
- platform: mqtt - platform: mqtt
name: "light_le_1_fade" name: "light_le_1_fade"
@@ -475,16 +440,16 @@ switch:
state_topic: "stat/light_lohas_3/RESULT" state_topic: "stat/light_lohas_3/RESULT"
value_template: "{{ value_json.Fade }}" value_template: "{{ value_json.Fade }}"
- platform: mqtt # - platform: mqtt
name: "light_lohas_4_fade" # name: "light_lohas_4_fade"
availability_topic: "tele/light_lohas_4/LWT" # availability_topic: "tele/light_lohas_4/LWT"
command_topic: "cmnd/light_lohas_4/FADE" # command_topic: "cmnd/light_lohas_4/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_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_6_fade" name: "light_lohas_6_fade"
@@ -497,17 +462,6 @@ switch:
state_topic: "stat/light_lohas_6/RESULT" state_topic: "stat/light_lohas_6/RESULT"
value_template: "{{ value_json.Fade }}" value_template: "{{ value_json.Fade }}"
- platform: mqtt
name: "light_avatar_small_1_fade"
availability_topic: "tele/light_avatar_small_1/LWT"
command_topic: "cmnd/light_avatar_small_1/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/light_avatar_small_1/RESULT"
value_template: "{{ value_json.Fade }}"
automation: automation:
- alias: Lighting · Sync Tasmota states on start-up - alias: Lighting · Sync Tasmota states on start-up
initial_state: true initial_state: true
+2 -2
View File
@@ -25,7 +25,7 @@ automation:
- light.living_room_main - light.living_room_main
- light.pc - light.pc
- light.living_room_ambient_main - light.living_room_ambient_main
- light.light_avatar_small_1 - light.light_lohas_2
- light.hallway_entrance - light.hallway_entrance
- light.hallway_main - light.hallway_main
- light.master_bedroom_main - light.master_bedroom_main
@@ -40,7 +40,7 @@ automation:
entity_id: entity_id:
- light.pc - light.pc
- light.living_room_ambient_main - light.living_room_ambient_main
- light.light_avatar_small_1 - light.light_lohas_2
- light.hallway_main - light.hallway_main
- service: light.turn_off - service: light.turn_off
entity_id: entity_id: