And the group addresses for the dimmer in my knx_light.yaml with as well as in knx_switch.yaml. Maybe that is too much but it works now. Strangely it is enough to put only the dimmer address in fire_event_filter. I’m still new to this.
Hi Michael,
I try to use my MDT glas push button to dim Hue lights (using conbee). Are you using one or two button dimming on the MDT button?
I use another approach to control my Sonos volume with a few scripts. In order to get it work, I also need to process event data 0 to stop dimming. But this is much more complex, so I would like to use your automation which is not working for me.
I am using two button but it should be the same on one button style as well. Important for this to work is to use the “dimming” function and not “send values”.
as dcrabs already rightly mentioned it is important to add the dimming addresses to the fire_event_filter to make sure they trigger an event that can be handled by the automation.
Do you have any more hints what is not working for you?
Attached some screenshots of my configuration in ETS - i hope they help albeit being in German
@ciko I have used wrong GA . Its working now, thank you so much. I am able to dim my Hue bulbs with my MDT glas puch button. Your approach is simple and easy to unterstand. My Sonos “dim” volume solution is much more complex as it uses 5 automations, 2 scripts and one input_boolean.
@farmio The MDT glas push button sends a 0 telegram to stop. This will restart and stop automation because condition to repeat is not true.
Edit: I did some changes to soft dim when turn on/off the lights. Its also possible to turn on / of the light by dimming.
I’ve been waiting for this for some time, great to see this in the upcoming version! My idea was to use this for Sonos volume control, rather than setting the brightness of lights. Do you think this could work (after some minor modifications)?
Sure, why not. Just modify the target and the service calls.
PS: this works since ever. It’s just the blueprint and the Dynamic Event registration (initialization) that’s new.
Sorry for not reading carefully. Earlier @DessertBesom mentioned that this is way is much less complex than the previous idea to control the Sonos volume, which I also have been struggling with. I’m gonna try this as soon as possible.
Sure, it’s quite simple, but works fine. The the first button is the on/off toggle plus the volume, the other button is the selector of the source. I’m gonna refine it by making dynamic grouping of Sonos players (I have a bunch ) based on the presence in each room. Grouping in Sonos is quite slow sometimes, it cannot follow presence in real-time, but it gives a feeling.
Dear Farmio, all,
after hours of various trials, I definitely need your help…
I’ve a KNX Wall Switch operating as one button dimmer with the 2 objects (one is 1.001 and the other one 3.007), as per your example I believe.
I want to use this switch to control a SHELLY light through HA.
I do see the knx_event with the right data in the log, but the light doesn’t switch nor dimmer…
The Shelly light already works fine with a simple dimmer control in lovelace…
I’m using the HA core-2021.4.6.
I post here below the YAML conf I’ve in my light file package configuration:
Hi, I am new to HA and KNX, so please bear with me.
I want to connect a KNX wall switch with a Shelly Plug S to which I attached a light. The KNX wall switch is configured in ETS to “toggle”. It sends GA “3/0/0” and also reads GA “0/1/0” and “0/1/3” to sync its state with “global” actions like “All lights off” and “All lights in room (Wohnzimmer) off”. The connection between the KNX wall switch and the Shelly Plug S needs to be bidirectional: If I toggle the wall switch, the Shelly/light should toggle. If I toggle the Shelly/light via HA, the wall switch state should be synchronized to that the next toggle of the wall switch is correct.
In addition to this thread, I also read the following related topics several times.
Below you find my current solution. It works exactly as described above. So basically all good. However, I have a few questions:
Is this really the best, cleanest, minimal way to achieve this? I doubt that so many lines of “code” are required for such a “common” scenario.
If yes, how can I make this reusable? I have like 5+ same scenarios? Is this possible with scripts or templates? As said, I am new to HA and don’t know them yet.
My current solution:
Shelly integration provides:
light.wohnzimmer_stehlampe
KNX wall switch → Shelly/light:
knx:
binary_sensor:
- name: "Wohnzimmer Schalter Stehlampe"
state_address:
- "3/0/0"
- "0/1/0"
- "0/1/3"
automation:
- alias: "Wohnzimmer Stehlampe anschalten via KNX Schalter"
trigger:
- platform: state
entity_id: binary_sensor.wohnzimmer_schalter_stehlampe
to: "on"
action:
- service: light.turn_on
entity_id: light.wohnzimmer_stehlampe
- alias: "Wohnzimmer Stehlampe ausschalten via KNX Schalter"
trigger:
- platform: state
entity_id: binary_sensor.wohnzimmer_schalter_stehlampe
to: "off"
action:
- service: light.turn_off
entity_id: light.wohnzimmer_stehlampe
Be aware that a binary sensor sends GroupValueRead requests to its first state_address periodically by default. An expose on the other hand answers such - so HA is (maybe - depending on which telegram is faster) answering itself if you use the same addresses for these.
If 3/0/0 is exclusively used for this light I wouldn’t use a binary_sensor - it already has its HA entity from the shelly integration anyway. Just use a knx_event as trigger in an automation matching the 3 GAs and the payload (1 or 0) directly.
Enter the world of blueprints! About blueprints - Home Assistant
See also Topics tagged knx there are already 2 which could fit your needs (one of them is mine ). You can also just use them as examples on how to use knx_event.
Just be aware that reloading the KNX integration breaks register_event and register_expose services - so maybe better configure them in yaml.