You need the following:
- ETS License (Recommenation ETS 6 Home License: EUR 350.- up to 64 devices)
- 1x KNX / IP Gateway
- 1x KNX push button
- 1x Philips Hue Bridge
- Philips Hue Ambient White E27
- …and Home Assistant
In the living room, two Philips Hue lights are synchronously switched or dimmed via a KNX push button. The KNX push button shows the light status on the integrated LED.
It’s a 5 step commissioning
- Configuration of hue lights over hue app -> Create zones, integrate lights
- Integration of Philips Hue in Home Assistant
- Integration of IP/KNX Gateway in Home Assistant
- Configuration of KNX push button for switching and dimming
- Automation for Light ON / OFF and DIM by blueprint
- Expose of status of light groups to KNX push button
Step 1-3 are documented within this link: Switch Hue Light over KNX Push Button
Precondition: Lights and zones have been created with the Hue App. Hue Bridge as well as KNX Gateway are integrated in Home Assistant (step by step instructions see Switch Hue Light over KNX Push Button).
4. Configuration of KNX push button for switching and dimming
The following example is from a Gira KNX push button. For other manufacturers, the parameters will not be exactly the same, but most likely sufficiently similar that the configuration can be derived from the instructions.
ETS configuration Gira push button
KNX devices allow a wide range of configuration options. The selected configuration should allow the following:
- I would like to switch ON and OFF with the same button and dim with a long button press -> Command on pressing
- I want to use a KNX push button in DIM mode -> Function
- I would like to have the status displayed via the LED integrated in the push button -> status LED
ETS association Gira push button sensor 4
The communication objects are connected as follows:
- The group address to which the push button transmits ON/OFF GF Living Room Ceiling Hue On/Off is connected to the communication object output – Switching
- The group address to which the push button transmits DIM GF Living Room Ceiling Hue Dim is connected to the communication object output – Dimming
- The group address to which the push button transmits the status GF Living Room Ceiling Hue On/Off Feedback is connected to the communicaiton object input– Switching Feedback
Check if the flags are set (see Switch Hue Light over KNX Push Button).
5. Automation for Light ON / OFF and DIM by blueprint
Documentation: Home Assistant Blueprints
The Hue Bridge processes commands every second. This is too slow to forward the KNX Dim commands (DPT 3.007 Dimmer Step) directly. Therefore two states are defined in the Blueprint:
Initial Value: Brightness when switching on
Dimmed Value: Brightness during dimming
Switching on or Dim Up sets the Initial Value. Dim Down sets the Dimmed Value.
Any dimmable lights can be used as the light entity. I recommend to use the Philips Hue Zone (background see: Switch Hue Light over KNX Push Button).
Create a new automation in Home Assistant and select this Blueprint as a template:
The original idea for this Blueprint comes from farmio (github: knx-relative-dimming-for-lights.yaml).
6. Expose of status of light groups to KNX push button
The state of the Hue lights can be changed not only via Home Assistant, or the KNX button, but also via the Hue app. In order for this change to be forwarded to the KNX push button, the Expose function is required. Home Assistant documentation: Expose Entity State.
# ---------------- Hue Status to KNX group address -------------- knx: expose: # For KNX push buttons with switching and feedback communication object - type: 'binary' entity_id: 'light.gf_living_room_ceiling_hue' address: "2/0/2"
Additional information for the technically interested people.
The light can be switched in 3 different systems:
- KNX over the push button
- Home Assistant over the dashboard
- Philips Hue over the Hue App
No matter in which system an action is triggered, all systems must always be synchronously in the same state. In the example described, this is implemented as follows: