Sorry, I’m more used to JS/Node-Red type of coding and so have some questions. I’ve just started using Home Assistant and now I’m trying to keep a log of podcasts that’ve been played and how long its played for that I can then at a later time reference so I can resume the media from that point. I’m using the VLC integration. How do I find out what variable to call?
In the help files the command to play a media is for example:
service: media_player.play_media
target:
entity_id: media_player.chromecast
data:
media_content_type: music
media_content_id: "https://fake-home-assistant.io.stream/aac"
extra:
thumb: "https://brands.home-assistant.io/_/homeassistant/logo.png"
title: HomeAssistantRadio
Some questions:
- Does this mean that the playlist information is stored in media_player.play_media.media_content_id. Where can I find where each function stores its information? Is there a way to enable debug logging that can do this? I tried logging states.media_player.vlc.attributes.media_title but that didn’t work: “Template variable warning: ‘homeassistant.util.read_only_dict.ReadOnlyDict object’ has no attribute ‘media_title’ when rendering”
- Is it also possible to subtract the time between media_player.media_play and say media_player.media_pause events, and log this down for a particular media_player.play_media.media_content_id?
- Can/How do I store this in a custom yaml file and reference this in another function? I imagine I’d have to create a custom lovelace card that does this?