I want to set the state of a button. According to the documentation a button does not have a state, just the last time it was updated. This poses a bit of a problem though.
What I want to do is have a button available in Android Auto that toggles the state of my air conditioner. Setting up a template to move through states was easy enough, but I want some sort of feedback about the current state. The button will toggle through off, cool and heat. It makes sense for a dashboard and my car to show the current state.
I know I can add the full climate control to a dashboard, but I cannot expose this in Android Auto. It seems it needs to be a button, switch or sensor. Even a select would work but I can’t expose this to my car.
I would, but according to the documentation I cannot action a selector or text entity from Android Auto, nor can I see the state of them. It’s the same for Apple Car Play.
Even a color change would be nice, but it would need to be reflected in the car UI.
I appreciate the suggestion, but both of these only have two states and I’m looking to have 3 (off, cold, hot). I didn’t say it would be an easy fix, and the car UI limitations are likely the main issue.
You make a template button, and the action looks at the current state of the “car” and it chooses the next one.
This could be as simple as a template button with an input select that has 3 options.
the button state however will always be the the last time the button was pressed.
If you want the state to appear in andriod auto, you likely will need to create and use a template select (if it’s supported). You won’t have the ability to have a toggle.
You can always just expose 2 entities, one that shows the state and one that cycles.
While it’s not ideal, I’ve got my button which cycles through the states and a separate sensor helper that copies the AC unit state. Both of these I can add as favourites in Android Auto.
I used a template button helper with a choose block to cycle through states.