Bonjour,
Je vient de mettre en place une petite carte boutton pour la gestion de mon chauffage.
Une popup card s’ouvre lors de l’appui.
type: custom:button-card
entity: input_select.mode_chauffage
show_state: true
show_name: false
show_label: true
icon: |
[[[
if (states["sensor.radiateur_power"].state >= 10)
return "mdi:radiator"
else return "mdi:radiator-disabled"
]]]
label: |
[[[
if (entity.state != "Off" ) {
return states["select.radiateur_cable_outlet_mode"].state
}
]]]
styles:
card:
- color: white
- font-size: 8px
- font-weight: bold
- background: rgba(0,0,0,0.1)
- width: 60px
- height: 60px
- border-radius: 30px
- border-style: solid
- box-shadow: |
[[[
if (states["select.radiateur_cable_outlet_mode" ].state == "off" )
return 'none';
else return '0px 0px 15px crimson';
]]]
icon:
- height: 100%
- width: 100%
- color: |
[[[
if (states["sensor.radiateur_power"].state >= 10)
return 'red';
else return 'white'
]]]
label:
- margin-bottom: 5px
- font-size: 6px
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
right_button: Fermer
right_button_action:
service: browser_mod.popup.close_popup
content:
type: vertical-stack
cards:
- type: custom:mushroom-select-card
entity: input_select.mode_chauffage
layout: horizontal
primary_info: none
secondary_info: none
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
- type: conditional
conditions:
- entity: input_select.mode_chauffage
state: Manuel
card:
type: custom:mushroom-select-card
entity: select.radiateur_cable_outlet_mode
layout: horizontal
primary_info: none
secondary_info: none
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
- type: conditional
conditions:
- entity: input_select.mode_chauffage
state: Auto
card:
type: custom:scheduler-card
include:
- select.radiateur_cable_outlet_mode
- sensor.temp_hum_temperature
title: ''
show:
labels: false
labels_secondary: false
display_options:
primary_info: name
secondary_info: ' '