Hello,
I am using the integration “Alexa Mediaplayer” and in HA Automations it is used like this in Yaml:
> action: notify.alexa_media
> metadata: {}
> data:
> data:
> type: announce
> target:
> - media_player.wohnzimmer
> - media_player.buro
> - media_player.cassian
> message: "Spülmaschine ist gelaufen "
I can imagine something like this in python
self.call_service(service = "notify.alexa_media", message="Spülmaschine ist gelaufen")
But how to specify the array of targets? A named parameter with array? targets=[a, b, c] ???
How to set the type that is oddly nested under a 2nd data:?
How to deal with the nested data in general?
In HA I can easily copy/paste or use the UI without a deeper understanding but in python I should understand it.
Unfortunately the documentation on call_service() is close to “it exists, guess the rest” while my understanding on HA services is also not sooo advanced.
Any ideas where I can find more information?
Regards Marc