Git Product home page Git Product logo

roku-card's Introduction

๐Ÿ“บ Roku Remote Card

GitHub Release License hacs_badge

Project Maintenance GitHub Activity

Discord Community Forum

Twitter Github

Support

Hey dude! Help me out for a couple of ๐Ÿป or a โ˜•!

coffee

This card is for Lovelace on Home Assistant that display a Roku remote.

example

Installation

Version 1.1.0 and above require Home Assistant 0.110.0 or above

Use HACS or follow this guide

resources:
    url: /local/roku-card.js
    type: module

Options

Name Type Requirement Description
type string Required custom:roku-card
entity string Required media_player entity of Roku device
remote string Optional remote entity of Roku device. Default assumed named like entity
name string Optional Card name
theme string Optional Card theme
tv boolean Optional If true shows volume and power buttons. Default false
power map Optional Button configuration for power See button options
volume_up map Optional Button configuration for volume_up See button options
volume_down map Optional Button configuration for volume_down See button options
volume_mute map Optional Button configuration for volume_mute See button options
up map Optional Button configuration for up See button options
down map Optional Button configuration for down See button options
left map Optional Button configuration for left See button options
right map Optional Button configuration for right See button options
home map Optional Button configuration for home See button options
info map Optional Button configuration for info See button options
back map Optional Button configuration for back See button options
select map Optional Button configuration for select See button options
reverse map Optional Button configuration for reverse See button options
play map Optional Button configuration for play See button options
forward map Optional Button configuration for forward See button options
apps map Optional List of app shortcuts See app options

app Options

Name Type Requirement Description
app string Optional Name of the source to launch as tap_action
image string Optional Path to image to use for app
tap_action map Optional Tap action map See action options
hold_action map Optional Hold action map See action options
double_tap_action map Optional Doulbe Tap action map See action options

button Options

Name Type Requirement Description
show boolean Optional Show/Hide button true
tap_action map Optional Tap action map See action options
hold_action map Optional Hold action map See action options
double_tap_action map Optional Doulbe Tap action map See action options

action Options

Name Type Default Supported options Description
action string toggle more-info, toggle, call-service, none, navigate, url Action to perform
entity string none Any entity id Only valid for action: more-info to override the entity on which you want to call more-info
navigation_path string none Eg: /lovelace/0/ Path to navigate to (e.g. /lovelace/0/) when action defined as navigate
url_path string none Eg: https://www.google.com URL to open on click when action is url.
service string none Any service Service to call (e.g. media_player.media_play_pause) when action defined as call-service
service_data map none Any service data Service data to include (e.g. entity_id: media_player.bedroom) when action defined as call-service.
haptic string none success, warning, failure, light, medium, heavy, selection Haptic feedback for the Beta IOS App
repeat number none eg: 500 How often to repeat the hold_action in milliseconds.

Usage

type: "custom:roku-card"
entity: media_player.basement_roku
tv: true
apps:
  - image: /local/netflix.webp
    app: Netflix
  - image: /local/hulu.webp
    app: Hulu
    hold_action:
      action: call-service
      service: media_player.select_source
      service_data:
        source: ESPN
        entity_id: media_player.basement_roku
volume_up:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.basement_roku
      command: play
volume_down:
  double_tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.basement_roku
      command: play

Troubleshooting

Developers

  1. Fork and clone the repository.
  2. Open the devcontainer and run npm start when it's ready.
  3. The compiled .js file will be accessible on http://127.0.0.1:5000/roku-card.js.
  4. On a running Home Assistant installation add this to your Lovelace resources:
- url: "http://127.0.0.1:5000/roku-card.js"
  type: module

Change "127.0.0.1" to the IP of your development machine.

Bonus

If you need a fresh test instance you can install a fresh Home Assistant instance inside the devcontainer as well.

  1. Run the command dc start.
  2. Home Assistant will install and will eventually be running on port 9123

roku-card's People

Contributors

iantrich avatar villhellm avatar ludeeus avatar balloob avatar svanhess 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.