Very new to HA and the community. I’m testing automations with Sonos. I’d like to stop Sonos with playing when I leave the house. I added a push-notification to test the automation. I added a condition so the automation will only run when a sonos speaker is playing.
Sonos does quit playing when I test this automation, however I keep receiving a push notification, also when Sonos is NOT playing. It looks like the condition is invalid. Anyone here to help a newbee out?
alias: Stop muziek bij vertrek
description: ''
trigger:
- platform: state
entity_id: device_tracker.iphone
from: home
to: not_home
condition:
- condition: device
device_id: ###
domain: media_player
entity_id: media_player.eetkamer
type: is_playing
action:
- service: media_player.media_stop
target:
entity_id:
- media_player.woonkamer
- media_player.keuken
- media_player.eetkamer
- service: notify.mobile_app_iphone
data:
title: Sonos uitgeschakeld
message: Sonos werd uitgeschakeld
mode: single