Recent Video Views - Resinchem/YouTube-to-HomeAssistant GitHub Wiki
Getting views of latest video
The YouTube API does support returning the total views of a particular video. However, this requires hardcoding a video ID in the API call. This means if you release a new video, you'd have to modify the bridge code to update the video ID to this newest release. Alternatively, there is a Home Assistant Community Store (HACS) integration that will always return the total views of the most recently released video without making any code modifications.
While outside the scope of this repository, if you wish to add this stat to Home Assistant, see the following information:
Add HACS to your Home Assistant Installation - If you don't already have HACS installed
See either the sensors.yaml
file in the \homeassistant
folder, or watch my YouTube video on how to get latest video count from the integration and use it in Home Assistant. Please do not post issues related to this integration here. Instead, please post issues or PRs under the HACS YouTube Integration Github as I cannot provide support for this add-on.