Show state of hue lamp on KNX wall switch

Hi everyone,

just started to move from ioBroker to Home Assistant and I am totally a noob in HA ;).

I tried a little bit with integrating my Hue lamps to Home Assistant and finished to setup an automation to turn on a Hue with using a KNX wall switch. Unfortunately the wall switch don’t show the status with a different icon. My setup is a classic Hue lightstrip and a MDT glass push button smart II. I know that changing the icon on the wall switch depends of an own state address. The switching group address and the right state address are in my configuration file. In my opinion I have to sent over the “on” state also to state address but I really don’t get it. Maybe someone can help?

Sorry for posting such a noob question at first, but I did not find anything using community search. But I have to say that Home Assistant makes a lot of things more tangible than ioBroker did. Makes a lot of fun to convert my old Jarvis visualisation to Home Assistant. When you are getting how HA works, it is way easier to get fast and good result.

Thanks a lot folks and have a great day.

FleischFlori

Hi :wave:!

Can you show what you configured there?

To get a HA entity state (eg. Hue light ON / OFF) or attribute (eg. Hue brightness) to be sent to Knx there is the expose: config.

If you want to use DPT 3 relative dimming too, have a look at my blueprint KNX - relative dimming for lights

Hi :wave:!

Thanks for your fast reply. Expose was the one I was looking for. Now it looks good for me.

Here my configuration (noob one :wink:). If I am doing weird things please let me know:

Automation

- id: '1661782215391'
  alias: Hue Test
  description: ''
  trigger:
  - platform: state
    entity_id:
    - switch.bad_waschtisch
    from: 'off'
    to: 'on'
  condition: []
  action:
  - type: turn_on
    device_id: 3ce8c69a5b81baebfacb40d9fa88246b
    entity_id: light.waschbecken
    domain: light
  mode: single
- id: '1661783203071'
  alias: Hue Test (Duplizieren)
  description: ''
  trigger:
  - platform: state
    entity_id:
    - switch.bad_waschtisch
    from: 'on'
    to: 'off'
  condition: []
  action:
  - type: turn_off
    device_id: 3ce8c69a5b81baebfacb40d9fa88246b
    entity_id: light.waschbecken
    domain: light
  mode: single

Lights (in knx_lights.yaml)

- name: "Bad Waschtisch"
  address: "1/1/56"
  state_address: "1/5/56"

Configuration

# KNX
knx:
  switch: !include knx_switches.yaml
  light: !include knx_lights.yaml
  expose: !include knx_expose.yaml

Expose:

- type: binary
  entity_id: light.waschbecken
  address: "1/5/56"

normally a light entity represents a light. Like your Hue light entity that represents a Hue light. Your Knx light entity doesn’t - it is a template to control a different entity.
This is not a dealbreaker, but a little bit unconventional. You could use knx_event to trigger these actions too - the knx light entity wouldn’t be needed then And it would not query the knx bus for the states - which it can’t because the real state of that light is in Hue, not Knx (expose answers that request but still…).
Just be careful not to build infinite loops with expose :upside_down_face:

Thanks for hint with knx_event. Can you just give me an example regarding to my config? I am still in process getting out my ioBroker bubble which needs a rethinking of lots of things. I just created those automations in a way I needed it to work in ioBroker :wink:

its just different triggers. you can see an example in the blueprint I linked in my first answer (which is also using trigger_ids that would allow to merge your two automations to one - you can find information about that in the HA automation documentation).

1 Like