ZHA - Ecosmart 4-button Zigbee Remote with Circadian Lighting

Tags: #<Tag:0x00007f325fcba3e8> #<Tag:0x00007f325fcba2f8> #<Tag:0x00007f325fcba0f0> #<Tag:0x00007f325fcb9f88> #<Tag:0x00007f325fcb9df8>

Summary
This blueprint allows you to control a smart light entity using an Ecosmart Zigbee Remote from Home Depot

Button Bindings

  1. Light ON/OFF, Circadian ON
  2. Light Brightness, Circadian OFF
  3. Light Temperature, Circadian OFF
  4. Circadian ON

Requirements

  • The blueprint toggles a circadian lighting switch off to prevent the circadian lighting from overriding manual brightness/color changes. I suggest creating a unique circadian lighting switch for each light/group controlled by each remote. I am using this integration, but it should work with any circadian integration with a switch. You could link this to a dummy switch if you don’t have circadian lighting set up and button 4 won’t do anything.
  • The bulb can be any brand that supports tunable white or color, I use the blueprint with the Ecosmart A19, Ecosmart BR30, Philips Hue + Color, Sylvania Lightify RGB BR30, and mixed light groups.
  • The remote is connected via Zigbee Home Automation (ZHA). The light(s) just need to be in Home Assistant, doesn’t matter if it is through ZHA, WiFi, etc.

Blueprint

blueprint:
  name: ZHA - Ecosmart Zigbee Remote with Circadian Lighting
  description: Control lights with an Ecosmart 4-button Zigbee remote
  domain: automation
  source_url: https://community.home-assistant.io/t/zha-ecosmart-4-button-zigbee-remote-with-circadian-lighting/265187
  input:
    light_target:
      name: Light
      description: Select which light or light group you wish to control
      selector:
        entity:
          domain: light
    device_ieee:
      name: Remote ID
      description: To find this, listen for zha_event in Developer Tools > Events, then press a button on your remote and identify the value of "device_ieee". It should look like "xx:xx:xx:xx:xx:xx:xx:xx"
    circadian_switch:
      name: Circadian Switch
      description: Add circadian lighting to button 4. It will turn off with brightness/color control and turn on with the on/off toggle and bottom button
      selector:
       entity:
          domain: switch

mode: restart

trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_ieee: !input device_ieee
condition: []
action:
- variables:
    command: '{{ trigger.event.data.command }}'
    args: '{{ trigger.event.data.args }}'
- choose:
  - conditions:
    - condition: or
      conditions:
      - condition: template
        value_template: '{{ command == ''on'' }}'
      - condition: template
        value_template: '{{ command == ''off'' }}'
    sequence:
    - service: light.toggle
      entity_id: !input light_target
      data: {}
    - service: switch.turn_on
      entity_id: !input circadian_switch
      data: {}
  - conditions:
    - condition: template
      value_template: '{{ command == ''move_to_level'' }}'
    sequence:
    - entity_id: !input light_target
      service: light.turn_on
      data_template:
        brightness: '{{ args[0]|int }}'
    - service: switch.turn_off
      entity_id: !input circadian_switch
      data: {}
  - conditions:
    - condition: template
      value_template: '{{ command == ''move_to_color_temp'' }}'
    sequence:
    - service: light.turn_on
      data_template:
        color_temp: '{{ args[0]|int }}'
      entity_id: !input light_target
    - service: switch.turn_off
      entity_id: !input circadian_switch
      data: {}
  - conditions:
    - condition: template
      value_template: '{{ command == ''move_to_level_with_on_off'' }}'
    sequence:
    - service: switch.turn_on
      entity_id: !input circadian_switch
      data: {}
1 Like