TV UI tweaks

This commit is contained in:
2020-04-29 00:33:57 +03:00
parent 2c21122556
commit d1b840a490
13 changed files with 452 additions and 393 deletions
@@ -0,0 +1,10 @@
title: Remotes
path: remotes
icon: mdi:remote
cards:
- type: horizontal-stack
cards:
- type: custom:decluttering-card
template: hdmi_switch_remote_card
- type: custom:decluttering-card
template: bulsatcom_remote_card
@@ -1,372 +0,0 @@
title: Remotes
path: remotes
icon: mdi:remote
cards:
- type: horizontal-stack
cards:
- type: picture-elements
image: /local/images/remotes/hdmi_switcher.png
style: |
ha-card {
width: 60%
}
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_1
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 9.6%
left: 19.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_2
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 9.6%
left: 50%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_3
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 9.6%
left: 80.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_4
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 23%
left: 19.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_next
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 23%
left: 80.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_pip
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 63.7%
left: 19.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_sel
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 63.7%
left: 50%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_enter
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 63.7%
left: 80.5%
border-radius: 50%
- type: picture-elements
image: /local/images/remotes/bulsatcom.png
style: |
ha-card {
width: 60%
}
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_power
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 6.6%
left: 22%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_mute
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 6.6%
left: 81%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_ok
tap_action:
action: toggle
style:
width: 42.1%
height: 12%
top: 23%
left: 51.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_left
tap_action:
action: toggle
style:
width: 18%
height: 5%
top: 23%
left: 19%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_right
tap_action:
action: toggle
style:
width: 18%
height: 5%
top: 23%
left: 83.8%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_up
tap_action:
action: toggle
style:
width: 50%
height: 4%
top: 14%
left: 51%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_down
tap_action:
action: toggle
style:
width: 50%
height: 4%
top: 32%
left: 51%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_back
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 39%
left: 21.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_menu
tap_action:
action: toggle
style:
width: 28%
height: 8%
top: 43.5%
left: 51.4%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_info
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 39%
left: 81.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_volume_down
tap_action:
action: toggle
style:
width: 36.9%
height: 6.2%
top: 54%
left: 29.4%
border-top-left-radius: 45%
border-bottom-left-radius: 45%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_volume_up
tap_action:
action: toggle
style:
width: 36.9%
height: 6.2%
top: 54%
left: 72%
border-top-right-radius: 45%
border-bottom-right-radius: 45%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_1
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 20.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_2
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_3
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_4
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 20.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_5
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_6
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_7
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 21.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_8
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_9
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_epg
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 21.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_0
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_clock
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 81.5%
border-radius: 40%
@@ -0,0 +1,268 @@
bulsatcom_remote_card:
card:
type: picture-elements
image: /local/images/remotes/bulsatcom.png
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_power
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 6.6%
left: 22%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_mute
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 6.6%
left: 81%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_ok
tap_action:
action: toggle
style:
width: 42.1%
height: 12%
top: 23%
left: 51.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_left
tap_action:
action: toggle
style:
width: 18%
height: 5%
top: 23%
left: 19%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_right
tap_action:
action: toggle
style:
width: 18%
height: 5%
top: 23%
left: 83.8%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_up
tap_action:
action: toggle
style:
width: 50%
height: 4%
top: 14%
left: 51%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_down
tap_action:
action: toggle
style:
width: 50%
height: 4%
top: 32%
left: 51%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_back
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 39%
left: 21.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_menu
tap_action:
action: toggle
style:
width: 28%
height: 8%
top: 43.5%
left: 51.4%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_info
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 39%
left: 81.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_volume_down
tap_action:
action: toggle
style:
width: 36.9%
height: 6.2%
top: 54%
left: 29.4%
border-top-left-radius: 45%
border-bottom-left-radius: 45%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_volume_up
tap_action:
action: toggle
style:
width: 36.9%
height: 6.2%
top: 54%
left: 72%
border-top-right-radius: 45%
border-bottom-right-radius: 45%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_1
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 20.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_2
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_3
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_4
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 20.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_5
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_6
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_7
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 21.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_8
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_9
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_epg
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 21.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_0
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_clock
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 81.5%
border-radius: 40%
@@ -0,0 +1,93 @@
hdmi_switch_remote_card:
card:
type: picture-elements
image: /local/images/remotes/hdmi_switcher.png
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_1
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 9.6%
left: 19.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_2
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 9.6%
left: 50%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_3
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 9.6%
left: 80.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_4
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 23%
left: 19.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_next
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 23%
left: 80.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_pip
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 63.7%
left: 19.5%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_sel
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 63.7%
left: 50%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.hdmi_switch_enter
tap_action:
action: toggle
style:
width: 23.6%
height: 11.8%
top: 63.7%
left: 80.5%
border-radius: 50%
@@ -70,11 +70,10 @@
- type: custom:button-card
template: default
entity: media_player.nvidia_shield
name: TV
icon: mdi:television
tap_action:
action: call-service
service: media_player.toggle
service_data:
entity_id: media_player.nvidia_shield
action: toggle
state:
- value: 'playing'
styles:
@@ -93,12 +92,15 @@
- type: custom:button-card
template: default
entity: media_player.living_room_tv
tap_action:
action: toggle
entity: switch.titanium_power
- type: custom:button-card
template: default
entity: switch.titanium_power
entity: sensor.synology_dsm_type_volume_1
name: Platinum
icon: mdi:nas
tap_action:
action: more-info
- type: horizontal-stack
cards:
@@ -109,13 +111,6 @@
- type: custom:button-card
template: default
entity: fan.philips_airpurifier
- type: custom:button-card
template: default
entity: sensor.synology_dsm_type_volume_1
name: Platinum
icon: mdi:nas
tap_action:
action: more-info
- type: custom:button-card
template: default
entity: binary_sensor.pi_hole_enabled
+43 -1
View File
@@ -124,12 +124,45 @@ media_player.master_bedroom:
variables:
- player: media_player.master_bedroom
media_player.nvidia_shield:
media_player.nvidia_shield: &nvidia_shield
title: TV
style: *popup_style
card:
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
icon: mdi:set-top-box
name: Set to Shield
template: default
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.living_room_tv
source: Shield
- type: custom:button-card
name: Set to Switch
icon: mdi:video-input-hdmi
template: default
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.living_room_tv
source: Switch
- type: custom:button-card
name: Bulsatcom
icon: mdi:remote-tv
template: default
tap_action:
action: call-service
service: script.tv_bulsatcom_toggle
- type: "custom:mini-media-player"
entity: media_player.nvidia_shield
@@ -141,6 +174,15 @@ media_player.nvidia_shield:
variables:
- player: media_player.living_room
- type: horizontal-stack
cards:
- type: custom:decluttering-card
template: hdmi_switch_remote_card
- type: custom:decluttering-card
template: bulsatcom_remote_card
media_player.living_room_tv: *nvidia_shield
light.living_room_main_lights:
title: Living room lights
style: *popup_style