house-of-abbey / GarminHomeAssistant

Garmin application to provide a dashboard to control your Home Assistant
https://community.home-assistant.io/t/home-assistant-app-for-garmin/637348
MIT License
70 stars 12 forks source link

Request to add toggle functionality for covers #122

Closed bjobo closed 4 months ago

bjobo commented 5 months ago

Describe the solution you'd like It would be nice to have the toggle functionality also for covers (like lights and switches).

Describe alternatives you've considered It is possible to use the tap action with a cover.toggle service call instead. However, the tap action does not show the current state (and does require more configuration).

Additional context The cover state attribute shows one of the four states: open, opening, closed, closing. The first two should map to 'on' the latter two to 'off'. Covers can be toggled by the cover.toggle service call. https://developers.home-assistant.io/docs/core/entity/cover/ Also: HassControl has this feature - but I like GarminHomeAssistant more, because of the grouping functionality. 😉

philipabbey commented 5 months ago

I think we've been round this bouy before. Is the toggle icon green for "open" you can get the car out of the garage, or "closed" it is secure?

However, the tap action does not show the current state

I think we decided that unless it was an obvious on or off the solution would always need to be a template (with a tap_action) which could be customised by text. So yes, it can show the current state (see https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/examples/Templates.md). You can create the tap_action in that template that performs a toggle HA server side in order to mitigate some of the complexity in the JSON object. But yes, its more work. At least it should be doable to have both a status display and a tap_action in one item.

The Connect IQ menu does not have a more appropriate toggle item to cover this situation, hence our present decision. We're not going to be goaded into creating a feature just because HassControl has it 😉. If HassControl is preferrable, use it!

philipabbey commented 5 months ago

If there are no further comments, I will close this issue in 48 hours. I would however be interested to see the template solution you came up with. Perhaps post it at https://community.home-assistant.io/t/home-assistant-app-for-garmin/637348?

philipabbey commented 4 months ago

As per previous comment, closing.

bjobo commented 4 months ago

Sorry, I've been away. Thanks for the hint with the template solution. I'll have a look into this.