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).
The ‘Hubitat HTML Attribute Display’ custom tile is intended to display HTML content from a *single* attribute…
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.