MycroftAI / skill-homeassistant

Mycroft Skill/Integration for Homeassistant
GNU Lesser General Public License v3.0
114 stars 62 forks source link

Basic GUI for Sensors #84

Closed pfefferle closed 2 years ago

pfefferle commented 2 years ago

Description

If you ask about a state of a (binary)sensor, it will display the value in a very basic form.

image

image

Type of PR

Testing

Say "What is the value of {Binary Sensors Name}."

pfefferle commented 2 years ago

I will also add binary sensors when #82 is merged.

stratus-ss commented 2 years ago

@krisgesling can you take a look at this? I am not familiar with the GUI

pfefferle commented 2 years ago

Added binary_sensor support

image

image

pfefferle commented 2 years ago

It seems that the background image is persistant and stays also on other GUIs like settings or naptime.

@krisgesling is skillBackgroundSource the wrong method or do I miss a reset function?

pfefferle commented 2 years ago

I've also wondered if we should add an intent to display the HomeAssistants own GUI. There's a handy self.gui.show_url() method.

@krisgesling I had a very similar idea, but wanted to start it as a stand alone skill, because I was not sure if it fits: https://github.com/pfefferle/skill-open-homeassistant

But now I will skip the idea and add it directly to this plugin.

pfefferle commented 2 years ago

@krisgesling see https://github.com/MycroftAI/skill-homeassistant/pull/91

pfefferle commented 2 years ago

@krisgesling works perfect, thanks for the feedback!

AIIX commented 2 years ago

Can this be done natively in QML UI rather than using a webpage? For example, it would be nice to have something like this instead of opening a website devices-ui-1 devices-ui-2

krisgesling commented 2 years ago

Yeah to clarify, I didn't mean to use the web view instead of QML. Personally, I'd like us to end up with native QML views for all of the interactions, state reporting etc. And you could obviously toggle things from the GUI like turning lights on and off.

I think where the web view comes in is that a lot of HomeAssistant users have already spent a lot of time designing custom interfaces that suit their personal setup. So it would be good to let them use those same GUI's on their Mycroft devices if they have them and want to. These might be based on location groupings like everything in the kitchen, or to serve different functional purposes like alarm / cctv monitoring.

It will require some thinking around how we people can configure what is shown when, and I don't know how well they will display on a small screen, or if there's a way to show a lovelace view without the nav header which takes up a bunch of room especially if you have multiple tabs.

Also pinging @dschweppe as I know he's keen to input around the design side of things.

pfefferle commented 2 years ago

Should we open an issue for that? I think it is far bigger than the scope of that PR. I simply wanted to add a visual to the status check of the several sensors.

@krisgesling can you re-review my changes?

AIIX commented 2 years ago

Should we open an issue for that? I think it is far bigger than the scope of that PR. I simply wanted to add a visual to the status check of the several sensors.

https://github.com/MycroftAI/skill-homeassistant/issues/93

pfefferle commented 2 years ago

"Open Home Assistant" was added with #91