mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-11-03 19:28:43 +00:00
Replace PC light
This commit is contained in:
@@ -72,11 +72,11 @@ cards:
|
|||||||
- fade: switch.light_le_4_fade
|
- fade: switch.light_le_4_fade
|
||||||
- wifi: sensor.light_le_4_wifi
|
- wifi: sensor.light_le_4_wifi
|
||||||
- type: custom:decluttering-card
|
- type: custom:decluttering-card
|
||||||
template: light_with_fade_and_switch
|
template: light_with_update_and_lqi
|
||||||
variables:
|
variables:
|
||||||
- light: light.pc
|
- light: light.pc
|
||||||
- fade: switch.pc_fade
|
- lqi: sensor.pc_lqi
|
||||||
- wifi: sensor.pc_wifi
|
- update: binary_sensor.pc_update_available
|
||||||
- light.living_room_ambient
|
- light.living_room_ambient
|
||||||
- light.living_room_ambient_main
|
- light.living_room_ambient_main
|
||||||
- type: custom:fold-entity-row
|
- type: custom:fold-entity-row
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ light:
|
|||||||
brightness_scale: 254
|
brightness_scale: 254
|
||||||
|
|
||||||
- platform: "mqtt"
|
- platform: "mqtt"
|
||||||
name: "hue_white_4"
|
name: "pc"
|
||||||
state_topic: "z2m_deconz/hue_white_4"
|
state_topic: "z2m_deconz/hue_white_4"
|
||||||
availability_topic: "z2m_deconz/bridge/state"
|
availability_topic: "z2m_deconz/bridge/state"
|
||||||
brightness: true
|
brightness: true
|
||||||
@@ -286,14 +286,14 @@ sensor:
|
|||||||
value_template: "{{ value_json['update']['state'] }}"
|
value_template: "{{ value_json['update']['state'] }}"
|
||||||
|
|
||||||
- platform: "mqtt"
|
- platform: "mqtt"
|
||||||
name: "hue_white_4_lqi"
|
name: "pc_lqi"
|
||||||
state_topic: "z2m_deconz/hue_white_4"
|
state_topic: "z2m_deconz/hue_white_4"
|
||||||
availability_topic: "z2m_deconz/bridge/state"
|
availability_topic: "z2m_deconz/bridge/state"
|
||||||
value_template: "{{ value_json.linkquality }}"
|
value_template: "{{ value_json.linkquality }}"
|
||||||
unit_of_measurement: "lqi"
|
unit_of_measurement: "lqi"
|
||||||
icon: "mdi:signal"
|
icon: "mdi:signal"
|
||||||
- platform: "mqtt"
|
- platform: "mqtt"
|
||||||
name: "hue_white_4_update_state"
|
name: "pc_update_state"
|
||||||
state_topic: "z2m_deconz/hue_white_4"
|
state_topic: "z2m_deconz/hue_white_4"
|
||||||
availability_topic: "z2m_deconz/bridge/state"
|
availability_topic: "z2m_deconz/bridge/state"
|
||||||
icon: "mdi:update"
|
icon: "mdi:update"
|
||||||
@@ -428,7 +428,7 @@ sensor:
|
|||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: "mqtt"
|
- platform: "mqtt"
|
||||||
name: "hue_white_1_update_available"
|
name: "pc_update_available"
|
||||||
state_topic: "z2m_deconz/hue_white_1"
|
state_topic: "z2m_deconz/hue_white_1"
|
||||||
availability_topic: "z2m_deconz/bridge/state"
|
availability_topic: "z2m_deconz/bridge/state"
|
||||||
payload_on: true
|
payload_on: true
|
||||||
|
|||||||
@@ -108,34 +108,6 @@ light:
|
|||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
|
|
||||||
- platform: mqtt
|
|
||||||
name: "pc"
|
|
||||||
state_topic: "tele/light_lohas_1/STATE"
|
|
||||||
state_value_template: "{{ value_json.POWER }}"
|
|
||||||
command_topic: "cmnd/light_lohas_1/POWER"
|
|
||||||
payload_on: "ON"
|
|
||||||
payload_off: "OFF"
|
|
||||||
availability_topic: "tele/light_lohas_1/LWT"
|
|
||||||
payload_available: "Online"
|
|
||||||
payload_not_available: "Offline"
|
|
||||||
on_command_type: "brightness"
|
|
||||||
brightness_command_topic: "cmnd/light_lohas_1/Dimmer"
|
|
||||||
brightness_state_topic: "tele/light_lohas_1/STATE"
|
|
||||||
brightness_scale: 100
|
|
||||||
brightness_value_template: "{{ value_json.Dimmer }}"
|
|
||||||
hs_command_topic: "cmnd/light_lohas_1/HSBColor"
|
|
||||||
hs_state_topic: "tele/light_lohas_1/STATE"
|
|
||||||
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
|
|
||||||
color_temp_command_topic: "cmnd/light_lohas_1/CT"
|
|
||||||
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/light_lohas_1/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
|
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "light_lohas_2"
|
name: "light_lohas_2"
|
||||||
state_topic: "tele/light_lohas_2/STATE"
|
state_topic: "tele/light_lohas_2/STATE"
|
||||||
@@ -365,16 +337,6 @@ sensor:
|
|||||||
unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||||
|
|
||||||
- platform: mqtt
|
|
||||||
name: "pc_wifi"
|
|
||||||
availability_topic: "tele/light_lohas_1/LWT"
|
|
||||||
device_class: signal_strength
|
|
||||||
payload_available: "Online"
|
|
||||||
payload_not_available: "Offline"
|
|
||||||
state_topic: "tele/light_lohas_1/STATE"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "light_lohas_2_wifi"
|
name: "light_lohas_2_wifi"
|
||||||
availability_topic: "tele/light_lohas_2/LWT"
|
availability_topic: "tele/light_lohas_2/LWT"
|
||||||
@@ -491,17 +453,6 @@ switch:
|
|||||||
state_topic: "stat/light_le_4/RESULT"
|
state_topic: "stat/light_le_4/RESULT"
|
||||||
value_template: "{{ value_json.Fade }}"
|
value_template: "{{ value_json.Fade }}"
|
||||||
|
|
||||||
- platform: mqtt
|
|
||||||
name: "pc_fade"
|
|
||||||
availability_topic: "tele/light_lohas_1/LWT"
|
|
||||||
command_topic: "cmnd/light_lohas_1/FADE"
|
|
||||||
icon: mdi:gradient
|
|
||||||
payload_available: "Online"
|
|
||||||
payload_not_available: "Offline"
|
|
||||||
qos: 1
|
|
||||||
state_topic: "stat/light_lohas_1/RESULT"
|
|
||||||
value_template: "{{ value_json.Fade }}"
|
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "light_lohas_2_fade"
|
name: "light_lohas_2_fade"
|
||||||
availability_topic: "tele/light_lohas_2/LWT"
|
availability_topic: "tele/light_lohas_2/LWT"
|
||||||
|
|||||||
Reference in New Issue
Block a user