Livingroom front end Lovelace ir for philips smart tv Xbox PS4 Netflix kodi

I’ve made a front end for the features I use most on my tv including source switching a PlayStation 4 media player with kodi for live tv and plugin buttons to favourite iptv stations I have used a picture elements card for the media source select. That shows the logo of what’s playing when that source is selected. Also using the universal media player to switch active source as to have a single media player on the interface.

Very nice, but are you going to share your code?

# ui-lovelace.yaml
  - title: Living Room
    icon: mdi:television-classic
    panel: true
    cards:
      - type: vertical-stack
        cards:
          - type: picture
            image: /local/ha3.jpg
          - type: horizontal-stack
            cards:
              - type: vertical-stack
                cards:
                  - type: picture-glance
                    title: Livingroom
                    entities:
                      - light.yeelight_rgb_7811dc6840f6
                      - light.ledrgb2_nodemcu03
                      - light.kitchen_lamp
                      - switch.kitchen_fan
                      - input_boolean.switch_kaden_led
                      - light.ledrgb_nodemcu02
                      - script.1532659272895
                    image: /local/livingsml.jpg
                  - type: glance
                    title: 
                    column_width: calc(100% / 5)
                    show_name: false
                    show_state: true
                    entities:
                      - binary_sensor.motion_sensor_158d0001a250d8
                      - binary_sensor.door_window_sensor_158d0001de8cdc
                      - binary_sensor.door_window_sensor_158d0001de8c6b
                      - sensor.illumination_158d0001a250d8
                      - sensor.realistic_kitchen_temperature
                  - type: picture
                    navigation_path: /lovelace/0
                    image: /local/ha.jpg
              - type: vertical-stack
                cards:
                  - type: glance
                    title: 
                    column_width: calc(100% / 6)
                    show_name: true
                    show_state: false
                    entities:
                      - light.yeelight_rgb_7811dc6840f6
                      - light.ledrgb2_nodemcu03
                      - entity: light.kitchen_lamp
                        tap_action: toggle
                      - entity: switch.kitchen_fan
                        tap_action: toggle
                      - entity: input_boolean.switch_kaden_led
                        tap_action: toggle
                      - light.ledrgb_nodemcu02
                  - type: picture-elements
                    image: /local/tvpic.png
                    elements:
                      - type: image
                        entity: switch.remote_freeview_on
                        tap_action: toggle
                        state_image:
                          "off": /local/transparant.png
                        state_image:
                          "on": /local/freeviewbanner.png
                        style:
                          top: 50%
                          left: 50%
                          width: 100%
                        navigation_path: /lovelace/1
                      - type: image
                        entity: switch.remote_ir_xbox
                        tap_action: toggle
                        state_image:
                          "off": /local/transparant.png
                        state_image:
                          "on": /local/xboxbanner.png
                        style:
                          top: 50%
                          left: 50%
                          width: 100%
                        navigation_path: /lovelace/1
                      - type: image
                        entity: switch.remote_ir_ps4
                        tap_action: toggle
                        state_image:
                          "off": /local/transparant.png
                        state_image:
                          "on": /local/ps4banner.png
                        style:
                          top: 50%
                          left: 50%
                          width: 100%
                        navigation_path: /lovelace/1
                      - type: image
                        entity: switch.remote_ir_kodi
                        tap_action: toggle
                        state_image:
                          "off": /local/transparant.png
                        state_image:
                          "on": /local/kodibanner.png
                        style:
                          top: 50%
                          left: 50%
                          width: 100%
                        navigation_path: /lovelace/1
                      - type: image
                        entity: input_boolean.switch_chromecast
                        tap_action: toggle
                        state_image:
                          "off": /local/transparant.png
                        state_image:
                          "on": /local/chromebanner.png
                        style:
                          top: 50%
                          left: 50%
                          width: 100%
                        navigation_path: /lovelace/1
                      - type: image
                        entity: switch.remote_freeview_on
                        tap_action: toggle
                        state_image:
                          "off": /local/transparant.png
                        state_image:
                          "on": /local/freeviewbanner.png
                        style:
                          top: 50%
                          left: 50%
                          width: 100%
                        navigation_path: /lovelace/1
                  - type: glance
                    title: 
                    column_width: calc(100% / 5)
                    show_name: false
                    show_state: false
                    entities:
                      - entity: input_boolean.switch_ps4
                        tap_action: toggle
                      - entity: input_boolean.switch_xbox
                        tap_action: toggle
                      - entity: input_boolean.switch_tv
                        tap_action: toggle
                      - entity: input_boolean.switch_kodi
                        tap_action: toggle
                      - entity: input_boolean.switch_netflix
                        tap_action: toggle
                  - type: media-control
                    entity: media_player.test_universal
              - type: vertical-stack
                cards:
                  - type: vertical-stack
                    cards:
                      - type: glance
                        title: 
                        column_width: calc(100% / 5)
                        show_name: true
                        show_state: false
                        entities:
                          - entity: input_boolean.switch_tv_back
                            tap_action: toggle
                          - entity: input_boolean.switch_tv_vol_mute
                            tap_action: toggle
                          - entity: input_boolean.switch_tv_vol_down
                            tap_action: toggle
                          - entity: input_boolean.switch_tv_vol_up
                            tap_action: toggle
                          - entity: input_boolean.switch_tv_channel_down
                            tap_action: toggle
                          - entity: input_boolean.switch_tv_channel_up
                            tap_action: toggle
                  - type: horizontal-stack
                    cards:
                      - type: vertical-stack
                        cards:
                          - type: glance
                            title: 
                            column_width: calc(100% / 3)
                            show_name: false
                            show_state: false
                            entities:
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_up
                                tap_action: toggle
                                icon: mdi:arrow-up-bold-circle
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_left
                                tap_action: toggle
                                icon: mdi:arrow-left-bold-circle
                              - entity: input_boolean.switch_tv_ok
                                tap_action: toggle
                                icon: mdi:pokeball
                              - entity: switch.remote_ir_right
                                tap_action: toggle
                                icon: mdi:arrow-right-bold-circle
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_down
                                tap_action: toggle
                                icon: mdi:arrow-down-bold-circle
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: input_boolean.switch_tv_back
                                tap_action: toggle
                                icon: mdi:keyboard-backspace
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: mdi:plus
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: mdi:home-minus
                  
                      - type: vertical-stack
                        cards:
                          - type: glance
                            title: 
                            column_width: calc(100% / 3)
                            show_name: false
                            show_state: false
                            entities:
                              - entity: input_boolean.switch_tv_ir_num_1
                                tap_action: toggle
                                icon: mdi:numeric-1-box
                              - entity: input_boolean.switch_tv_ir_num_2
                                tap_action: toggle
                                icon: mdi:numeric-2-box
                              - entity: input_boolean.switch_tv_ir_num_3
                                tap_action: toggle
                                icon: mdi:numeric-3-box
                              - entity: input_boolean.switch_tv_ir_num_4
                                tap_action: toggle
                                icon: mdi:numeric-4-box
                              - entity: input_boolean.switch_tv_ir_num_5
                                tap_action: toggle
                                icon: mdi:numeric-5-box
                              - entity: input_boolean.switch_tv_ir_num_6
                                tap_action: toggle
                                icon: mdi:numeric-6-box
                              - entity: input_boolean.switch_tv_ir_num_7
                                tap_action: toggle
                                icon: mdi:numeric-7-box
                              - entity: input_boolean.switch_tv_ir_num_8
                                tap_action: toggle
                                icon: mdi:numeric-8-box
                              - entity: input_boolean.switch_tv_ir_num_9
                                tap_action: toggle
                                icon: mdi:numeric-9-box
                              - entity: input_boolean.switch_tv_ir_num_0
                                tap_action: toggle
                                icon: /local/
                              - entity: input_boolean.switch_tv_ir_num_0
                                tap_action: toggle
                                icon: mdi:numeric-0-box
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                              - entity: switch.remote_ir_number_0
                                tap_action: toggle
                                icon: /local/
                  - type: entity-filter
                    entities:
                      - script.1532671463982
                      - script.1532564943356
                      - script.radioiheartdance
                      - script.radiotriplej
                    state_filter:
                      - "off"
                    card: 
                      type: glance
                      title: 
                      column_width: calc(100% / 4)
                      show_name: false
                      show_state: false
                  - type: custom:bignumber-card
                    title: 
                    entity: sensor.time
                    scale: 30px
          - type: glance
            title: 
            column_width: calc(100% / 22)
            show_name: false
            show_state: false
            entities:
              - entity: script.tv7
                tap_action: toggle
              - entity: script.tv7flix
                tap_action: toggle
              - entity: script.tv7mate
                tap_action: toggle
              - entity: script.tv7two
                tap_action: toggle
              - entity: script.tv9gem
                tap_action: toggle
              - entity: script.tv9go
                tap_action: toggle
              - entity: script.tv9life
                tap_action: toggle
              - entity: script.tv9nine
                tap_action: toggle
              - entity: script.tvabc
                tap_action: toggle
              - entity: script.tvabccomedy
                tap_action: toggle
              - entity: script.tvabckids
                tap_action: toggle
              - entity: script.tvabcme
                tap_action: toggle
              - entity: script.tvabcnews
                tap_action: toggle
              - entity: script.tveleven
                tap_action: toggle
              - entity: script.tvfood
                tap_action: toggle
              - entity: script.tvfoxnews
                tap_action: toggle
              - entity: script.tvnitv
                tap_action: toggle
              - entity: script.tvone
                tap_action: toggle
              - entity: script.tvracing
                tap_action: toggle
              - entity: script.tvredbull
                tap_action: toggle
              - entity: script.tvsbs
                tap_action: toggle
              - entity: script.tvsbsvice
                tap_action: toggle
              - entity: script.tvten
                tap_action: toggle
              - entity: script.tvhgtv
                tap_action: toggle
              - entity: script.tvdisc
                tap_action: toggle
              - entity: script.tvdiscscience
                tap_action: toggle
              - entity: script.tvdiscshed
                tap_action: toggle
              - entity: script.tvdiscturbo
                tap_action: toggle
              - entity: script.tvfs1
                tap_action: toggle
              - entity: script.tvfs2
                tap_action: toggle
              - entity: script.tvh2
                tap_action: toggle
              - entity: script.tvhgtv
                tap_action: toggle
              - entity: script.tvhistory
                tap_action: toggle
              - entity: script.tvmtv
                tap_action: toggle
              - entity: script.tvmtvclassic
                tap_action: toggle
              - entity: script.tvmtvdance
                tap_action: toggle
              - entity: script.tvmtvhits
                tap_action: toggle
              - entity: script.tvmtvmusic
                tap_action: toggle
              - entity: script.tvmtvrocks
                tap_action: toggle
              - entity: script.tvnatgeo
                tap_action: toggle
              - entity: script.tvngwild
                tap_action: toggle
              - entity: script.tvshowtime
                tap_action: toggle
              - entity: script.tvsyfy
                tap_action: toggle
              - entity: script.tvtlc
                tap_action: togglePreformatted text

You will need to format that code correctly

i pasted wrong i think sorry will work it out and repost…

check now should be formatted

automations.yaml

- id: '1535594625425'
  alias: Live TV IR
  trigger:
  - entity_id: input_boolean.switch_tv
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_off
  - data:
      entity_id: input_boolean.switch_tv_stop
    service: input_boolean.turn_on
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_off
  - data:
      entity_id: switch.remote_freeview_on
    service: switch.turn_on
  - delay: 00:00:01
  - data:
      entity_id: input_boolean.switch_tv
    service: input_boolean.turn_off
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_xbox
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_ps4
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_kodi
    service: switch.turn_off
- id: '1535593816793'
  alias: PS4 TV IR
  trigger:
  - entity_id: input_boolean.switch_ps4
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_off
  - data:
      entity_id: input_boolean.switch_tv_stop
    service: input_boolean.turn_on
  - delay: 00:00:03
  - data:
      entity_id: input_boolean.switch_ps4_power
    service: input_boolean.turn_on
  - data:
      entity_id: switch.remote_ir_ps4
    service: switch.turn_on
  - delay: 00:00:01
  - data:
      entity_id: input_boolean.switch_ps4
    service: input_boolean.turn_off
  - data:
      entity_id: switch.remote_ir_xbox
    service: switch.turn_off
  - data:
      entity_id: switch.remote_freeview_on
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_kodi
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_off
- id: '1535593891737'
  alias: Xbox One
  trigger:
  - entity_id: input_boolean.switch_xbox
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_off
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_off
  - data:
      entity_id: input_boolean.switch_tv_stop
    service: input_boolean.turn_on
  - delay: 00:00:03
  - data:
      entity_id: switch.remote_ir_xbox
    service: switch.turn_on
  - delay: 00:00:01
  - data:
      entity_id: input_boolean.switch_xbox
    service: input_boolean.turn_off
  - data:
      entity_id: switch.remote_ir_ps4
    service: switch.turn_off
  - data:
      entity_id: switch.remote_freeview_on
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_kodi
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_off
- id: '1535595897567'
  alias: Kodi IR
  trigger:
  - entity_id: input_boolean.switch_kodi
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_off
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_off
  - data:
      entity_id: switch.remote_ir_kodi
    service: switch.turn_on
  - delay: 00:00:01
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_off
  - data:
      entity_id: switch.remote_ir_xbox
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_ps4
    service: switch.turn_off
  - data:
      entity_id: switch.remote_freeview_on
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_off
  - data:
      entity_id: input_boolean.switch_ps4_power
    service: input_boolean.turn_off
