Add button to control state icon visibility in Floorplan

This commit is contained in:
2020-04-20 13:04:07 +03:00
parent ab4d1a9971
commit f16aebc31a
3 changed files with 138 additions and 123 deletions
@@ -1,47 +1,138 @@
- type: conditional
conditions:
- entity: input_boolean.floorplan_show_all
state: 'on'
elements:
# Living room ─────────────────────────────────────────────────────────────────────────── # Living room ───────────────────────────────────────────────────────────────────────────
# Titanium
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: binary_sensor.titanium
- top: 62%
- left: 81%
- tap_action:
action: call-service
service: script.titanium_start
# Titanium # Platinum
- type: custom:decluttering-card - type: custom:decluttering-card
template: floorplan_state_icon template: floorplan_state_with_icon
variables: variables:
- entity: binary_sensor.titanium - entity: sensor.synology_dsm_type_volume_1
- top: 62% - top: 54%
- left: 81% - left: 75%
- tap_action: - icon: mdi:nas
action: call-service - tap_action:
service: script.titanium_start action: more-info
# Platinum # Shield + TV
- type: custom:decluttering-card - type: custom:decluttering-card
template: floorplan_state_with_icon template: floorplan_state_with_icon
variables: variables:
- entity: sensor.synology_dsm_type_volume_1 - entity: media_player.nvidia_shield
- top: 54% - top: 54%
- left: 75% - left: 60%
- icon: mdi:nas - icon: mdi:set-top-box
- tap_action: - tap_action:
action: more-info action: more-info
# Shield + TV # Camera
- type: custom:decluttering-card - type: custom:decluttering-card
template: floorplan_state_with_icon template: floorplan_state_with_icon
variables: variables:
- entity: media_player.nvidia_shield - entity: switch.camera
- top: 54% - top: 83%
- left: 60% - left: 48%
- icon: mdi:set-top-box - icon: mdi:video
- tap_action:
action: more-info
# Camera # Master Bedroom ────────────────────────────────────────────────────────────────────────
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: switch.camera
- top: 83%
- left: 48%
- icon: mdi:video
# Puifier
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: fan.philips_airpurifier
- top: 44.5%
- left: 61.6%
# Sonos
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: media_player.master_bedroom
- top: 44.5%
- left: 66%
- icon: mdi:speaker
- tap_action:
action: more-info
# Temperature
- type: state-label
entity: sensor.bedroom_weather_temperature
style:
top: 41%
left: 75%
color: "#000"
border-radius: 6px
text-align: center
background-color: "rgba(255, 255, 255, 0.9)"
font-size: 13px
font-weight: bold
line-height: 8px
# Kitchen ────────────────────────────────────────────────────────────────────────
# Sonos
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: media_player.kitchen
- top: 19%
- left: 16%
- icon: mdi:speaker
- tap_action:
action: more-info
# Motion
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: binary_sensor.motion_1_ias_zone
- top: 34%
- left: 27%
- tap_action:
action: more-info
# Bathroom ────────────────────────────────────────────────────────────────────────
# Sonos
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: media_player.bathroom
- top: 25%
- left: 39%
- icon: mdi:speaker
- tap_action:
action: more-info
# Hallway ────────────────────────────────────────────────────────────────────────
# Motion
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: binary_sensor.motion_2_ias_zone
- top: 34%
- left: 54%
- tap_action:
action: more-info
# Always visible ────────────────────────────────────────────────────────────────────────
# Living room window
- type: conditional - type: conditional
conditions: conditions:
- entity: binary_sensor.living_room_right_window_on_off_wrapper - entity: binary_sensor.living_room_right_window_on_off_wrapper
@@ -59,28 +150,7 @@
color: transparent color: transparent
transform: perspective(2000px) rotateX(174.6deg) rotateZ(0deg) rotateY(74.1deg) transform: perspective(2000px) rotateX(174.6deg) rotateZ(0deg) rotateY(74.1deg)
# Master Bedroom ──────────────────────────────────────────────────────────────────────── # Master bedroom window
# Puifier
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: fan.philips_airpurifier
- top: 44.5%
- left: 61.6%
# Sonos
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: media_player.master_bedroom
- top: 44.5%
- left: 66%
- icon: mdi:speaker
- tap_action:
action: more-info
# Window
- type: conditional - type: conditional
conditions: conditions:
- entity: binary_sensor.bedroom_right_window_on_off_wrapper - entity: binary_sensor.bedroom_right_window_on_off_wrapper
@@ -97,66 +167,3 @@
background-color: rgba(255,0,0,0.5) background-color: rgba(255,0,0,0.5)
color: transparent color: transparent
transform: perspective(2000px) rotateX(185.6deg) rotateY(73.1deg) transform: perspective(2000px) rotateX(185.6deg) rotateY(73.1deg)
# Temperature
- type: state-label
entity: sensor.bedroom_weather_temperature
style:
top: 41%
left: 75%
color: "#000"
border-radius: 6px
text-align: center
background-color: "rgba(255, 255, 255, 0.9)"
font-size: 13px
font-weight: bold
line-height: 8px
# Kitchen ────────────────────────────────────────────────────────────────────────
# Sonos
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: media_player.kitchen
- top: 19%
- left: 16%
- icon: mdi:speaker
- tap_action:
action: more-info
# Motion
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: binary_sensor.motion_1_ias_zone
- top: 34%
- left: 27%
- tap_action:
action: more-info
# Bathroom ────────────────────────────────────────────────────────────────────────
# Sonos
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: media_player.bathroom
- top: 25%
- left: 39%
- icon: mdi:speaker
- tap_action:
action: more-info
# Hallway ────────────────────────────────────────────────────────────────────────
# Motion
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: binary_sensor.motion_2_ias_zone
- top: 34%
- left: 54%
- tap_action:
action: more-info
@@ -8,3 +8,10 @@
- left: 1.8% - left: 1.8%
- icon: mdi:white-balance-sunny - icon: mdi:white-balance-sunny
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: input_boolean.floorplan_show_all
- top: 9.5%
- left: 1.8%
- icon: mdi:arrow-expand-all
+1
View File
@@ -1,6 +1,7 @@
input_boolean: input_boolean:
floorplan_night_mode: floorplan_night_mode:
initial: off initial: off
floorplan_show_all:
binary_sensor: binary_sensor:
- platform: template - platform: template