Add scene activation example to Qbus integration (#40625)

This commit is contained in:
Thomas D 2025-08-27 18:28:08 +02:00 committed by GitHub
parent c767f40cc8
commit 1eadabc9ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,6 +102,45 @@ actions:
{% endraw %}
### Qbus scene triggers media player
Automations can also be triggered by Qbus scenes. The following automation will play the **Home Assistant Homies** playlist on the media player in the living room.
An extra condition has been added to make sure the automation is not triggered when Home Assistant reboots or when the integration reloads.
Replace `scene.ctd_111111_play_music` with your Qbus scene entity id, `media_player.living_room` with your media player entity id, and fill in the `data` element as desired.
{% raw %}
```yaml
alias: Play music in living room
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- scene.ctd_111111_play_music
from: null
to: null
conditions:
- condition: template
value_template: >-
{{ trigger.from_state is not none and trigger.from_state.state not in
['unavailable', 'unknown'] and trigger.to_state is not none and
trigger.to_state.state not in ['unavailable', 'unknown'] }}
actions:
- action: media_player.play_media
alias: Play media
target:
entity_id: media_player.living_room
data:
enqueue: replace
media_content_id: Home Assistant Homies
media_content_type: playlist
```
{% endraw %}
## Known limitations
The integration does not provide a way to update the firmware on the devices. This can only be done with the configuration software System Manager.