- id: netflixirphilipstv
  alias: Netflix
  trigger:
  - entity_id: input_boolean.switch_netflix
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_off
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_off
  - data:
      entity_id: switch.remote_ir_power
    service: switch.turn_on
  - delay: 00:00:03
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_on
  - delay: 00:00:03
  - data:
      entity_id: switch.remote_ir_ok
    service: switch.turn_on
  - delay: 00:00:01
  - data:
      entity_id: switch.remote_ir_ok
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_xbox
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_ps4
    service: switch.turn_off
  - data:
      entity_id: switch.remote_freeview_on
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_kodi
    service: switch.turn_off
  - data:
      entity_id: input_boolean.switch_netflix
    service: input_boolean.turn_off
  - data:
      entity_id: input_boolean.switch_tv_stop
    service: input_boolean.turn_on
- id: '1535603613223'
  alias: netflix exit
  trigger:
  - entity_id: input_boolean.switch_kodi
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: input_boolean.switch_ps4
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: input_boolean.switch_xbox
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: switch.remote_ir_netflix
    state: 'on'
  action:
  - data:
      entity_id: input_boolean.switch_tv
    service: input_boolean.turn_on
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_off
- id: '1537784008032'
  alias: chromecast on
  trigger:
  - entity_id: media_player.43put680179
    from: 'off'
    platform: state
    to: playing
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_on
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_off
  - data:
      entity_id: switch.remote_ir_kodi
    service: switch.turn_off
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_off
  - data:
      entity_id: switch.remote_ir_xbox
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_ps4
    service: switch.turn_off
  - data:
      entity_id: switch.remote_freeview_on
    service: switch.turn_off
  - data:
      entity_id: switch.remote_ir_netflix
    service: switch.turn_off
  - data:
      entity_id: input_boolean.switch_ps4_power
    service: input_boolean.turn_off
- id: '1537784047926'
  alias: chromecast off
  trigger:
  - entity_id: media_player.43put680179
    from: playing
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: input_boolean.switch_chromecast
    service: input_boolean.turn_off
- alias: Turn on the TV when Kodi is activated
  trigger:
    platform: state
    entity_id: media_player.kodi_tv
    from: 'off'
    to: playing
  action:
  - service: media_player.turn_on
    entity_id: media_player.kodi_tv
  id: 539ea19e0f0d407a8b6ee4b05f2533ec
- id: '1536367278747'
  alias: tv back
  trigger:
  - entity_id: input_boolean.switch_tv_back
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_back
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_back
    service: input_boolean.turn_off
- alias: tv channel up
  trigger:
  - entity_id: input_boolean.switch_tv_channel_up
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_channel_up
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_channel_up
    service: input_boolean.turn_off
  id: 09f498bd24d74b2bb36f66fe72e65bf7
- alias: tv channel down
  trigger:
  - entity_id: input_boolean.switch_tv_channel_down
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_channel_down
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_channel_down
    service: input_boolean.turn_off
  id: 065e958405104cab83ad6f0a9df543e8
- alias: tv vol up
  trigger:
  - entity_id: input_boolean.switch_tv_vol_up
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_vol_up
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_vol_up
    service: input_boolean.turn_off
  id: cd2287f62dc14e9b865d15c585c899e9
