(Sorry, being a new user, I am limited in how many links and images I can post at once. Forgive me…)
Lovelace
I’m experimenting with a couple of different ways to control the kettle’s input_select
in the UI. Thomas Loven’s slider-entity-row provides a slider element: that’s pretty cool, and easy to use:
type: entities
entities:
- entity: input_select.kettle_mode
type: 'custom:slider-entity-row'
full_row: true
I’ve also realized that using RomRider’s Button Card, I can achieve the radio button array that I’ve been seeking for a few purposes for a while now. There are more lines of code there than I might like, because basically you have to set tapping the button to call the input_select.select_option service
, while you style the button according to what the input_select
’s current option is. And you then repeat this for each of the seven buttons… Here are the first two: the rest are just the same, mutatis mutandis:
type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: input_select.kettle_mode
show_icon: false
show_state: false
show_label: false
aspect_ratio: 1/1
name: 'Off'
show_name: true
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.kettle_mode
option: 'Off'
state:
- operator: template
value: |
[[[ return states['input_select.kettle_mode'].state === 'Off' ]]]
styles:
card:
- background-color: var(--secondary-background-color)
- type: 'custom:button-card'
entity: input_select.kettle_mode
show_icon: false
aspect_ratio: 1/1
name: 40ºC
show_name: true
show_state: false
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.kettle_mode
option: 40ºC
state:
- operator: template
value: |
[[[ return states['input_select.kettle_mode'].state === '40ºC' ]]]
styles:
card:
- background-color: var(--secondary-background-color)
And of course kalkih’s near-ubiquitous mini-graph-card makes for a pretty representation of the kettle’s temperature over time!
I hope that all this helps someone out there! The best thing? Asking Siri to turn the kettle on via CarPlay while driving home!