…and now I’m in a part where I’m trying to add new tile to my SharpTools dashboard but I can’t.
Device type is: Google Photos Device
It seems that it can’t be chosen from any Sharptools device category so I’m thinking that this device type is probably not yet supported. Would it be big job to add? I’m suggesting that if this would work and users would be able to add image attribute tiles to SharpTools …then this feature request would not be needed anymore… Google Photos integration - #2 by JiiPee
Attribute - enter the name of the attribute that is stuffed with html
Should I just enter “image” as it is attribute I’m using? Now I get a photo which is not refreshing when photo in Google Photo Device changes. I need to refresh whole dashboard to get a photos that is shuffled.
EDIT: and just to be clear. If attribute should include html …where do I find it since I do not have a device to add as hero attribute?
From a quick glance at the driver, the image attribute seems like the right one.
Unlike the normal SharpTools tiles, the custom tile uses polling to get the updated states. Since the original use case for that tile was rendering custom weather layouts, the polling was set to every hour. I’m on dad duty this glorious Saturday (watching the kids), but when I’m back in the office I can add a refresh rate option to the tile.
In the meantime, as a quick fix you could change the tile to poll more frequently by updating the REFRESH_INTERVAL on line 47 in the custom tile:
I just find this too and managed to change interval but …that 5min polling…that is way too much if point is to shuffle photos in screen. But I do understand that this would be wrong if it causes possible issues in Hubitat side. Damn…
Stupid question by the way. 5 x 60 x 1000 is 5 minutes in milliseconds. Why does it need to be marked like that x … x …
One more thing. I noticed that Google Photo App has two attributes: image and video. Is it possible to add second attribute “video” to custom tile and would it then be possible to play video in dashboard tile?
Would probably be a better question for the developer of the custom driver.
The driver seems to get either an image *or* a video though, so it’s not completely clear to me why there would be a separate attribute as each call to get the next ‘photo’ could end up getting a photo or a video. That being said, I haven’t actually used this driver – just basing this off a quick read-through of their code.
Sorry I do not understand. If custom driver (Google photos app) offers two variables to use isn’t it completely Sharptools custom tile question? Variable changes from image to video depending if it is a image or video which is shuffled from album. Both video and image works when playing on Hubitat or hubitat’s own dashboard.
Now I’m adding one attribute (image) to sharptools custom tile settings:
My question was supposed to mean that…is there a way to add another attribute to sharptools custom tile settings and would that allow me to play videos too in custom tile.
Something like this:
Edit: and just wanted to add… that “i do not understand” means that I probably really do not understand English as well as I should and technical stuff like coding …way over my head…
Thanks for the clarification. I think we are getting closer to understanding each other.
I believe we are both addressing a similar issue, but from different perspectives.
Edit: See discussion further down in the thread. Turns out there’s not a separate attribute.
Yes, since there is a separate attribute for video, you could certainly use it in a second tile. From what I understand though, you’re noticing the same thing as me that either the image attribute *or* the video attribute get updated when the ‘next photo’ is refreshed (but both retain their last value).
My question is why is there not a *single* attribute in the device which displays the latest media resource (image or video). I see this as something that should be done in the driver – either replacing the video and image attribute with a single attribute, or adding an additional attribute that combines them (eg. maybe 'imageOrVideo' or 'media' or 'latestMedia' or something along those lines).
With Custom Tiles in SharpTools, you can theoretically code whatever you want. The Hubitat HTML Attribute Display tile is a general use tile intended for displaying HTML content from a single attribute. Someone with the right skills could modify the code and adapt for this driver-specific use case – for example, use the mediaType attribute to decide if you should display the image or video attribute… but that’s a very specific use case.
Hence my recommendation to keep driver-specific logic within the driver and make the request to the original driver author.
Can you share a screenshot of the device details screen?
My apologies as I thought you were saying there were two separate attributes – one attribute called 'image' and one called 'video'. If I understand correctly, there’s actually just the one attribute called 'image' and it either contains an <img> or <video> tag depending on the content (and the mediaType attribute is updated accordingly).
Are you saying that when the ‘device’ is displaying a video, that it plays in the Hubitat dashboard, but doesn’t play in the custom tile?
Well first of all. Big thanks once again @josh . Those additional settings are great and now that I set it as “cover” it looks way better than before. I’m not sure what you did here but videos started working. Like you said this shouldn’t affect the issue that I had but for some reason all videos are now working.
Really cool and I appreciate all you help and work!!! Mad respects!!!
My “google photos” feature requests is not needed anymore with this setup.