This custom component for watching UStvgo channels via home assistant, broadcasting to google chromecast. This component will create senosr for every channel from UStvgo
Using HACS (add this repo as custome repository)
Or copy ustvgo folder to your custom component folder and restart your HA.
add sensor to your configuration.yaml
- sensor:
- platform: ustvgo
name: ustvgo
scan_interval: 3600
this will create sensor for each channel from UStvgo
To create such card that cast the selected channel to selected Chromecast device you need to add the following
Lovelace card: (using auto-entities awesome card )
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_select.media_players
- type: custom:auto-entities
card:
type: glance
show_name: true
show_icon: false
show_state: false
title: רשימת ערוצים
filter:
include:
- state: ustvgo_*
options:
tap_action:
action: call-service
service: script.cast_ustvgo
service_data:
sensor: this.entity_id
exclude: []
sort:
method: none
show_empty: true
Script:
'cast_ustvgo':
sequence:
- service: media_player.play_media
data_template:
media_content_id: >-
{{ state_attr(sensor, 'm3u') }}
media_content_type: media
target:
entity_id: "{{states('input_select.media_players')}}"
and create input_select
with all your Chromecast devices
I able to cast to google nest hub and google mini (audio only) but not to LG TV and MiBox 3
to everyone @Home Assistant for creating the amazing opensource platform for smart home integrations! 🙏🏼
Thanks to @benmoose39 for writing the automation on m3u fetching. Thanks to @yishait for the idea.