Add laundry drying dashboard button
This commit is contained in:
parent
5e1ec01c51
commit
588666a967
3 changed files with 145 additions and 0 deletions
|
|
@ -612,6 +612,7 @@ Estado atual:
|
||||||
- A automacao `secar_roupas_start` inicia o script ao ligar o helper.
|
- A automacao `secar_roupas_start` inicia o script ao ligar o helper.
|
||||||
- A automacao `secar_roupas_stop` desliga `climate.ar` ao desligar o helper.
|
- A automacao `secar_roupas_stop` desliga `climate.ar` ao desligar o helper.
|
||||||
- O script `script.secar_roupas_com_ar_condicionado` usa `climate.ar`.
|
- O script `script.secar_roupas_com_ar_condicionado` usa `climate.ar`.
|
||||||
|
- As dashboards `ui-lovelace.yaml` e `ui-overview.yaml` exibem um botao para alternar `input_boolean.secar_roupas`.
|
||||||
- A temperatura vem de `state_attr('climate.ar', 'current_temperature')`; nao ha sensor de umidade dedicado.
|
- A temperatura vem de `state_attr('climate.ar', 'current_temperature')`; nao ha sensor de umidade dedicado.
|
||||||
- O modo dominante e `dry`.
|
- O modo dominante e `dry`.
|
||||||
- `heat` so e usado abaixo de 21 C, com setpoint 24 C.
|
- `heat` so e usado abaixo de 21 C, com setpoint 24 C.
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,78 @@ views:
|
||||||
- dry
|
- dry
|
||||||
- fan_only
|
- fan_only
|
||||||
|
|
||||||
|
- type: custom:button-card
|
||||||
|
entity: input_boolean.secar_roupas
|
||||||
|
icon: mdi:hanger
|
||||||
|
name: Secar roupas
|
||||||
|
show_icon: true
|
||||||
|
show_name: true
|
||||||
|
show_state: false
|
||||||
|
show_label: false
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
|
hold_action:
|
||||||
|
action: more-info
|
||||||
|
custom_fields:
|
||||||
|
status: >
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? 'Secagem ativa' : 'Toque para iniciar';
|
||||||
|
]]]
|
||||||
|
mode: >
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? 'Dry dominante, heat so se esfriar' : 'Ar desligado ao parar';
|
||||||
|
]]]
|
||||||
|
styles:
|
||||||
|
card:
|
||||||
|
- padding: 18px
|
||||||
|
- border-radius: 22px
|
||||||
|
- background: |
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on'
|
||||||
|
? 'linear-gradient(135deg, rgba(255,184,108,0.24), rgba(80,250,123,0.10))'
|
||||||
|
: 'var(--ha-card-background, var(--card-background-color, #1c1c1c))';
|
||||||
|
]]]
|
||||||
|
- box-shadow: none
|
||||||
|
grid:
|
||||||
|
- grid-template-areas: '"i n" "i status" "i mode"'
|
||||||
|
- grid-template-columns: min-content 1fr
|
||||||
|
- grid-template-rows: min-content min-content min-content
|
||||||
|
- column-gap: 12px
|
||||||
|
- row-gap: 4px
|
||||||
|
img_cell:
|
||||||
|
- justify-self: start
|
||||||
|
- align-self: center
|
||||||
|
- width: 42px
|
||||||
|
- height: 42px
|
||||||
|
- border-radius: 16px
|
||||||
|
- background: rgba(255,255,255,0.10)
|
||||||
|
icon:
|
||||||
|
- color: |
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? '#ffb86c' : '#8be9fd';
|
||||||
|
]]]
|
||||||
|
- width: 24px
|
||||||
|
- height: 24px
|
||||||
|
name:
|
||||||
|
- justify-self: start
|
||||||
|
- align-self: end
|
||||||
|
- color: white
|
||||||
|
- font-size: 22px
|
||||||
|
- font-weight: 700
|
||||||
|
custom_fields:
|
||||||
|
status:
|
||||||
|
- justify-self: start
|
||||||
|
- color: |
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? '#ffb86c' : 'rgba(248,250,252,0.82)';
|
||||||
|
]]]
|
||||||
|
- font-size: 15px
|
||||||
|
- font-weight: 700
|
||||||
|
mode:
|
||||||
|
- justify-self: start
|
||||||
|
- color: rgba(226,232,240,0.68)
|
||||||
|
- font-size: 12px
|
||||||
|
|
||||||
- type: custom:button-card
|
- type: custom:button-card
|
||||||
entity: sensor.pixel_7a_battery_level
|
entity: sensor.pixel_7a_battery_level
|
||||||
icon: mdi:battery
|
icon: mdi:battery
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,78 @@ views:
|
||||||
- dry
|
- dry
|
||||||
- fan_only
|
- fan_only
|
||||||
|
|
||||||
|
- type: custom:button-card
|
||||||
|
entity: input_boolean.secar_roupas
|
||||||
|
icon: mdi:hanger
|
||||||
|
name: Secar roupas
|
||||||
|
show_icon: true
|
||||||
|
show_name: true
|
||||||
|
show_state: false
|
||||||
|
show_label: false
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
|
hold_action:
|
||||||
|
action: more-info
|
||||||
|
custom_fields:
|
||||||
|
status: >
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? 'Secagem ativa' : 'Toque para iniciar';
|
||||||
|
]]]
|
||||||
|
mode: >
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? 'Dry dominante, heat so se esfriar' : 'Ar desligado ao parar';
|
||||||
|
]]]
|
||||||
|
styles:
|
||||||
|
card:
|
||||||
|
- padding: 18px
|
||||||
|
- border-radius: 22px
|
||||||
|
- background: |
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on'
|
||||||
|
? 'linear-gradient(135deg, rgba(255,184,108,0.24), rgba(80,250,123,0.10))'
|
||||||
|
: 'var(--ha-card-background, var(--card-background-color, #1c1c1c))';
|
||||||
|
]]]
|
||||||
|
- box-shadow: none
|
||||||
|
grid:
|
||||||
|
- grid-template-areas: '"i n" "i status" "i mode"'
|
||||||
|
- grid-template-columns: min-content 1fr
|
||||||
|
- grid-template-rows: min-content min-content min-content
|
||||||
|
- column-gap: 12px
|
||||||
|
- row-gap: 4px
|
||||||
|
img_cell:
|
||||||
|
- justify-self: start
|
||||||
|
- align-self: center
|
||||||
|
- width: 42px
|
||||||
|
- height: 42px
|
||||||
|
- border-radius: 16px
|
||||||
|
- background: rgba(255,255,255,0.10)
|
||||||
|
icon:
|
||||||
|
- color: |
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? '#ffb86c' : '#8be9fd';
|
||||||
|
]]]
|
||||||
|
- width: 24px
|
||||||
|
- height: 24px
|
||||||
|
name:
|
||||||
|
- justify-self: start
|
||||||
|
- align-self: end
|
||||||
|
- color: white
|
||||||
|
- font-size: 22px
|
||||||
|
- font-weight: 700
|
||||||
|
custom_fields:
|
||||||
|
status:
|
||||||
|
- justify-self: start
|
||||||
|
- color: |
|
||||||
|
[[[
|
||||||
|
return entity.state === 'on' ? '#ffb86c' : 'rgba(248,250,252,0.82)';
|
||||||
|
]]]
|
||||||
|
- font-size: 15px
|
||||||
|
- font-weight: 700
|
||||||
|
mode:
|
||||||
|
- justify-self: start
|
||||||
|
- color: rgba(226,232,240,0.68)
|
||||||
|
- font-size: 12px
|
||||||
|
|
||||||
- type: custom:button-card
|
- type: custom:button-card
|
||||||
entity: sensor.pixel_7a_battery_level
|
entity: sensor.pixel_7a_battery_level
|
||||||
icon: mdi:battery
|
icon: mdi:battery
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue