Terncy Smart Dial for Lights blueprint

This is a blueprint to use a Terncy Smart Dial to control lights. The Terncy Smart Dial (TERNCY-SD01) is a zigbee device which I’ve connected using Zigbee Home Automation (ZHA). It’s an awesome little device, this blueprint is a simple example.

The Blueprint UI:

The Blueprint yaml:

  • 2021-Feb-05: Added a trigger condition to check against a list of event commands
    The smart dial sends a “checkin” event command every 15 minutes which caused this automation to run and do nothing. That just fills up the logs and is pointless, so now the automation will only run when an actionable command is issued by the dial.

blueprint:
  name: Use a Terncy Smart Dial to control lights
  description: |
    • Turn the dial left or right to change the brightness.
    • Single click to toggle lights off and on.
    • Double click to set a favorite brightness level.
    • Triple, Quadruple, and Quintuple clicks are configurable.
  domain: automation
  input:
    dial:
      name: Terncy Smart Dial
      description: "Model: TERNCY-SD01"
      selector:
        device:
          integration: zha
          model: TERNCY-SD01
    target_lights:
      name: Lights
      selector:
        target:
          entity:
            domain: light
    smooth_transition:
      name: Smooth Dial Transition
      description: Turn on for a smoother dial brightness transition
      default: false
      selector:
        boolean:
    brightness_step:
      name: Brightness Step
      description: Each step of the dial changes brightness this amount
      default: 5
      selector:
        number:
          min: 1
          max: 100
          mode: slider
          step: 1
          unit_of_measurement: "%"
    favorite_brightness:
      name: Favorite Brightness
      description: Double click to set this brightness
      default: 25
      selector:
        number:
          min: 1
          max: 100
          mode: slider
          step: 1
          unit_of_measurement: "%"
    triple_click:
      name: Triple Click
      default: []
      selector:
        action:
    quadruple_click:
      name: Quadruple Click
      default: []
      selector:
        action:
    quintuple_click:
      name: Quintuple Click
      default: []
      selector:
        action:

variables:
  brightness_step: !input brightness_step
  smooth_transition: !input smooth_transition
  command_list:
    - rotate_left
    - rotate_right
    - button_single
    - button_double
    - button_triple
    - button_quadruple
    - button_quintuple

trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: !input dial

condition: "{{ trigger.event.data.command in command_list }}"

action:
  - variables:
      command: "{{ trigger.event.data.command }}"
      args: "{{ trigger.event.data.args }}"
  - choose:
      - conditions: "{{ command == 'rotate_left' }}"
        sequence:
          service: light.turn_on
          target: !input target_lights
          data:
            brightness_step_pct: "{{ -(brightness_step | int) * args.steps }}"
            transition: "{{ 1 if smooth_transition else 0 }}"
      - conditions: "{{ command == 'rotate_right' }}"
        sequence:
          service: light.turn_on
          target: !input target_lights
          data:
            brightness_step_pct: "{{ (brightness_step | int) * args.steps }}"
            transition: "{{ 1 if smooth_transition else 0 }}"
      - conditions: "{{ command == 'button_single' }}"
        sequence:
          service: light.toggle
          target: !input target_lights
      - conditions: "{{ command == 'button_double' }}"
        sequence:
          service: light.turn_on
          target: !input target_lights
          data:
            brightness_pct: !input favorite_brightness
            transition: 1
      - conditions: "{{ command == 'button_triple' }}"
        sequence: !input triple_click
      - conditions: "{{ command == 'button_quadruple' }}"
        sequence: !input quadruple_click
      - conditions: "{{ command == 'button_quintuple' }}"
        sequence: !input quintuple_click
1 Like

Anybody managed to link this dial with ZHA? It’s discovered and added for me with the correct quirks profile but this blueprint (or any action at all through automations) doesn’t work sadly.

Is your Home Assistant able to see zigbee events from the smart dial? You can watch zigbee events in real-time by going to the Developer Tools > Events page. In the Listen to events section type zha_event and click Start Listening. Then press your smart dial button or turn it and you should see an event show up.

If you see events, paste an example event here so I can see if some of the parameters are different with your smart dial. If no events show up, then maybe try re-discovering the dial…?

Thanks for the events tip, had no idea. It’s not showing up there indeed. I tried updating the dial through zigpy and the official OTA package and it updated fine, relinked it through ZHA still nothing on presses. Did the deleting and re-linking process a few times. There’s something about “Status.UNSUP_CLUSTER_COMMAND” in the logs during pairing even though it finishes on a successful pairing message, might be something wrong there.

I’ll go ask for help on the specific ZHA forums though, to not pollute this thread, thanks for helping! Hopefully I can fix this and use the blueprint.

2021-Feb-05: Added a trigger condition to check against a list of event commands
The smart dial sends a “checkin” event command every 15 minutes which caused this automation to run and do nothing. That just fills up the logs and is pointless, so now the automation will only run when an actionable command is issued by the dial.

Its work perfectly but only on efr32, i couldn’t make it work on ti chips.

Is there an easy way to convert this blueprint to us zibgee2mqtt as the inigration?

Thanks

1 Like

Hi,

I followed the instruction to initiate the OTA but once i call for the service, I do not get any feedabck…how do you know if the update went well?

thanks

Does anyone know of a blueprint to use with Deconz? I tried to use this zha blueprint and change zha to deconz, reloaded and still not working. I can see events triggering in “deconz_event”

I just got one of these TERNCY-SD01 dials, blakadder says it works fine with ZHA, and I do get the device (slowly) initialized and created as a Zigbee device, but I don’t see any of the controls, and listening to zha_event yields nothing, and when I try and Reconfigure, everything fails. It is using quirks zhaquirks.terncy.sd01.TerncyKnobSmartDimmer.