-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Row of buttons for preset modes ? #153
Comments
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 ! 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 |
I would be interested in a solution for names as well |
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 !
The text was updated successfully, but these errors were encountered: