diff --git a/config/lovelace/advanced_dashboard/08_automations.yaml b/config/lovelace/advanced_dashboard/08_automations.yaml index 2e06545..b08c0d3 100644 --- a/config/lovelace/advanced_dashboard/08_automations.yaml +++ b/config/lovelace/advanced_dashboard/08_automations.yaml @@ -99,6 +99,7 @@ cards: - automation.lighting_sync_tasmota_states_on_start_up - automation.lighting_sync_zigbee_states_on_start_up - type: divider + - automation.trust_remote_guest_bedroom - automation.trust_remote_dimming - automation.trust_remote_turn_on - automation.trust_remote_turn_off diff --git a/config/lovelace/home_dashboard/preferences_dashboard.yaml b/config/lovelace/home_dashboard/preferences_dashboard.yaml index f273aa9..98dd5c6 100644 --- a/config/lovelace/home_dashboard/preferences_dashboard.yaml +++ b/config/lovelace/home_dashboard/preferences_dashboard.yaml @@ -34,6 +34,9 @@ - type: custom:button-card template: v3_badge entity: binary_sensor.someone_sleeping + - type: custom:button-card + template: v3_badge + entity: sensor.house_mode - type: custom:decluttering-card template: v3_section_title diff --git a/config/packages/devices/living_room/trust_remote.yaml b/config/packages/devices/living_room/trust_remote.yaml index c625271..f8c31c9 100644 --- a/config/packages/devices/living_room/trust_remote.yaml +++ b/config/packages/devices/living_room/trust_remote.yaml @@ -18,6 +18,29 @@ mqtt: value_template: "{{ value_json.linkquality }}" automation: + - alias: Trust remote · Guest bedroom + trigger: + - platform: mqtt + topic: z2m_deconz/trust_remote + action: + - choose: + - conditions: "{{ trigger.payload_json.action == 'up-press' }}" + sequence: + - service: light.turn_on + entity_id: light.tradfri_large + data_template: + brightness_pct: "{{ is_state('input_select.guest_bedroom_mode', 'day') | iif(100, 10) }}" + color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}" + - conditions: "{{ trigger.payload_json.action == 'down-press' }}" + sequence: + - service: light.turn_off + entity_id: light.tradfri_large + - conditions: "{{ trigger.payload_json.action == 'on' or trigger.payload_json.action == 'off' }}" + sequence: + - service: script.guest_bedroom_bedside_confirm + - service: input_select.select_next + entity_id: input_select.guest_bedroom_mode + - alias: Trust remote · Dimming trigger: - platform: state diff --git a/config/packages/modules/lighting/areas/guest_bedroom.yaml b/config/packages/modules/lighting/areas/guest_bedroom.yaml index fd0c9ff..e31928b 100644 --- a/config/packages/modules/lighting/areas/guest_bedroom.yaml +++ b/config/packages/modules/lighting/areas/guest_bedroom.yaml @@ -9,12 +9,14 @@ script: - service: light.turn_on entity_id: light.tradfri_large data: - rgb_color: [110, 255, 0] + color_temp: 500 + # rgb_color: [110, 255, 0] - delay: 00:00:02 - service: light.turn_on entity_id: light.tradfri_large data_template: color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}" + - delay: 00:00:02 - service: scene.turn_on entity_id: scene.guest_bedroom_before_confirm - delay: 00:00:01