Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101645

KNX - Home Assistant Switch Toggle

$
0
0

@Gladz0r wrote:

Hello there,
I want to use a button on my KNX installation switch.alarm_knop to trigger an Home Assistant automation (automation.alarm_niemand_thuis - that is my alarm with connected sensors) and turn off a group off lights light.alarmlichtuit.
This is working fine at the moment but my KNX installation deletes the value on the bus after one hour triggering automation id 14 and turning the alarm off.
I’m wondering if I can use the toggle function? But my knowledge of Yaml is not good enough to fix this.

The code that is now working until the KNX bus refreshes is:

- id: '13'
  alias: Slaapkamer Alarm en lichten Aan
  trigger:
  - entity_id: switch.alarm_knop
    platform: state
    to: 'on'
  action:
  - data:
      entity_id: automation.alarm_niemand_thuis
    service: automation.turn_on
  - data:
      entity_id: light.alarmlichtuit
    service: light.turn_off   
###################################################
- id: '14'
  alias: Slaapkamer Alarm en lichten Uit
  trigger:
  - entity_id: switch.alarm_knop
    platform: state
    to: 'off'
  action:
  - data:
      entity_id: automation.alarm_niemand_thuis
    service: automation.turn_off 

In my configuration.yaml

switch:
  - platform: knx
    name: Alarm Knop
    address: '1/1/35'
    state_address: '1/4/35'

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 101645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>