I’ve just started with Home Assistant, using the KNX and Sonos integration. I just wanted to test whether I could trigger a door bell sound when a Reed Contacts state in my KNX system is changed.
The reed contact is configured as binary sensor and shows the correct state in my dashboard with nearly zero latency. However the automation I created just triggers once after a home assistant restart. So always the first sensor state change after a home assistant restart triggers the automation, but there is no chance of any further triggers (except for manual ones).
The automation looks as follows (created in visual editor):
alias: Türklingel in Büro
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.fenster_1
attribute: source
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.buro
data:
media_content_id: media-source://media_source/local/doorbell.mp3
media_content_type: audio/mpeg
metadata:
title: doorbell.mp3
thumbnail: null
media_class: music
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
mode: single
What did I do wrong?