Central Off via Group Address - State of Entity is already off

Hi there

My problem: I have a KNX group address to switch off all lights, switches,… when leaving home. Actual state is off.

I would like to tigger with that KNX group address my Sonos to switch off. The problem is that there is no change and thus it is not being triggered (state is off). Any help/recommendation welcome!!

switch:
  - platform: knx
    name: zentralauss
    address: '0/0/4'
- id: '8'
  alias: ZZentralaus
  trigger:
  - entity_id: switch.zentralauss
    platform: state
    to: 'off'

  condition: []
  action:
  - service: media_player.media_stop
    entity_id: media_player.wohnzimmer
    data:
      entity_id: 
        - media_player.wohnzimmer

Many thanks!

knx:
  fire_event: true
  fire_event_filter: ["0/0/4"]

might help. see https://www.home-assistant.io/integrations/knx#fire_event

Many thanks for the fast answer. Unfortunately it is still not working. I believe the problem is that there is no change in state, it is off and it remains off… :frowning:

If you don’t plan to switch it from HA you could try to define it as binary_sensor instead of switch. Maybe this works together with fire_event :thinking:
Binary_sensor would also have reser_after but it always resets to 0 so you would need to negate it (maybe in Knx) https://www.home-assistant.io/integrations/binary_sensor.knx

I have it integrated into the Dashboard and I do not want to miss that feature. :wink:

I was thinking about some kind of virtual HA logic, if 0/0/4 is detected something is switched… and that being detected by HA. But no idea how to realise that…

A KNX logic would work too, unfortunately I do not have on available with present components…

I solved it with a KNX logic component which I found in my weather station

  • KNX address “all off” changes the state of another address
  • HASS changes that change back after 20 seconds.