Open cartoristal opened 5 months ago
Here is an example:
type: custom:mini-climate
entity: climate.living_room
toggle:
default: true
buttons:
cool:
icon: mdi:snowflake
state:
mapper: |
(state) => state === 'cool' ? 'on' : 'off'
toggle_action: >
(state, entity) => this.call_service('climate', 'set_preset_mode', {
entity_id: entity.entity_id, preset_mode: 'cool' })
heat:
icon: mdi:weather-sunny-alert
state:
mapper: |
(state) => state === 'heat' ? 'on' : 'off'
toggle_action: >
(state, entity) => this.call_service('climate', 'set_preset_mode', {
entity_id: entity.entity_id, preset_mode: 'heat' })
Amazing ! Thank you so much for taking the time : it works like a charm 👍
Still trying to figure out how to add the name of the currently selected preset (eco, frost_protection, comfort-2, comfort-1, comfort...) in an indicator. If you know how to do it - super interested in your thoughts. Otherwise, will keep looking and come back here with the solution
Hello! First of all : loving this card, it is great. I succcessfully managed to get a button leading to a dropdown to select the preset mode. I am wondering if there is a possibility to get a row of buttons instead ? I can only manage to have one toggle-button, but not multiple buttons (one for each preset mode).
Thanks !