Files
sarah/config/floorplan-lovelace.yaml
T
2020-03-30 20:47:18 +03:00

420 lines
14 KiB
YAML

custom_header:
hide_header: true
decluttering_templates: !include_dir_merge_named lovelace/templates
title: Floorplan
views:
- title: Floorplan
path: floorplan
panel: true
icon: mdi:floor-plan
cards:
- type: picture-elements
image: /local/images/floorplan/floorplan_night_transparent.png
style: |
height: 100%
elements:
- type: conditional
conditions:
- entity: sun.sun
state: "above_horizon"
- entity: input_boolean.floorplan_night_mode
state: "off"
elements:
- type: image
entity: sun.sun
action: none
hold_action:
action: none
image: /local/images/floorplan/floorplan_day.jpg
style:
height: 100%
left: 50%
top: 50%
width: 100%
tap_action:
action: none
#
# ─── LIGHTING OVERLAYS ─────────────────────────────────────────────────────────────────
#
# Living Room
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.pc
state: "on"
- entity: light.living_room_main_lights
state: "off"
elements:
- type: image
image: /local/images/floorplan/living_room_pc_light_on.png
tap_action: none
hold_action: none
style:
top: 71.04%
left: 65.92%
width: 38.5%
cursor: default
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.pc
state: "off"
- entity: light.living_room_main_lights
state: "on"
elements:
- type: image
image: /local/images/floorplan/living_room_main_lights_on.png
tap_action: none
hold_action: none
style:
top: 71.04%
left: 65.92%
width: 38.5%
cursor: default
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.pc
state: "on"
- entity: light.living_room_main_lights
state: "on"
elements:
- type: image
image: /local/images/floorplan/living_room_all_lights_on.png
tap_action: none
hold_action: none
style:
top: 71.04%
left: 65.92%
width: 38.5%
cursor: default
# Master Bedroom
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.bedside_light
state: "off"
- entity: light.master_bedroom_main_lights
state: "on"
elements:
- type: image
image: /local/images/floorplan/master_bedroom_main_lights_on.png
tap_action: none
hold_action: none
style:
top: 25.7%
left: 70.35%
width: 29%
cursor: default
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.bedside_light
state: "on"
- entity: light.master_bedroom_main_lights
state: "off"
elements:
- type: image
image: /local/images/floorplan/master_bedroom_bedside_light_on.png
tap_action: none
hold_action: none
style:
top: 25.7%
left: 70.35%
width: 29%
cursor: default
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.master_bedroom_main_lights
state: "on"
- entity: light.bedside_light
state: "on"
elements:
- type: image
image: /local/images/floorplan/master_bedroom_all_lights_on.png
tap_action: none
hold_action: none
style:
top: 25.7%
left: 70.35%
width: 29%
cursor: default
# Kitchen
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.tuya_kitchen_main_lights
state: "on"
elements:
- type: image
image: /local/images/floorplan/kitchen_main_lights_on.png
tap_action: none
hold_action: none
style:
top: 29%
left: 18.4%
width: 23.6%
cursor: default
# Hallway
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.tuya_hallway_entrance_lights
state: "on"
- entity: light.tuya_hallway_main_lights
state: "off"
elements:
- type: image
image: /local/images/floorplan/hallway_entrance_lights_on.png
tap_action: none
hold_action: none
style:
top: 25.8%
left: 42.7%
width: 25.4%
cursor: default
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.tuya_hallway_entrance_lights
state: "off"
- entity: light.tuya_hallway_main_lights
state: "on"
elements:
- type: image
image: /local/images/floorplan/hallway_main_lights_on.png
tap_action: none
hold_action: none
style:
top: 25.8%
left: 42.7%
width: 25.4%
cursor: default
- type: conditional
conditions:
- entity: binary_sensor.floorplan_night_mode
state: "on"
- entity: light.tuya_hallway_entrance_lights
state: "on"
- entity: light.tuya_hallway_main_lights
state: "on"
elements:
- type: image
image: /local/images/floorplan/hallway_all_lights_on.png
tap_action: none
hold_action: none
style:
top: 25.8%
left: 42.7%
width: 25.4%
cursor: default
#
# ─── LIGHT SWITCHES ────────────────────────────────────────────────────────────────────
#
- type: image
entity: light.pc
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 71%
left: 77.8%
- type: image
entity: light.living_room_main_lights
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 69.8%
left: 64.8%
width: 6%
height: 2%
- type: image
entity: light.master_bedroom_main_lights
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 25%
left: 69.5%
width: 6%
height: 2%
- type: image
entity: light.bedside_light
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 11.7%
left: 61.6%
width: 1.5%
- type: image
entity: light.tuya_kitchen_main_lights
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 29%
left: 20.3%
width: 3.2%
- type: image
entity: light.tuya_hallway_entrance_lights
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 26%
left: 50.2%
- type: image
entity: light.tuya_hallway_main_lights
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 41%
left: 34.8%
width: 4%
height: 2%
#
# ─── SENSORS ───────────────────────────────────────────────────────────────────────────
#
# Living room ───────────────────────────────────────────────────────────────────────────
- type: state-icon
entity: binary_sensor.titanium
tap_action:
action: call-service
service: script.titanium_start
style:
display: flex
align-items: center
justify-content: center
top: 62%
left: 80%
width: 35px
height: 35px
border-radius: 50%
background-color: "#fff"
box-shadow: 0 0 5px rgba(0, 0, 0, 0.6)
--divider-color: rgba(255, 255, 255, 0.4)
--paper-item-icon-color: rgba(50, 50, 50, 0.8)
--paper-item-icon-active-color: "#007cd6"
--iron-icon-width: 18px
--iron-icon-height: 18px
- type: conditional
conditions:
- entity: binary_sensor.living_room_right_window_on_off_wrapper
state: "on"
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: binary_sensor.living_room_right_window_on_off_wrapper
style:
width: 7.8%
height: 8.4%
top: 70.5%
left: 79.3%
background-color: rgba(255,0,0,0.5)
color: transparent
transform: perspective(2000px) rotateX(174.6deg) rotateZ(0deg) rotateY(74.1deg)
# Master Bedroom ────────────────────────────────────────────────────────────────────────
# Puifier
- type: state-icon
entity: fan.philips_airpurifier
icon: mdi:air-filter
tap_action:
action: toggle
style:
display: flex
align-items: center
justify-content: center
top: 44.5%
left: 62%
width: 35px
height: 35px
border-radius: 50%
background-color: "#fff"
box-shadow: 0 0 5px rgba(0, 0, 0, 0.6)
--divider-color: rgba(255, 255, 255, 0.4)
--paper-item-icon-color: rgba(50, 50, 50, 0.8)
--paper-item-icon-active-color: "#007cd6"
--iron-icon-width: 18px
--iron-icon-height: 18px
# Window
- type: conditional
conditions:
- entity: binary_sensor.bedroom_right_window_on_off_wrapper
state: "on"
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: binary_sensor.bedroom_right_window_on_off_wrapper
style:
width: 7.5%
height: 8.2%
top: 32.6%
left: 79.2%
background-color: rgba(255,0,0,0.5)
color: transparent
transform: perspective(2000px) rotateX(185.6deg) rotateY(73.1deg)
# Temperature
- type: state-label
entity: sensor.bedroom_weather_temperature
style:
top: 38%
left: 74%
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
#
# ─── SYSTEM ────────────────────────────────────────────────────────────────────────────
#
# Dark mode override
- type: image
entity: input_boolean.floorplan_night_mode
tap_action:
action: toggle
image: /local/images/floorplan/transparent.png
style:
top: 1%
left: 1%
width: 10%