UI Improvements

This commit is contained in:
2021-10-10 20:21:21 +03:00
parent eac9cb9d72
commit 1798a8da65
6 changed files with 48 additions and 37 deletions
@@ -5,10 +5,13 @@ philips_airpurifier_card:
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
template: [v3_button_purifier, v3_popup_button]
entity: fan.philips_airpurifier
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: default
template: [v3_button, v3_popup_button]
entity: sensor.purifier_speed
tap_action:
action: call-service
@@ -16,21 +19,45 @@ philips_airpurifier_card:
service_data:
entity_id: input_select.purifier_speed
- type: custom:button-card
template: default
template: [v3_button, v3_popup_button]
entity: sensor.purifier_preset_mode
state_display: "[[[ return entity.state.charAt(0).toUpperCase() + entity.state.slice(1); ]]]"
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.purifier_preset_mode
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
template: [v3_button, v3_popup_button]
entity: sensor.purifier_function
tap_action:
action: call-service
service: script.purifier_toggle_function
- type: custom:decluttering-card
template: purifier_target_humidity
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: [v3_button, v3_popup_button]
entity: sensor.purifier_target_humidity
variables:
value_has_error: |
[[[
return states['binary_sensor.purifier_out_of_water'].state === 'on';
]]]
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.purifier_target_humidity
- type: custom:button-card
template: [v3_button, v3_popup_button]
entity: binary_sensor.purifier_filter_needs_change
variables:
value_has_error: "[[[ return entity.state === 'on' ]]]"
- type: entities
show_header_toggle: false
@@ -40,7 +67,6 @@ philips_airpurifier_card:
type: custom:template-entity-row
name: Sensors
icon: mdi:air-purifier
open: true
entities:
- sensor.purifier_air_quality
- sensor.purifier_allergens
@@ -51,7 +77,7 @@ philips_airpurifier_card:
head:
type: custom:template-entity-row
name: Attributes
open: true
icon: mdi:view-headline
entities:
- sensor.purifier_speed
- sensor.purifier_preset_mode
@@ -66,6 +92,7 @@ philips_airpurifier_card:
head:
type: custom:template-entity-row
name: Filters
icon: mdi:air-filter
entities:
- sensor.purifier_pre_filter
- sensor.purifier_hepa_filter
@@ -1,22 +0,0 @@
purifier_target_humidity:
card:
type: custom:button-card
template: [regular, progress, with_state_indicator]
entity: sensor.purifier_target_humidity
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.purifier_target_humidity
show_state: true
show_icon: false
variables:
min_value: 30
max_value: 60
normal_value: 61
high_value: 61
state_indicator_id: binary_sensor.purifier_out_of_water
state_indicator_size: 5px
state_indicator_off_size: 0px
state_indicator_on_color: var(--color-red)
state_on_indicator_on_color: var(--color-red)
@@ -130,7 +130,7 @@ card:
- type: custom:button-card
template: [v3_button_cover, v3_tablet_button]
entity: cover.living_room
name: LR Cover
name: LR Blinds
tap_action:
action: call-service
service: script.toggle_living_room_cover
@@ -143,7 +143,7 @@ card:
- type: custom:button-card
template: [v3_button_cover, v3_tablet_button]
entity: cover.living_room
name: LR Cover
name: LR Blinds
tap_action:
action: call-service
service: script.toggle_living_room_cover
@@ -97,7 +97,7 @@ card:
- type: custom:button-card
template: [v3_button_cover, v3_tablet_button]
entity: cover.living_room
name: LR Cover
name: LR Blinds
tap_action:
action: call-service
service: script.toggle_living_room_cover
+10 -4
View File
@@ -102,20 +102,25 @@ media_player.nvidia_shield: &nvidia_shield
- type: horizontal-stack
cards:
- type: custom:button-card
template: [v3_button, v3_popup_button]
icon: mdi:set-top-box
name: Set to Shield
template: default
show_state: false
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.living_room_tv
source: Shield
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: [v3_button, v3_popup_button]
name: Set to Switch
icon: mdi:video-input-hdmi
template: default
show_state: false
tap_action:
action: call-service
service: media_player.select_source
@@ -124,9 +129,10 @@ media_player.nvidia_shield: &nvidia_shield
source: Switch
- type: custom:button-card
template: [v3_button, v3_popup_button]
name: Bulsatcom
icon: mdi:remote-tv
template: default
show_state: false
tap_action:
action: call-service
service: script.tv_bulsatcom_toggle
@@ -354,7 +360,7 @@ sensor.purifier_allergens:
template: bedroom_allergen_index_card
fan.philips_airpurifier:
title: Air purifier
title: Air Purifier
card:
type: custom:decluttering-card
template: philips_airpurifier_card