Tweak bedroom dashboard

This commit is contained in:
2020-06-07 22:55:55 +03:00
parent 62bbda784a
commit 034ff4aed8
2 changed files with 46 additions and 60 deletions
@@ -0,0 +1,152 @@
- type: custom:mod-card
style:
layout-card:
$:
.: |
#columns {
padding: 0 10px;
}
#columns .column {
padding: 10px 10px;
}
card:
type: custom:layout-card
layout: horizontal
max_columns: 2
cards:
- type: vertical-stack
title: Bedroom
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
entity: light.master_bedroom
name: Bedroom
- type: custom:button-card
template: default
entity: light.master_bedroom_main
name: Main
- type: custom:button-card
template: default
entity: light.bed_led
name: Bed
- type: custom:button-card
template: default
entity: light.bedside
name: Bedside
- type: vertical-stack
title: Controls
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template:
- default
- with_state_indicator
entity: input_boolean.alarm_enabled
state_display: >-
[[[
const time = states['input_datetime.alarm_time'].state;
return time.split(':').slice(0, -1).join(':');
]]]
show_state: true
show_name: false
styles:
icon:
- transform: translateY(-8px) # adjusted for state indicator size
state:
- transform: translateY(-13px) # adjusted for state indicator size
variables:
state_indicator_id: automation.alarm_set_time
- type: custom:button-card
template: default
entity: binary_sensor.house_mode
- type: custom:button-card
template:
- default
- scene
entity: script.scene_bedroom_neon
name: Neon
variables:
scene_color_1: rgb(255, 0, 190)
scene_color_2: rgb(0, 255, 190)
- type: custom:button-card
template:
- default
- scene
entity: script.scene_bedroom_regular
name: Regular
variables:
scene_color_1: rgb(254, 255, 209)
- type: horizontal-stack
title: Purifier
cards:
- type: custom:button-card
template:
- default
- with_state_indicator
entity: fan.philips_airpurifier
variables:
state_indicator_id: binary_sensor.purifier_filter_needs_change
state_indicator_size: 5px
state_indicator_off_size: 0px
state_indicator_on_color: var(--color-red)
state_on_indicator_on_color: var(--color-red)
- type: custom:decluttering-card
template: purifier_target_humidity
- type: custom:button-card
template:
- small
- progress
entity: sensor.purifier_air_quality
variables:
min_value: 1
max_value: 30
normal_value: 1
high_value: 20
- type: custom:button-card
template:
- small
- progress
entity: sensor.purifier_allergens
variables:
min_value: 1
max_value: 30
normal_value: 1
high_value: 10
- type: custom:decluttering-card
template: media_with_controls
variables:
- player: media_player.master_bedroom
- player_name: Bedroom
- type: vertical-stack
cards:
- type: horizontal-stack
title: Sensors
cards:
- type: custom:button-card
template: default
entity: binary_sensor.bedroom_door
name: Door
- type: custom:button-card
template: default
entity: binary_sensor.bedroom_left_window
name: Left window
- type: custom:button-card
template: default
entity: binary_sensor.bedroom_right_window
name: Right window
- type: custom:decluttering-card
template: climate_card
variables:
- title: "Climate"
- main_entity: sensor.bedroom_weather_temperature
- left_entity: sensor.bedroom_weather_humidity
- right_entity: sensor.bedroom_weather_pressure