- alias: tv vol down
  trigger:
  - entity_id: input_boolean.switch_tv_vol_down
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_vol_down
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_vol_down
    service: input_boolean.turn_off
  id: 4fa76a73f3104337b3dd0b07a451455b
- id: '1536628025005'
  alias: IR Stop
  trigger:
  - entity_id: input_boolean.switch_tv_stop
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_stop
    service: switch.turn_on
  - data:
      entity_id: switch.remote_ir_stop
    service: switch.turn_off
  - data:
      entity_id: input_boolean.switch_tv_stop
    service: input_boolean.turn_off
- id: '1537160965544'
  alias: PS4 Power on
  trigger:
  - entity_id: input_boolean.switch_ps4_power
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: media_player.playstation_4
    state: 'off'
  action:
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_on
  - data:
      entity_id: input_boolean.switch_ps4
    service: input_boolean.turn_on
- id: '1537161105405'
  alias: PS4 Power Off
  trigger:
  - entity_id: input_boolean.switch_ps4_power
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_off
- alias: Number 1
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_1
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_1
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_1
    service: input_boolean.turn_off
  id: 3275f582c1f448e28b667e1a134e7952
- alias: Number 2
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_2
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_2
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_2
    service: input_boolean.turn_off
  id: 6b53b995c7c942da98b5ca612bbd13b0
- alias: Number 3
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_3
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_3
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_3
    service: input_boolean.turn_off
  id: c7f31d4c990a47c5a062e32e0a71cba1
- alias: Number 4
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_4
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_4
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_4
    service: input_boolean.turn_off
  id: d715a1718a0a4e01b2c948ddc1b3ee7d
- alias: Number 5
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_5
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_5
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_5
    service: input_boolean.turn_off
  id: 9cf23d457d5a416f89a1c26c3a4d8e3e
- alias: Number 6
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_6
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_6
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_6
    service: input_boolean.turn_off
  id: 14b304f1d440485185c3b8ab8cc91395
- alias: Number 7
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_7
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_7
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_7
    service: input_boolean.turn_off
  id: 6a341ef1f8334ba489a3cfeff9f37273
- alias: Number 8
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_8
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_8
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_8
    service: input_boolean.turn_off
  id: 692b8faa187c496d81ef76fcb2e60b82
- alias: Number 9
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_9
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_9
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_9
    service: input_boolean.turn_off
  id: 6f5f520d30aa4a72a7457bfd68cf6a4e
- alias: Number 0
  trigger:
  - entity_id: input_boolean.switch_tv_ir_num_0
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.remote_ir_number_0
    service: switch.turn_on
  - data:
      entity_id: input_boolean.switch_tv_ir_num_0
    service: input_boolean.turn_off
  id: b2404194fe824518bd753c23d08b8ba4
- id: '1532561522881'
  alias: Play song test
  trigger:
  - entity_id: automation.both_buttons_bathroom_lamp
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id:
      - media_player.kodi_libreeleclocal
      media_content_id: smb://10.0.4.86/share/sexy2.mp4
      media_content_type: video
    service: media_player.play_media
- id: '1532581420994'
  alias: play youtube
  trigger:
  - entity_id: binary_sensor.wall_switch_both_158d0001640b0d
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id:
      - media_player.kodi_libreeleclocal
      media_content_id: smb://10.0.4.86/share/sexy.mp3
      media_content_type: music
    service: media_player.play_media

scripts.yaml

'1532659074431':
  alias: chillout
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: smb://10.0.4.86/share/relax.mp4
      media_content_type: video
'1532659272895':
  alias: fireplace
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.youtube/play/?video_id=L_LUpnjgPso
      media_content_type: video
'1532659387113':
  alias: too sexy
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: smb://10.0.4.86/share/sexy.mp3
      media_content_type: audio
'1532671463982':
  alias: Carl cox
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: smb://10.0.4.86/share/carlcox.mp4
      media_content_type: video
'1532998040612':
  alias: boil the jug
  sequence:
  - data: {}
    service: switch.turn_on
    entity_id: switch.extension_cable
