theglus / Home-Assistant-Config

Home Assistant Configuration & Documentation for my Smart House. Be sure to ⭐ it. Updated FREQUENTLY!
MIT License
52 stars 4 forks source link

Home Theater dashboard #62

Closed theglus closed 3 years ago

theglus commented 3 years ago

Requirements

Shield Dennis Sonny
Power Power Power
Navigate Navigate Navigate
Menu I/O Setup I/O Menu I/O
Back Return Back
Home - Home
- Volume +/- -
- Mute -
- SM: Auto -
- SM: Stereo -
- SM: Multi-channel stereo -
- SM: Atmos -
- ECO I/O -
Hulu - -
Netflix - -
HBO Max - -
YouTube - -
Remote Finder - -
- Input -

Discoverey

Volume sensor

    # Denon Receiver Volume Template Sensor
  - platform: template
    sensors:
      denon_volume:
        value_template: >
          {% if is_state('media_player.denon_avr_x1000', 'on')  %}
            {% set n = states.media_player.denon_avr_x1000.attributes.volume_level | float %}
            {{ '%.1f'%( n*100.0|round(0.0) ) }}
          {% else %}
            "0"
          {% endif %}
        friendly_name: Reciever Volume Level
        unit_of_measurement: "%"
        icon_template: mdi:volume-medium

Scripts.yaml

volume_up:
  alias: Volume Up
  sequence:
  - service: rest_command.volume_up
volume_down:
  alias: Volume Down
  sequence:
  - service: rest_command.volume_down
turn_off_tv:
  alias: Power Off TV
  sequence:
    service: remote.turn_on
    data:
      entity_id: remote.living_room
      activity: -1

Switch.yaml

  - platform: template
    switches:
        # ZONE 1 MEDIA SWITCH
        zone_1:
          value_template: "{{ is_state('media_player.denon_avr_x1000', 'on') }}"
          turn_on:
            service: media_player.turn_on
            entity_id: media_player.denon_avr_x1000
          turn_off:
            service: media_player.turn_off
            entity_id: media_player.denon_avr_x1000

rest_command.yaml

  set_volume:
    url: 'http://192.168.1.90/goform/formiPhoneAppDirect.xml?MV{{ states("input_number.denon_volume").replace(".", "") }}'
  volume_up:
    url: 'http://192.168.1.90/goform/formiPhoneAppDirect.xml?MVUP'
  volume_down:
    url: 'http://192.168.1.90/goform/formiPhoneAppDirect.xml?MVDOWN'
  volume_correct:
    url: 'http://192.168.1.90/goform/formiPhoneAppDirect.xml?MV35'

input_number.yaml

  denon_volume:
    name: Media Volume
    icon: mdi:volume-medium
    initial: 0
    min: 0
    max: 85
    step: 0.5
    unit_of_measurement: "%"

input_select

remote:
  name: Media Center Remote
  options:
    - PowerOff
    - ShieldTV
    - XBoxOne
    - Switch
    icon: mdi:remote

Shield Intent

Shield Navigation Controls

RIGHT   {"entity_id" :"media_player.shield", "command": "RIGHT"}
LEFT    {"entity_id" :"media_player.shield", "command": "LEFT"}
UP      {"entity_id" :"media_player.shield", "command": "UP"}
DOWN    {"entity_id" :"media_player.shield", "command": "DOWN"}
WAKE    {"entity_id" :"media_player.shield", "command": "MENU"} # use to be the "WAKEUP" command
SLEEP   {"entity_id" :"media_player.shield", "command": "SLEEP"}
ENTER   {"entity_id" :"media_player.shield", "command": "ENTER"}
BACK    {"entity_id" :"media_player.shield", "command": "BACK"}
HOME    {"entity_id" :"media_player.shield", "command": "HOME"}
PLAY    {"entity_id" :"media_player.shield", "command": "input keyevent 126"}
PAUSE   {"entity_id" :"media_player.shield", "command": "input keyevent 127"}
STOP    {"entity_id" :"media_player.shield", "command": "input keyevent 86"}

Shield App Launching

