Giter Club home page Giter Club logo

ha_ustvgo_sensor's Introduction

HA UStvgo sensor

hacs_badge

description:

This custom component for watching UStvgo channels via home assistant, broadcasting to google chromecast. This component will create senosr for every channel from UStvgo


instaltion:

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

Create Lovelace card

enter image description here

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

Note

I able to cast to google nest hub and google mini (audio only) but not to LG TV and MiBox 3

Thanks

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.

ha_ustvgo_sensor's People

Contributors

sefininio avatar yohaybn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.