'1533005431628':
  alias: Nastia Kazantip
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: smb://10.0.4.86/share/nastiakazantip.mp4
      media_content_type: video
'1533005467987':
  alias: DeadMau5
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: smb://10.0.4.86/share/deadmau5space.mp4
      media_content_type: video
'1533361874576':
  alias: super troopers 2
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: smb://10.0.4.86/share/super.mp4
      media_content_type: video
camera:
  alias: camera
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: rtsp://10.0.4.60:554/unicast
      media_content_type: video
surfcam:
  alias: surf camera
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: https://www.bonnyhillsbeachhouse.com.au/surfcam_stream/surfcam.jpg
      media_content_type: picture
cartoons:
  alias: cartoons
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/651
      media_content_type: video
tvhgtv:
  alias: HGTV
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_231148701.pvr
      media_content_type: video
radioiheartdance:
  alias: iHeart Radio Dance
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/radio/All channels/pvr.iptvsimple_1299185395.pvr
      media_content_type: audio
radiotriplej:
  alias: Triple J
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/radio/All channels/pvr.iptvsimple_1788973478.pvr
      media_content_type: audio
gaiahome:
  alias: movies list new release
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.gaia/?action=movies&kids=0&type=movie&url=home
      media_content_type: video
tvsyfy:
  alias: SYFY
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/221
      media_content_type: video
tv9go:
  alias: 9 Go
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1909462257.pvr
      media_content_type: video
tv9gem:
  alias: 9 Gem
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_147617138.pvr
      media_content_type: video
    entity_id: media_player.kodi__philips_tv
    service: media_player.play_media
tv9life:
  alias: 9 Life
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_91377046.pvr
      media_content_type: video
tv9nine:
  alias: Nine
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_909901772.pvr
      media_content_type: video
tvabcme:
  alias: ABC Me
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1026795266.pvr
      media_content_type: video
tvabckids:
  alias: ABC Kids
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_845990375.pvr
      media_content_type: video
tvabccomedy:
  alias: ABC Comedy
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_456440966.pvr
      media_content_type: video
tvabcnews:
  alias: ABC News
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_68378025.pvr
      media_content_type: video
tvabc:
  alias: ABC
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_205449645.pvr
      media_content_type: video
tv7:
  alias: Seven
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1670374243.pvr
      media_content_type: video
tv7two:
  alias: Seven Two
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1598048305.pvr
      media_content_type: video
tv7mate:
  alias: Seven Mate
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_744882531.pvr
      media_content_type: video
tv7flix:
  alias: Seven flix
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1541799317.pvr
      media_content_type: video
tvracing:
  alias: Racing
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1811984037.pvr
      media_content_type: video
tvone:
  alias: One HD
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1010001538.pvr
      media_content_type: video
tvten:
  alias: Ten
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1723966549.pvr
      media_content_type: video
tveleven:
  alias: Eleven
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_996693626.pvr
      media_content_type: video
tvsbs:
  alias: SBS
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_580391585.pvr
      media_content_type: video
tvsbsvice:
  alias: SBS Viceland
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_904001498.pvr
      media_content_type: video
tvfood:
  alias: Food Network
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_206596524.pvr
      media_content_type: video
tvnitv:
  alias: NITV
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_874022844.pvr
      media_content_type: video
tvfoxnews:
  alias: Fox News
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_1231137647.pvr
      media_content_type: video
tvredbull:
  alias: Redbull TV
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.au.freeview/?_route=home&play=tv.redbull.tv&_l=.pvr
      media_content_type: video
tvtlc:
  alias: TLC
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/288
      media_content_type: video
tvngwild:
  alias: NatGeo Wild
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/157
      media_content_type: video
tvh2:
  alias: H2
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/126
      media_content_type: video
tvhistory:
  alias: History Channel
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/131
      media_content_type: video
tvdiscshed:
  alias: Discovery Turbo Shed
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/268
      media_content_type: video
tvdiscturbo:
  alias: Discovery Turbo
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/267
      media_content_type: video
tvdiscscience:
  alias: Discovery Science
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/93
      media_content_type: video
tvdisc:
  alias: Discovery
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/91
      media_content_type: video
tvnatgeo:
  alias: National Geographic
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/155
      media_content_type: video
tvshowtime:
  alias: Showtime
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/472
      media_content_type: video
