Instantly share code, notes, and snippets.
This is pretty cool stuff! Might it be possible to combine Picture Glance and Camera Preview? The use case being having multiple "windows" into your rooms, and the various controls within each room as well.
Sorry, something went wrong.
Really cool. Is it possible to have a dynamic or templated picture with Picture Glance? Or even cooler, a Media Player Glance? I’d like to build a Harmony Remote control interface where it shows me what’s playing based on the activity or scene that I have selected.
@SupahNoob I'm not sure what you mean by combine. You want to show controls on the bottom of a camera-preview?
@jer78 Don't think it has support for such a setup, but I don't think it's that complicated to do it. Should be fairly easy using a custom component for now, but I'll pitch the idea and maybe we'll get support in a future version.
a few thoughts:
Glances card text gets cut too short, how about 2 rows of text above the icon?
Center Justify glances card icons, so less than a complete row looks better
Why not more columns?
What about templates? A template card would be awesome...
Why do views have "name:" and cards have "title"? Is this on purpose?
Loving this new stuff. I've been migrating my old UI stuff over and I'm finding a limitation around media-control.
I'm attempting to only show media player controls filtering where state=(playing|paused|on) so the control is hidden if the player is off. When you have several media player devices, this clogs up the UI quickly. Hiding them with an entity-filter alone works but results in the loss of one-touch media controls.
In the old UI, the workaround for this was to create a group with one entity for each media player, using automations to hide/show the entity by triggering group.set_visibility based on the media player state. I attempted to use the group entity in the media-control card and it errors out wanting a media_player entity, so I can't accomplish that same trick anymore.
One more suggestion: When there are no matching entities based on a filter, the UI just shows a card with a title only. If the card can be hidden when the entity count is zero, that'd be a little cleaner.
I will +1 the "name" vs "title" arguments being a little confusing. I also agree that the text on the glance cards are too small. I can't see more than one and a half words in about 15 of them.
Thanks and keep up the good work!
@nk553 the current setup is still experimental. It just got usable and will still undergo changes. Your suggestions are great, but it would be best to post them to the repo so more people can review and discuss potential implications.
@allanak would be best to write feedback to the team for media player. I think the card is being reused so enhancements are possible as long as feedback arrives in the right spot.
@nk553 @allanak I will pass this feedback to the guys as well.
Picture Glance: It would be great to enhance that to allow entities to have an x,y position set individually, and relative to the image e.g. (0.5,0.7). Instant room/floor plan capability
is there a way to get image from local other then html something like /local/img/test.png
- type: picture-glance
@ciotlosm yes I believe @SupahNoob would like to add controls to the bottom of a camera view. I know I would like to.
I would also love to see a glance view (or just an option to the view) to enable just toggling of entities on click instead of opening the details pane.
Thanks for doing this!
It's really cool and so much easier to modify than the "old" way.
What are the options for "images".
I tried dropbox and /local/ without success. Getting a recent image from the cameras in a room would be ideal.
@vMeph You can use http(s)://<your_home_assistant_url/local/myimage.jpg and just put the image in your home assistant /config/www/myimage.jpg.
@nickleman Controlling entities in glance just by clicking will be coming in a future release, probably also allowing for longer names. For camera I'm not sure as it uses an existing card that will require to be rewritten.
@Snipercaine local should work just as I mentioned above.
Note: Make sure your images are on the same protocol as your Home Assistant. If you run HA on https, you should use images from https sources.
Please log issues against https://github.com/home-assistant/ui-schema/issues. Part of the items below have already been logged, I'll try to move all to that issue list.
Just to reiterate ideas that people have requested so far (in no particular order):
Awesome! thanks @ciotlosm!
I don't understand what to do with the following portion of the instructions to make Lovelace the default UI.
Information on path for lovelace.html (Hass.io example):
This is my working solution
- type: entity-picture
I had problem without title, with title all works fine.
@JAAlperin just find where you have your configuration.yaml. In that folder create a www folder and inside that folder create the lovelace.html file with the content specified.
Great work so far! This will solve the thing that bothered me most about Home Assistant, it always bothered me that logical groups were not separated from UI "groups". Thank you.
However, I do have a bug to report. The mask for the device_tracker photos is not keeping the correct aspect ratio. It appears as an oval, and as a result just shows my forehead in certain layout situations.
Here is what it looks like if the card is too wide.
Here is what is should look like.
The more I think about it, the more I like the idea of my forehead becoming my profile image. Haha! :)
thanks for reporting @brianhanifin. I've added this to the list. Probably will look at this end of the week.
I updated to 0.72.1 and have this issue
@brianhanifin can you check if your bug was fixed? Fixed and tested
@sdomotica I think this is a new bug introduced with other fixes. I'll note this as well to check by end of the week. Already fixed in dev
Totally agree with @SupahNoob, it would be great to see camera stream as background and sensors above as in picture glance!
EDIT: I managed to do it :)
just open the camera card, right click on it, "copy image URL".
Then use picture-glance and put as image that URL (from /api/camera_proxy_stream/....). Only problem is that token sometimes changes and link should be updated
BUT IT'S AMAZING
@ciotlosm Looks like others have cleared up the idea I was trying to express. Essentially having a camera feed with the same controls as a glance. Appears that there is an issue for this: home-assistant/ui-schema#39 and I think Paulus's idea is the way to go. Unfortunately I don't have much experience with JS. I'll watch the repo instead of this gist. (Never got a notification from here either, which is odd.)
Is there already a way to reload an image (or iframe) from the web (or even local) on a timer? I'm specifically thinking a weather map gif (the web source generates a new one every ~6 minutes).
Loving this LoveLace thing! (kinda like saying it too, makes me feel dirty)
Can we specify different icons for specific entities just in Lovelace?
Example: I have a picture_glance of a room with all the switches in that room listed at the bottom, but all the icons look the same so I can't tell which one is which. I could assign unique icons in customize.yaml... but I don't want to :)
@mrand you can do timers yourself in an iframe card. You have all the freedom.
@Snipercaine Not at the moment. You can raise an issue for this in ui-schema
How about blank tiles to use for spacing on the glance card? My glance tile has 9 sensors. 5 on top and 4 on the bottom. Would be nice to have 2 sensors | one blank tile | 2sensors on the bottom row to even things out. Thanks for your hard work on Lovelace. It is awesome.
@pdobrien3 I've added your request here: https://www.home-assistant.io/lovelace/glance/
The repo moved so feel free to use the new repo
I could be awesome if camera-preview and picture-glance can be merge ( true PTZ interface ! :) )
Please remember that docs moved here: https://home-assistant.io/lovelace
@max5962 this will probably be possible.