Closed jose1711 closed 4 months ago
Thank you for your interest. I will remove the bug label since this is not a bug in the slightest!
Please try using a "Template" menu item for things that are not as simple as on-off like lights and switches. You should be able to decode the states as you would prefer.
I'll close this issue in 48 hours if there are no further replies.
Thank you. Does that mean that toggle item only can be used with states objects that return on or off?
Yes. The API call must return "on" or "off" see these two points in the code:
The set state API call must use turn_on
and turn_off
:
Think of a toggle
as just a specialised template
for things that are obviously on-off, e.g. covers can be ambiguous here (open/closed - which is green for on?) Its just the template requires a little more work, but the user can get what they precisely need.
Thank you for the explanation. To be able to "emulate" a standard toggle using template, I am missing an option to set an icon. Template icon - unlike toggle - seems to only support static icon. Is there a chance to change this?
Garmin Connect IQ does not support the provision of any icons in menu items. The toggle is a special case. I suggest you choose unicode characters to put in a conditional Jinga statement in your template definition.
Closing as the issue has gone stale.
My menu item goes like this:
The issue is that during the playback the state is "playing" (not "on"). I believe the application is only checking on/off values in
HomeAssistantToggleMenuItem.mc
. Would it be possible to handle this more like HA does? Thank you.