tvmtv:
  alias: MTV
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/150
      media_content_type: video
tvmtvclassic:
  alias: MTV Classic
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/151
      media_content_type: video
tvmtvhits:
  alias: MTV Hits
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/152
      media_content_type: video
tvmtvdance:
  alias: MTV Dance
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/295
      media_content_type: video
tvmtvmusic:
  alias: MTV Music
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/348
      media_content_type: video
tvmtvrocks:
  alias: MTV Rocks
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/296
      media_content_type: video
tvfs1:
  alias: Fox Sports 1
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/120
      media_content_type: video
tvfs2:
  alias: Fox Sports 2
  sequence:
  - data:
      entity_id: input_boolean.switch_kodi
    service: input_boolean.turn_on
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: plugin://plugin.video.tvtap/play/121
      media_content_type: video
'1536933034694':
  alias: bed time
  sequence:
  - data:
      brightness: '20'
      entity_id: light.yeelight_rgb_7811dc6840f6
      rgb_color: '[255,177,110]'
    service: light.turn_on
  - data:
      brightness: '51'
      entity_id: light.ledrgb2_nodemcu03
      rgb_color: '[255,63,0]'
    service: light.turn_on
  - data:
      entity_id: light.ledrgb_nodemcu02
    service: light.turn_off
  - data:
      entity_id: light.kitchen_lamp
    service: light.turn_off
'1537183229122':
  alias: Mafia 3 Playstation 4
  sequence:
  - data:
      entity_id: media_player.playstation_4
      source: Mafia III
    service: media_player.select_source
ytlink:
  alias: youtube link
  sequence:
  - service: media_player.play_media
    entity_id: media_player.kodi__philips_tv
    data:
      media_content_id: "{{ states.input_text.youtube_link.state }}"
      media_content_type: video

Hope this helps and gives some ideas.also have a custom universal media player
configuration.yaml

media_players:
  - platform: universal
    name: Test Universal
    state_template: >
      {% if is_state('switch.remote_ir_kodi', 'idle')
      and is_state('switch.remote_ir_ps4', 'off')
      and is_state('switch.remote_freeview_on', 'off')
      and is_state('switch.remote_ir_xbox', 'off')
      and is_state('switch.remote_ir_netflix', 'off') %}
      off
      {% else %}
      {{ states('media_player.philips_ir_control') }}
      {% endif %}
    children:
      - media_player.playstation_4
      - media_player.43put680179
      - media_player.kodi__philips_tv
      - media_player.philips_ir_control
    commands:
      turn_on:
        service: media_player.turn_on
        data:
          entity_id: switch.remote_ir_power
      turn_off:
        service: media_player.turn_off
        data:
          entity_id: media_player.playstation_4
        service: media_player.media_stop
        data:
          entity_id: media_player.kodi__philips_tv
        service: switch.turn_off
        data:
          entity_id: switch.remote_ir_power
      volume_up:
        service: media_player.volume_up
        data:
          entity_id: media_player.philips_ir_control
      volume_down:
        service: media_player.volume_down
        data:
          entity_id: media_player.philips_ir_control
      volume_mute:
        service: media_player.volume_mute
        data:
          entity_id: media_player.philips_ir_control
      select_source:
        service: media_player.select_source
        data_template:
          entity_id: media_player.philips_ir_control
          source: '{{ source }}'
      volume_set:
        service: media_player.volume_set
        data_template:
          entity_id: media_player.philips_ir_control
          volume_level: '{{ volume_level }}'

    attributes:
      state: switch.living_room_tv
      is_volume_muted: switch.living_room_mute
      volume_level: media_player.philips_ir_control|volume_level
      source: media_player.philips_ir_control|source
      source_list: media_player.philips_ir_control|source_list

Also used custom PS4 media player with ps4 waker to have custom ps4 media player game select and power control etc. see Playstation 4/PS4 custom component for tutorial

hello,
how to get this pvr file or shortcut?
“data:
media_content_id: pvr://channels/tv/All channels/pvr.iptvsimple_231148701.pvr

add channel to kodi favorites
look for favorites.xml in userdata folder kodi

edit favorites.xml and find the favorite you just added should be the pvr:/ u are looking for located there

1 Like

thank you! Very good post. Help a lot