Streamline dashboards

This commit is contained in:
2020-06-07 23:17:49 +03:00
parent bf59dc3b9b
commit 8112cd525f
6 changed files with 85 additions and 86 deletions
@@ -7,7 +7,7 @@
padding: 0 10px; padding: 0 10px;
} }
#columns .column { #columns .column {
padding: 10px 10px; padding: 0 10px;
} }
card: card:
type: custom:layout-card type: custom:layout-card
@@ -7,7 +7,7 @@
padding: 0 10px; padding: 0 10px;
} }
#columns .column { #columns .column {
padding: 10px 10px; padding: 0 10px;
} }
card: card:
type: custom:layout-card type: custom:layout-card
@@ -7,7 +7,7 @@
padding: 0 10px; padding: 0 10px;
} }
#columns .column { #columns .column {
padding: 10px 10px; padding: 0 10px;
} }
card: card:
type: custom:layout-card type: custom:layout-card
@@ -33,12 +33,15 @@
entity: light.hallway_main entity: light.hallway_main
name: Main name: Main
- type: vertical-stack
cards:
- type: horizontal-stack - type: horizontal-stack
title: Sensors
cards: cards:
- type: custom:button-card - type: custom:button-card
template: default template: default
entity: binary_sensor.front_door entity: binary_sensor.front_door
name: Door name: Front door
- type: custom:button-card - type: custom:button-card
template: template:
- default - default
@@ -7,7 +7,7 @@
padding: 0 10px; padding: 0 10px;
} }
#columns .column { #columns .column {
padding: 10px 10px; padding: 0 10px;
} }
card: card:
type: custom:layout-card type: custom:layout-card
@@ -87,7 +87,10 @@
- player: media_player.kitchen - player: media_player.kitchen
- player_name: Kitchen - player_name: Kitchen
- type: vertical-stack
cards:
- type: horizontal-stack - type: horizontal-stack
title: Sensors
cards: cards:
- type: custom:button-card - type: custom:button-card
template: default template: default
@@ -120,8 +123,6 @@
variables: variables:
state_indicator_id: automation.lighting_hallway_day_mode_motion_turn_lights_on state_indicator_id: automation.lighting_hallway_day_mode_motion_turn_lights_on
- type: vertical-stack
cards:
- type: custom:decluttering-card - type: custom:decluttering-card
template: climate_card template: climate_card
variables: variables:
@@ -7,7 +7,7 @@
padding: 0 10px; padding: 0 10px;
} }
#columns .column { #columns .column {
padding: 10px 10px; padding: 0 10px;
} }
card: card:
type: custom:layout-card type: custom:layout-card
@@ -7,7 +7,7 @@
padding: 0 10px; padding: 0 10px;
} }
#columns .column { #columns .column {
padding: 10px 10px; padding: 0 10px;
} }
card: card:
type: custom:layout-card type: custom:layout-card
@@ -82,6 +82,46 @@
entity: light.hallway_entrance entity: light.hallway_entrance
name: Entrance name: Entrance
- type: horizontal-stack
title: Manual controls
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: input_boolean.speech_notifications
name: Speech
- type: custom:button-card
template: default
entity: binary_sensor.house_mode
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.house_mode
- type: custom:button-card
template: default
entity: input_boolean.guest_mode
tap_action:
action: toggle
- type: vertical-stack - type: vertical-stack
title: Devices title: Devices
cards: cards:
@@ -126,7 +166,6 @@
icon: mdi:nas icon: mdi:nas
tap_action: tap_action:
action: more-info action: more-info
- type: horizontal-stack - type: horizontal-stack
cards: cards:
- type: custom:button-card - type: custom:button-card
@@ -156,75 +195,6 @@
# Column 2 # Column 2
- type: vertical-stack - type: vertical-stack
cards: cards:
- type: vertical-stack
title: Manual 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: input_boolean.speech_notifications
name: Speech
- type: custom:button-card
template: default
entity: binary_sensor.house_mode
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.house_mode
- type: custom:button-card
template: default
entity: input_boolean.guest_mode
tap_action:
action: toggle
- type: vertical-stack
title: Climate
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template:
- small
- progress
entity: sensor.average_temperature
icon: mdi:thermometer
state_display: "[[[ return Math.round(entity.state) + ' °C' ]]]"
- type: custom:button-card
template:
- small
- progress
entity: sensor.average_humidity
icon: mdi:water-percent
state_display: "[[[ return Math.round(entity.state) + ' %' ]]]"
variables:
min_value: 25
max_value: 90
normal_value: 40
high_value: 65
low_color: "var(--color-red)"
- type: vertical-stack - type: vertical-stack
cards: cards:
- type: vertical-stack - type: vertical-stack
@@ -298,6 +268,31 @@
- type: entity - type: entity
entity: device_tracker.carbon entity: device_tracker.carbon
name: GPS name: GPS
- type: vertical-stack
title: Climate
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template:
- small
- progress
entity: sensor.average_temperature
icon: mdi:thermometer
state_display: "[[[ return Math.round(entity.state) + ' °C' ]]]"
- type: custom:button-card
template:
- small
- progress
entity: sensor.average_humidity
icon: mdi:water-percent
state_display: "[[[ return Math.round(entity.state) + ' %' ]]]"
variables:
min_value: 25
max_value: 90
normal_value: 40
high_value: 65
low_color: "var(--color-red)"
# Column 3 # Column 3
- type: vertical-stack - type: vertical-stack