Deconz Switch Configuration

Hi all,

This might be a stupid question, but I have been trying to find a solution to this all weekend.

I have successfully set up my Dockerized HomeAssistant (not HASS.io) with the Deconz configuration but I am struggling to see how I can get switch and dimmer events…?

I have a Tradfri dimmer and a Tradfri switch connected to Deconz, and HomeAssistant correctly reports back their battery status however, there are no other entities attributed to the devices.

I can see from the configuration page that these are reported back as Deconz events however, I cannot see any mention of Deconz in my States pane…? Do I essentially have to code these up blind using automations? Is there any way that I can configure HomeAssistant to report back last / current value as a sensor apart from following the AppDaemon example?

Thanks,

Dan

1 Like

Have a look here, there is an example how to use it. I have the same and it works a treat

This is where I have been looking but got confused when it comes to setting up switches as they aren’t set up in the same way as the rest of the component…

Where the Examples are, copy and paste the YAML part into your automations.yaml and edit for the light you want to control and the name of your remote.

I also added the appdaemon helper to log the button presses and discover the name of the remote:

2019-01-21 14:11:09.819962 INFO deconz_helper: Deconz event received from tradfri_remote_control. Event was: 2002

This is mine copied from my automations.yaml:

- id: '1237846198764'
  alias: 'Toggle lamp from dimmer'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: tradfri_remote_control
      event: 1002
  action:
    service: light.toggle
    entity_id: light.office_lamp

- id: '12378464653465198764'
  alias: 'Increase brightness of lamp from dimmer'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: tradfri_remote_control
      event: 2002
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.office_lamp
        brightness: >
          {% set bri = states.light.office_lamp.attributes.brightness | int %}
          {{ [bri+30, 249] | min }}

- id: '2345634643564356'
  alias: 'Decrease brightness of lamp from dimmer'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: tradfri_remote_control
      event: 3002
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.office_lamp
        brightness: >
          {% set bri = states.light.office_lamp.attributes.brightness | int %}
          {{ [bri-30, 0] | max }}
4 Likes

I just stumbled upon this post when also searching for how to most easily use TRADFRI dimmer from deconz. This is awesome simple automation! I would do the same thing much more overcomplicated haha. Thanks!

No probs, it’s not mine though I found elsewhere on here.