Rename all lights with shorter names. Add Ambient light in LR

This commit is contained in:
2020-05-09 03:31:56 +03:00
parent 42d285579e
commit 6b5d613de6
31 changed files with 513 additions and 305 deletions
+3 -3
View File
@@ -52,7 +52,7 @@ automation:
state: "light"
action:
- service: light.toggle
entity_id: light.living_room_all_lights
entity_id: light.living_room
- alias: Magic Cube · Lighting · Dim on rotate left
trigger:
@@ -72,7 +72,7 @@ automation:
state: "light"
action:
- service: light.turn_on
entity_id: light.living_room_all_lights
entity_id: light.living_room
data:
brightness_step_pct: -20
@@ -94,7 +94,7 @@ automation:
state: "light"
action:
- service: light.turn_on
entity_id: light.living_room_all_lights
entity_id: light.living_room
data:
brightness_step_pct: 20
+3 -3
View File
@@ -18,7 +18,7 @@ automation:
scene_data: 0
action:
- service: light.toggle
entity_id: light.living_room_all_lights
entity_id: light.living_room
- alias: Wallmote · Living room · 1 · Hold · Dim lights
trigger:
@@ -31,11 +31,11 @@ automation:
scene_data: 1
action:
- service: light.turn_on
entity_id: light.living_room_all_lights
entity_id: light.living_room
data_template:
brightness: >
{% if state_attr('light.living_room_main_lights', 'brightness') < 255 %}
{% if state_attr('light.living_room_main', 'brightness') < 255 %}
255
{% else %}
120
+15 -16
View File
@@ -2,15 +2,14 @@ alexa:
smart_home:
filter:
include_entities:
- light.ceiling_lights
- light.living_room_main_lights
- light.pc
- light.master_bedroom_main_lights
- light.bedside_light
- light.tuya_kitchen_all_lights
- light.hallway_entrance_lights
- light.hallway_all_lights
- light.tuya_hallway_main_lights
- light.ceiling
- light.living_room_main
- light.master_bedroom_main
- light.bedside
- light.tuya_kitchen
- light.hallway_entrance
- light.hallway
- light.tuya_hallway_main
- switch.camera
@@ -43,19 +42,19 @@ alexa:
- script.titanium_start
entity_config:
light.ceiling_lights:
light.ceiling:
name: "Ceiling"
light.living_room_main_lights:
light.living_room_main:
name: "Living room"
light.master_bedroom_main_lights:
light.master_bedroom_main:
name: "Bedroom"
light.tuya_kitchen_all_lights:
light.tuya_kitchen:
name: "Kitchen"
light.hallway_all_lights:
light.hallway:
name: "Hallway"
light.hallway_entrance_lights:
light.hallway_entrance:
name: "Entrance"
light.tuya_hallway_main_lights:
light.tuya_hallway_main:
name: "Hallway main"
media_player.master_bedroom:
name: "Bedroom Sonos"
@@ -10,7 +10,7 @@ automation:
state: 'day'
action:
- service: light.turn_on
entity_id: light.hallway_all_lights
entity_id: light.hallway
- alias: Lighting · Hallway · Day mode · Motion · Turn lights off
trigger:
@@ -25,7 +25,7 @@ automation:
state: 'day'
action:
- service: light.turn_off
entity_id: light.hallway_all_lights
entity_id: light.hallway
- alias: Lighting · Hallway · Night mode · Motion · Turn lights on
trigger:
@@ -24,7 +24,7 @@ automation:
action:
- service: light.turn_on
entity_id:
- light.tuya_kitchen_all_lights
- light.tuya_kitchen
- light.browser_kitchen
data:
brightness_pct: 100
@@ -42,7 +42,7 @@ automation:
state: "day"
action:
- service: light.turn_off
entity_id: light.tuya_kitchen_all_lights
entity_id: light.tuya_kitchen
- service: light.turn_on
entity_id: light.browser_kitchen
data:
@@ -3,12 +3,12 @@ script:
icon: "mdi:weather-night"
sequence:
- service: light.turn_on
entity_id: light.master_bedroom_main_lights
entity_id: light.master_bedroom_main
data:
rgb_color: [255, 0, 190]
brightness_pct: 40
- service: light.turn_on
entity_id: light.bedside_light
entity_id: light.bedside
data:
xy_color: [0.384, 0.159]
brightness_pct: 1
@@ -31,13 +31,13 @@ script:
sequence:
- service: light.turn_on
entity_id:
- light.master_bedroom_main_lights
- light.master_bedroom_main
- light.bed_led
data:
color_temp: 500
brightness_pct: 100
- service: light.turn_on
entity_id: light.bedside_light
entity_id: light.bedside
data:
color_temp: 500
brightness_pct: 20
@@ -56,9 +56,9 @@ automation:
entity_id: >-
{% if is_state('input_select.house_mode', 'day') %}
light.master_bedroom_main_lights
light.master_bedroom_main
{% elif is_state('input_select.house_mode', 'bed') %}
light.bedside_light, light.bed_led
light.bedside, light.bed_led
{% elif is_state('input_select.house_mode', 'night') %}
light.bed_led
{% endif %}
@@ -2,7 +2,9 @@
yeelight:
devices:
!secret yeelight_bedside_ip:
name: Bedside light
name: Bedside
!secret yeelight_living_room_ip:
name: Living room Ambient main
# https://www.home-assistant.io/integrations/tuya
tuya:
@@ -1,6 +1,6 @@
light:
- platform: group
name: Living room main lights
name: Living room main
entities:
- light.light_le_1
- light.light_le_2
@@ -8,13 +8,25 @@ light:
- light.light_le_4
- platform: group
name: Living room all lights
name: Living room ceiling
entities:
- light.living_room_main_lights
- light.pc
- light.living_room_main
- light.light_avatar_small_2
- platform: group
name: Master bedroom main lights
name: Living room ambient
entities:
- light.living_room_ambient_main
- light.light_avatar_small_1
- platform: group
name: Living room
entities:
- light.living_room_ceiling
- light.living_room_ambient
- platform: group
name: Master bedroom main
entities:
- light.light_lohas_1
- light.light_lohas_2
@@ -22,21 +34,21 @@ light:
- light.light_lohas_4
- platform: group
name: Master bedroom all lights
name: Master bedroom
entities:
- light.master_bedroom_main_lights
- light.bedside_light
- light.master_bedroom_main
- light.bedside
- light.bed_led
- platform: group
name: Kitchen main lights
name: Kitchen main
entities:
- light.light_le_11
- light.light_le_12
- light.light_orbecco_1
- platform: group
name: Kitchen secondary lights
name: Kitchen secondary
entities:
- light.light_le_5
- light.light_le_6
@@ -44,77 +56,134 @@ light:
- light.light_le_10
- platform: group
name: Tuya Kitchen all lights
name: Tuya Kitchen
entities:
- light.tuya_kitchen_main_lights
- light.tuya_kitchen_secondary_lights
- light.tuya_kitchen_main
- light.tuya_kitchen_secondary
- platform: group
name: Hallway entrance lights
name: Hallway entrance
entities:
- light.light_lohas_5
- light.light_lohas_6
- platform: group
name: Hallway main lights
name: Hallway main
entities:
- light.light_le_7
- light.light_le_8
- platform: group
name: Hallway all lights
name: Hallway
entities:
- light.hallway_entrance_lights
- light.tuya_hallway_main_lights
- light.hallway_entrance
- light.tuya_hallway_main
- platform: group
name: On after dark
entities:
- light.living_room_all_lights
- light.master_bedroom_main_lights
- light.hallway_all_lights
- light.living_room
- light.master_bedroom_main
- light.hallway
- platform: group
name: Ceiling lights
name: Ceiling
entities:
- light.living_room_all_lights
- light.master_bedroom_main_lights
- light.tuya_kitchen_all_lights
- light.hallway_all_lights
- light.living_room_main
- light.light_avatar_small_2
- light.master_bedroom_main
- light.tuya_kitchen
- light.hallway
- platform: group
name: All lights
name: All
entities:
- light.living_room_all_lights
- light.master_bedroom_all_lights
- light.tuya_kitchen_all_lights
- light.hallway_all_lights
- light.living_room
- light.master_bedroom
- light.tuya_kitchen
- light.hallway
homeassistant:
customize:
light.living_room_main_lights:
icon: bha:ceiling-lamp-plafond
light.living_room_all_lights:
icon: bha:ceiling-lamp-plafond
light.master_bedroom_all_lights:
icon: bha:ceiling-lamp-plafond
light.master_bedroom_main_lights:
icon: bha:ceiling-lamp-plafond
light.kitchen_main_lights:
icon: bha:ceiling-lamp-plafond
light.kitchen_secondary_lights:
icon: bha:ceiling-lamp-plafond
light.tuya_kitchen_all_lights:
icon: bha:ceiling-lamp-plafond
light.hallway_entrance_lights:
icon: bha:ceiling-lamp-plafond
light.hallway_main_lights:
icon: bha:ceiling-lamp-plafond
light.hallway_all_lights:
icon: bha:ceiling-lamp-plafond
light.ceiling_lights:
light.ceiling:
icon: mdi:ceiling-light
light.pc:
# Living room
light.living_room:
icon: bha:ceiling-lamp-plafond
light.living_room_ceiling:
icon: mdi:ceiling-light
light.living_room_main:
icon: bha:ceiling-lamp-plafond
light.light_le_1:
friendly_name: Living room 1
light.light_le_2:
friendly_name: Living room 2
light.light_le_3:
friendly_name: Living room 3
light.light_le_4:
friendly_name: Living room 4
light.light_avatar_small_2:
friendly_name: PC
icon: bha:outdoor-lamp-variant
light.bedside_light:
light.living_room_ambient:
icon: mdi:floor-lamp-dual
light.light_avatar_small_1:
friendly_name: Living room ambient secondary
# Out of comission
# light.pc:
# icon: bha:outdoor-lamp-variant
# Master bedroom
light.master_bedroom:
friendly_name: Bedroom
icon: bha:ceiling-lamp-plafond
light.master_bedroom_main:
friendly_name: Bedroom main
icon: bha:ceiling-lamp-plafond
light.light_lohas_1:
friendly_name: Bedroom 1
light.light_lohas_2:
friendly_name: Bedroom 2
light.light_lohas_3:
friendly_name: Bedroom 3
light.light_lohas_4:
friendly_name: Bedroom 4
light.bedside:
icon: mdi:desk-lamp
# Kitchen
light.kitchen_main:
icon: bha:ceiling-lamp-plafond
light.kitchen_secondary:
icon: bha:ceiling-lamp-plafond
light.tuya_kitchen:
icon: bha:ceiling-lamp-plafond
# Hallway
light.hallway:
icon: bha:ceiling-lamp-plafond
light.hallway_entrance:
icon: bha:ceiling-lamp-plafond
light.light_lohas_5:
friendly_name: Entrance 1
light.light_lohas_6:
friendly_name: Entrance 2
light.hallway_main:
icon: bha:ceiling-lamp-plafond
light.light_le_7:
friendly_name: Hallway 1
light.light_le_8:
friendly_name: Hallway 2
+167 -74
View File
@@ -1,14 +1,18 @@
light:
- platform: mqtt
name: "PC"
availability_topic: "tele/pc_light/LWT"
command_topic: "cmnd/pc_light/POWER"
name: "PC" # should be hama_1.
state_topic: "tele/pc_light/STATE"
state_value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/pc_light/POWER"
payload_on: "ON"
payload_off: "OFF"
availability_topic: "tele/pc_light/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_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/pc_light/HSBColor"
hs_state_topic: "tele/pc_light/STATE"
@@ -19,107 +23,107 @@ light:
rgb_command_topic: "cmnd/pc_light/Color"
rgb_state_topic: "tele/pc_light/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
retain: false
- platform: mqtt
name: "light_le_1"
availability_topic: "tele/light_le_1/LWT"
command_topic: "cmnd/light_le_1/POWER"
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
on_command_type: "brightness"
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 }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "light_le_2"
availability_topic: "tele/light_le_2/LWT"
command_topic: "cmnd/light_le_2/POWER"
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
on_command_type: "brightness"
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 }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "light_le_3"
availability_topic: "tele/light_le_3/LWT"
command_topic: "cmnd/light_le_3/POWER"
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
on_command_type: "brightness"
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 }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "light_le_4"
availability_topic: "tele/light_le_4/LWT"
command_topic: "cmnd/light_le_4/POWER"
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
on_command_type: "brightness"
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 }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "light_lohas_1"
availability_topic: "tele/light_lohas_1/LWT"
command_topic: "cmnd/light_lohas_1/POWER"
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
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/light_lohas_1/HSBColor"
hs_state_topic: "tele/light_lohas_1/STATE"
@@ -130,23 +134,23 @@ light:
rgb_command_topic: "cmnd/light_lohas_1/Color"
rgb_state_topic: "tele/pc_light/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
retain: false
- platform: mqtt
name: "light_lohas_2"
availability_topic: "tele/light_lohas_2/LWT"
command_topic: "cmnd/light_lohas_2/POWER"
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
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/light_lohas_2/HSBColor"
hs_state_topic: "tele/light_lohas_2/STATE"
@@ -157,23 +161,23 @@ light:
rgb_command_topic: "cmnd/light_lohas_2/Color"
rgb_state_topic: "tele/pc_light/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
retain: false
- platform: mqtt
name: "light_lohas_3"
availability_topic: "tele/light_lohas_3/LWT"
command_topic: "cmnd/light_lohas_3/POWER"
state_topic: "tele/light_lohas_3/STATE"
state_value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/light_lohas_3/POWER"
payload_on: "ON"
payload_off: "OFF"
availability_topic: "tele/light_lohas_3/LWT"
payload_available: "Online"
payload_not_available: "Offline"
on_command_type: "brightness"
brightness_command_topic: "cmnd/light_lohas_3/Dimmer"
brightness_state_topic: "tele/light_lohas_3/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/light_lohas_3/HSBColor"
hs_state_topic: "tele/light_lohas_3/STATE"
@@ -184,23 +188,23 @@ light:
rgb_command_topic: "cmnd/light_lohas_3/Color"
rgb_state_topic: "tele/pc_light/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
retain: false
- platform: mqtt
name: "light_lohas_4"
availability_topic: "tele/light_lohas_4/LWT"
command_topic: "cmnd/light_lohas_4/POWER"
state_topic: "tele/light_lohas_4/STATE"
state_value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/light_lohas_4/POWER"
payload_on: "ON"
payload_off: "OFF"
availability_topic: "tele/light_lohas_4/LWT"
payload_available: "Online"
payload_not_available: "Offline"
on_command_type: "brightness"
brightness_command_topic: "cmnd/light_lohas_4/Dimmer"
brightness_state_topic: "tele/light_lohas_4/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/light_lohas_4/HSBColor"
hs_state_topic: "tele/light_lohas_4/STATE"
@@ -211,23 +215,23 @@ light:
rgb_command_topic: "cmnd/light_lohas_4/Color"
rgb_state_topic: "tele/pc_light/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
retain: false
- platform: mqtt
name: "light_lohas_5"
availability_topic: "tele/light_lohas_5/LWT"
command_topic: "cmnd/light_lohas_5/POWER"
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
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/light_lohas_5/HSBColor"
hs_state_topic: "tele/light_lohas_5/STATE"
@@ -238,23 +242,23 @@ light:
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(',') }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "light_lohas_6"
availability_topic: "tele/light_lohas_6/LWT"
command_topic: "cmnd/light_lohas_6/POWER"
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
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/light_lohas_6/HSBColor"
hs_state_topic: "tele/light_lohas_6/STATE"
@@ -265,6 +269,52 @@ light:
rgb_command_topic: "cmnd/light_lohas_6/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_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/pc_light/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
retain: false
- platform: mqtt
name: "light_avatar_small_2"
availability_topic: "tele/light_avatar_small_2/LWT"
command_topic: "cmnd/light_avatar_small_2/POWER"
state_topic: "tele/light_avatar_small_2/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/light_avatar_small_2/Dimmer"
brightness_scale: 100
brightness_state_topic: "tele/light_avatar_small_2/STATE"
brightness_value_template: "{{ value_json.Dimmer }}"
on_command_type: "brightness"
white_value_command_topic: "cmnd/light_avatar_small_2/WHITE"
white_value_scale: 100
white_value_state_topic: "tele/light_avatar_small_2/STATE"
white_value_template: "{{ value_json.WHITE }}"
rgb_command_topic: "cmnd/light_avatar_small_2/Color"
rgb_state_topic: "tele/pc_light/STATE"
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
@@ -383,6 +433,26 @@ sensor:
unit_of_measurement: "%"
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
name: "light_avatar_small_2_wifi"
availability_topic: "tele/light_avatar_small_2/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/light_avatar_small_2/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json.Wifi.RSSI }}"
switch:
- platform: mqtt
name: "PC Light Fade"
@@ -505,6 +575,29 @@ switch:
state_topic: "stat/light_lohas_6/RESULT"
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 }}"
- platform: mqtt
name: "light_avatar_small_2_fade"
availability_topic: "tele/light_avatar_small_2/LWT"
command_topic: "cmnd/light_avatar_small_2/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/light_avatar_small_2/RESULT"
value_template: "{{ value_json.Fade }}"
automation:
- alias: Lighting · Sync Tasmota states on start-up
initial_state: true
@@ -16,7 +16,7 @@ input_boolean:
light:
- platform: template
lights:
tuya_kitchen_main_lights:
tuya_kitchen_main:
friendly_name: Kitchen main lights (scene)
value_template: "{{ is_state('input_boolean.tuya_kitchen_main_lights_state', 'on') }}"
icon_template: bha:ceiling-lamp-plafond
@@ -27,7 +27,7 @@ light:
service: input_boolean.turn_off
entity_id: input_boolean.tuya_kitchen_main_lights_state
tuya_kitchen_secondary_lights:
tuya_kitchen_secondary:
friendly_name: Kitchen secondary lights (scene)
value_template: "{{ is_state('input_boolean.tuya_kitchen_secondary_lights_state', 'on') }}"
icon_template: bha:ceiling-lamp-plafond
@@ -38,7 +38,7 @@ light:
service: input_boolean.turn_off
entity_id: input_boolean.tuya_kitchen_secondary_lights_state
tuya_hallway_main_lights:
tuya_hallway_main:
friendly_name: Hallway main lights (scene)
value_template: "{{ is_state('input_boolean.tuya_hallway_main_lights_state', 'on') }}"
icon_template: bha:ceiling-lamp-plafond
@@ -74,11 +74,11 @@ automation:
action:
- delay: 00:00:03
- service_template: "input_boolean.turn_{{ states('light.kitchen_main_lights') }}"
- service_template: "input_boolean.turn_{{ states('light.kitchen_main') }}"
entity_id: input_boolean.tuya_kitchen_main_lights_state
- service_template: "input_boolean.turn_{{ states('light.kitchen_secondary_lights') }}"
- service_template: "input_boolean.turn_{{ states('light.kitchen_secondary') }}"
entity_id: input_boolean.tuya_kitchen_secondary_lights_state
- service_template: "input_boolean.turn_{{ states('light.hallway_main_lights') }}"
- service_template: "input_boolean.turn_{{ states('light.hallway_main') }}"
entity_id: input_boolean.tuya_hallway_main_lights_state
+1 -1
View File
@@ -28,4 +28,4 @@ automation:
offset: "+00:00:00"
action:
- service: light.turn_off
entity_id: light.all_lights
entity_id: light.all
@@ -42,10 +42,10 @@ automation:
action:
- service: script.lighting_temperature_adjust
data:
entity_id: light.master_bedroom_main_lights
entity_id: light.master_bedroom_main
- service: script.lighting_temperature_adjust
data:
entity_id: light.living_room_main_lights
entity_id: light.living_room_main
- service: script.lighting_temperature_adjust
data:
entity_id: light.hallway_entrance_lights
entity_id: light.hallway_entrance
+27 -23
View File
@@ -29,22 +29,26 @@ automation:
data:
scene_id: plex_before_start
snapshot_entities:
- light.living_room_main_lights
- light.pc
- light.master_bedroom_main_lights
- light.tuya_kitchen_main_lights
- light.tuya_kitchen_secondary_lights
- light.hallway_entrance_lights
- light.tuya_hallway_main_lights
- light.living_room_main
- light.light_avatar_small_2
- light.living_room_ambient_main
- light.light_avatar_small_1
- light.master_bedroom_main
- light.tuya_kitchen_main
- light.tuya_kitchen_secondary
- light.hallway_entrance
- light.tuya_hallway_main
- service: light.turn_off
entity_id:
- light.living_room_main_lights
- light.pc
- light.master_bedroom_main_lights
- light.tuya_kitchen_main_lights
- light.tuya_kitchen_secondary_lights
- light.hallway_entrance_lights
- light.tuya_hallway_main_lights
- light.living_room_main
- light.light_avatar_small_2
- light.living_room_ambient_main
- light.light_avatar_small_1
- light.master_bedroom_main
- light.tuya_kitchen_main
- light.tuya_kitchen_secondary
- light.hallway_entrance
- light.tuya_hallway_main
- alias: TV · Plex · Restore house after Plex
trigger:
@@ -58,12 +62,12 @@ automation:
- service: scene.turn_on
# FIXME: Light colors are not being snapshotted/restored properly.
entity_id: scene.plex_before_start
- delay: 00:00:01
- condition: state
entity_id: light.pc
state: "on"
# FIXME: There is nothing else to fix the temperature of the PC light
- service: light.turn_on
entity_id: light.pc
data:
color_temp: 250
# - delay: 00:00:01
# - condition: state
# entity_id: light.light_avatar_small_2
# state: "on"
# # FIXME: There is nothing else to fix the temperature of the PC light
# - service: light.turn_on
# entity_id: light.light_avatar_small_2
# data:
# color_temp: 250
+1 -1
View File
@@ -105,7 +105,7 @@ automation:
homeassistant:
customize:
media_player.master_bedroom:
friendly_name: M. Bedroom Sonos
friendly_name: Bedroom Sonos
icon: mdi:speaker
media_player.living_room:
friendly_name: Living room Sonos
+3 -3
View File
@@ -72,11 +72,11 @@ script:
media_content_id: "https://raw.githubusercontent.com/saeedsohi/siren/master/FireTrucksSirens.mp3"
media_content_type: music
- service: light.turn_on
entity_id: light.bedside_light
entity_id: light.bedside
data:
brightness_pct: 100
- service: light.turn_on
entity_id: light.bedside_light
entity_id: light.bedside
data:
effect: Police
@@ -85,7 +85,7 @@ script:
- service: media_player.media_stop
entity_id: media_player.master_bedroom
- service: light.turn_on
entity_id: light.bedside_light
entity_id: light.bedside
data:
brightness_pct: 60
kelvin: 2400
+4 -4
View File
@@ -84,10 +84,10 @@ automation:
Master bedroom: {{ states('binary_sensor.bedroom_right_window_on_off') }}
Lights:
Living room: {{ states('light.living_room_all_lights') }}
Master bedroom: {{ states('light.master_bedroom_all_lights') }}
Kitchen: {{ states('light.kitchen_all_lights') }}
Hallway: {{ states('light.hallway_all_lights') }}
Living room: {{ states('light.living_room') }}
Master bedroom: {{ states('light.master_bedroom') }}
Kitchen: {{ states('light.kitchen') }}
Hallway: {{ states('light.hallway') }}
- alias: IFTTT · Call service
trigger:
+1 -1
View File
@@ -4,7 +4,7 @@ script:
sequence:
# Set master bedroom state
- service: light.turn_on
entity_id: light.bedside_light
entity_id: light.bedside
- service: light.turn_on
entity_id: light.bed_led
data:
+1 -1
View File
@@ -10,7 +10,7 @@ script:
sequence:
- service: light.turn_on
entity_id:
- light.hallway_entrance_lights
- light.hallway_entrance
- light.bed_led
- light.browser_kitchen
data:
+1 -1
View File
@@ -17,7 +17,7 @@ script:
entity_id: group.all_sonos
- service: homeassistant.turn_off
entity_id:
- light.all_lights
- light.all
- media_player.nvidia_shield
- media_player.living_room_tv
- switch.titanium
+1 -1
View File
@@ -13,7 +13,7 @@ script:
entity_id: group.all_sonos
- service: light.turn_off
entity_id:
- light.all_lights
- light.all
- light.browser_kitchen
- service: fan.turn_off
entity_id: fan.philips_airpurifier