mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-07 02:18:43 +00:00
Extract and streamline target humidity card
This commit is contained in:
@@ -22,29 +22,8 @@ philips_airpurifier_card:
|
|||||||
tap_action:
|
tap_action:
|
||||||
action: call-service
|
action: call-service
|
||||||
service: script.purifier_toggle_function
|
service: script.purifier_toggle_function
|
||||||
- type: custom:button-card
|
- type: custom:decluttering-card
|
||||||
template:
|
template: purifier_target_humidity
|
||||||
- small
|
|
||||||
- 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: 70
|
|
||||||
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)
|
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
purifier_target_humidity:
|
||||||
|
card:
|
||||||
|
type: custom:button-card
|
||||||
|
template:
|
||||||
|
- small
|
||||||
|
- 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)
|
||||||
@@ -68,29 +68,8 @@
|
|||||||
state_indicator_off_size: 0px
|
state_indicator_off_size: 0px
|
||||||
state_indicator_on_color: var(--color-red)
|
state_indicator_on_color: var(--color-red)
|
||||||
state_on_indicator_on_color: var(--color-red)
|
state_on_indicator_on_color: var(--color-red)
|
||||||
- type: custom:button-card
|
- type: custom:decluttering-card
|
||||||
template:
|
template: purifier_target_humidity
|
||||||
- small
|
|
||||||
- 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: 70
|
|
||||||
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)
|
|
||||||
- type: custom:button-card
|
- type: custom:button-card
|
||||||
template: default
|
template: default
|
||||||
entity: binary_sensor.house_mode
|
entity: binary_sensor.house_mode
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ script:
|
|||||||
alias: Purifier · Toggle function
|
alias: Purifier · Toggle function
|
||||||
sequence:
|
sequence:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.purifier_out_of_water
|
entity_id: binary_sensor.purifier_out_of_water
|
||||||
state: 'off'
|
state: 'off'
|
||||||
- service: philips_airpurifier.set_function
|
- service: philips_airpurifier.set_function
|
||||||
entity_id: fan.philips_airpurifier
|
entity_id: fan.philips_airpurifier
|
||||||
@@ -239,6 +239,7 @@ automation:
|
|||||||
data_template:
|
data_template:
|
||||||
option: "{{ states('sensor.purifier_target_humidity') }}"
|
option: "{{ states('sensor.purifier_target_humidity') }}"
|
||||||
- service: script.purifier_request_update
|
- service: script.purifier_request_update
|
||||||
|
|
||||||
- alias: Purifier · Turn on · Low humidity
|
- alias: Purifier · Turn on · Low humidity
|
||||||
trigger:
|
trigger:
|
||||||
platform: numeric_state
|
platform: numeric_state
|
||||||
|
|||||||
Reference in New Issue
Block a user