But missing the mark on how to get the similar action in the LVGL.
Have Tried this:-
on_click: # on_press Triggers Immediately, on_click Triggers on Release if within defined time frame
- homeassistant.service:
data:
service: media_player.play_media
entity_id: media_player.ai_pont
media_content_id: "80"
media_content_type: "channel"
But it Won’t Complie, Giving this Error:-
on_click:
-
Must contain exactly one of service, action.
homeassistant.service:
data:
service: media_player.play_media
Have Tried a few variation, but haven’t cracked it yet.
I get the impression that the entity & other data need to be separately passed to the media_player.play_media Service.
on_click: # on_press Triggers Immediately, on_click Triggers on Release if within defined time frame
- homeassistant.action:
action: media_player.play_media
target:
entity_id: media_player.ai_pont
data:service:
media_content_id: "80"
media_content_type: "channel"
It’s Error is:-
on_click:
- homeassistant.action:
action: media_player.play_media
[target] is an invalid option for [homeassistant.action]. Please check the indentation.
target:
entity_id: media_player.ai_pont
data:
You should probably read the docs a bit more - but for home assistant.action: , target: is NOT in the list of actions.
Try this - but read the docs and examples first. Not tested so still could be wrong:
on_click: # on_press Triggers Immediately, on_click Triggers on Release if within defined time frame
- homeassistant.action:
action: media_player.play_media
data:
entity_id: media_player.ai_pont
media_content_id: "80"
media_content_type: "channel"
on_click: # on_press Triggers Immediately, on_click Triggers on Release if within defined time frame
- homeassistant.service:
service: media_player.play_media
data:
entity_id: media_player.ai_pont
media_content_id: "56"
media_content_type: "channel"
But did Just Test your Example:-
on_click: # on_press Triggers Immediately, on_click Triggers on Release if within defined time frame
- homeassistant.action:
action: media_player.play_media
data:
entity_id: media_player.ai_pont
media_content_id: "80"
media_content_type: "channel"
And it Works as Well,
So both are Valid Solutions.
Service was renamed to action last year. Both are supported & mostly interchangeable, but if you want to future proof, I suggest you get into the habit of using action.