mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-21 10:57:43 +00:00
Move config out of subfolder
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
ac_button:
|
||||
template: default
|
||||
entity: climate.toshiba_ac
|
||||
name: AC
|
||||
state:
|
||||
- value: 'off'
|
||||
operator: '!='
|
||||
styles:
|
||||
card:
|
||||
- background-color: var(--primary-color)
|
||||
- color: black
|
||||
icon:
|
||||
- color: black
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.toshiba_ac_toggle
|
||||
@@ -0,0 +1,53 @@
|
||||
brita_water:
|
||||
template: [default, with_state_indicator]
|
||||
name: Brita water
|
||||
entity: script.brita_pour_water
|
||||
custom_fields:
|
||||
remaining_liters: "[[[ return states['input_number.brita_remaining_liters'].state ]]]"
|
||||
tap_action:
|
||||
action: toggle
|
||||
styles:
|
||||
card:
|
||||
- background: >
|
||||
[[[
|
||||
const remaining = states['input_number.brita_remaining_liters'].state;
|
||||
const percent = 100 - (remaining / 150 * 100);
|
||||
|
||||
const gradient = [
|
||||
'180deg',
|
||||
'var(--paper-card-background-color) 0%',
|
||||
`var(--paper-card-background-color) ${percent}%`,
|
||||
`var(--primary-color) ${percent}%`
|
||||
]
|
||||
|
||||
return `linear-gradient(${gradient.join(',')})`;
|
||||
]]]
|
||||
- color: white
|
||||
name:
|
||||
- color: >
|
||||
[[[
|
||||
const remaining = states['input_number.brita_remaining_liters'].state;
|
||||
const percent = 100 - (remaining / 150 * 100);
|
||||
|
||||
return percent < 75 ? 'black' : 'white';
|
||||
]]]
|
||||
icon:
|
||||
- color: >
|
||||
[[[
|
||||
const remaining = states['input_number.brita_remaining_liters'].state;
|
||||
const percent = 100 - (remaining / 150 * 100);
|
||||
|
||||
return percent < 25 ? 'black' : 'white';
|
||||
]]]
|
||||
custom_fields:
|
||||
remaining_liters:
|
||||
- position: absolute
|
||||
- top: 8px
|
||||
- right: 5px
|
||||
- font-size: 12px
|
||||
variables:
|
||||
state_indicator_id: binary_sensor.brita_should_change_filter
|
||||
state_indicator_size: 5px
|
||||
state_indicator_off_size: 0px
|
||||
state_indicator_on_color: var(--color-red)
|
||||
state_on_indicator_on_color: var(--color-red)
|
||||
@@ -0,0 +1,5 @@
|
||||
cover:
|
||||
icon: >
|
||||
[[[
|
||||
return entity.state === "open" ? "mdi:window-shutter-open" : "mdi:window-shutter";
|
||||
]]]
|
||||
@@ -0,0 +1,17 @@
|
||||
hallway_dashboard_mode:
|
||||
template: [small]
|
||||
entity: input_select.hallway_dashboard_mode
|
||||
show_state: true
|
||||
show_name: false
|
||||
styles:
|
||||
state:
|
||||
- position: relative
|
||||
- top: -6px
|
||||
icon:
|
||||
- position: relative
|
||||
- top: -2px
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: input_select.select_next
|
||||
service_data:
|
||||
entity_id: input_select.hallway_dashboard_mode
|
||||
@@ -0,0 +1,18 @@
|
||||
radiator_button:
|
||||
template: [default]
|
||||
name: "Radiator"
|
||||
icon: mdi:radiator
|
||||
state:
|
||||
- value: "off"
|
||||
operator: "!="
|
||||
styles:
|
||||
card:
|
||||
- background-color: var(--primary-color)
|
||||
- color: black
|
||||
icon:
|
||||
- color: black
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.toggle_radiator
|
||||
service_data:
|
||||
entity_id: "[[[ return entity.entity_id ]]]"
|
||||
Reference in New Issue
Block a user