Hulu                {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.hulu.livingroomplus/.MainActivity"}
Live Channels       {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.google.android.tv/com.android.tv.MainActivity"}
Amazon              {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.amazon.amazonvideo.livingroom/com.amazon.ignition.IgnitionActivity"}
SPMC                {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.semperpax.spmc17/.Splash"}
Haystack            {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.haystack.android/.tv.ui.LoadingActivity"}
PBS                 {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.pbs.video/.ui.main.activities.StartupActivity"}
Pluto TV            {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n tv.pluto.android/.leanback.controller.LeanbackSplashOnboardActivity"}
Spotify             {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.spotify.tv.android/.SpotifyTVActivity" }
HBO Go              {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n eu.hbogo.androidtv.production/eu.hbogo.androidtv.MainActivity" }
Plex                {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.plexapp.android/com.plexapp.plex.activities.SplashActivity" }
Perfect Player      {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.niklabs.pp/com.niklabs.perfectplayer.MainActivity" }
S0undTV (twtich)    {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.s0und.s0undtv/com.s0und.s0undtv.activities.MainActivity" }
SmartYoutubeTV:     {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.liskovsoft.videomanager/com.liskovsoft.smartyoutubetv.bootstrap.BootstrapActivity" }
Steam Link (start): {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.valvesoftware.steamlink/com.valvesoftware.steamlink.SteamShellActivity" }
Steam Link (stop):  {"entity_id" :"media_player.shield", "command": "am force-stop com.valvesoftware.steamlink" }
Ziggo TV:           {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n com.ziggo.tv/com.lgi.horizongo.core.activity.splash.SplashActivity" }
Tivimate/ImPlayer:  {"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n ar.tvplayer.tv/.ui.MainActivity" }

Resources

theglus commented 3 years ago

Picture Element Card

picture-entity-card

    -  type: custom:vertical-stack-in-card
        cards:
          - type: picture-elements
            #title: Remote
            image: /local/icons/media_icons/LHarmonyBG.jpg
            aspect_ratio: 50%
            elements:
              - type: image
                image: /local/icons/media_icons/power-logo.png
                entity: sensor.harmony_remote_activity
                state_image:
                  'PowerOff': /local/icons/media_icons/power-logo_active.png
                tap_action: call-service
                service: script.turn_off_tv
                style:
                  top: 10em
                  left: 10%
                  width: 54px
                  height: 54px
                  background-color: rgb(255, 255, 255, 0.0)
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 2
              - type: image
                image: /local/icons/media_icons/plex-logo.png
                entity: sensor.harmony_remote_activity
                state_image:
                  'Watch Kodi': /local/icons/media_icons/plex-logo_active.png
                tap_action: call-service
                service: script.turn_on_plex
                style:
                  top: 10em
                  left: 30%
                  width: 54px
                  height: 54px
                  background-color: rgb(255, 255, 255, 0.0)
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 2
              - type: image
                image: /local/icons/media_icons/xbox-logo.png
                entity: sensor.harmony_remote_activity
                state_image:
                  'Play XBox One': /local/icons/media_icons/xbox-logo-active.png
                tap_action: call-service
                service: script.turn_on_xbox
                style:
                  top: 10em
                  left: 50%
                  width: 54px
                  height: 54px
                  background-color: rgb(255, 255, 255, 0.0)
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 2
              - type: image
                image: /local/icons/media_icons/switch-logo.png
                entity: sensor.harmony_remote_activity
                state_image:
                  'Play Nintendo Switch': /local/icons/media_icons/switch-logo_active.png
                tap_action: call-service
                service: script.turn_on_switch
                style:
                  top: 10em
                  left: 70%
                  width: 54px
                  height: 54px
                  background-color: rgb(255, 255, 255, 0.0)
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 2
              - type: image
                image: /local/icons/media_icons/vol_-.png
                tap_action: call-service
                service: script.volume_down
                style:
                  top: 12em
                  left: 85%
                  width: 54px
                  height: 54px
                  background-color: rgb(255, 255, 255, 0.0)
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 2
              - type: image
                image: /local/icons/media_icons/vol_+.png
                tap_action: call-service
                service: script.volume_up
                style:
                  top: 8em
                  left: 85%
                  width: 54px
                  height: 54px
                  background-color: rgb(255, 255, 255, 0.0)
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 2
              - type: image
                image: /local/icons/media_icons/vol_btn_border.png
                style:
                  top: 11em
                  left: 85%
                  width: 69px
                  height: 155px
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 1
              - type: image
                image: /local/icons/media_icons/horizontal_Rule.png
                style:
                  top: 13em
                  left: 40%
                  width: 70%
                  height: 2px
                  filter: invert(0.20)
                  border-radius: 4px
                  z-index: 1

          - type: entities
            entities:
              - input_number.denon_volume
      - type: entities
        title: Trash
        show_header_toggle: true
        entities:
          - sensor.trash_pickup_day
          - sensor.recycling_pickup_day
      - type: entities
        title: Garage Door
        show_header_toggle: false
        entities:
          - cover.double
      - type: iframe
        url: https://cfautomation.duckdns.org/shopping-list
        #title: Shopping List
        aspect_ratio: 75%
theglus commented 3 years ago

Deprecated functionality with 65cd63ee86d044ee09e016893451bfeb18a20009.