I am currently trying to access historic data for one of my devices and am using statesSince() for that.
According to the documentation, the [max: N] map is optional - based on that I would assume that it would return all events (up to the maximum quoted 1000) since the data specified. However, it seems that it only returns 10 events in that case - is this a feature, bug, or lack of documentation?
I have well more than those ten events in 7 days - I should have mentioned that adding [max: 1000] (or something smaller and more reasonable than that) will return more than the 10 results I get back without adding it.
It seems to me that not adding the optional Map will limit the number returned - which is not obvious and doesn’t sound right to me.
@jim could you please clarify the intended and actual behaviors?
Querying device history in conjunction with htmlTile allows for very cool stuff - I managed to show today’s energy production overlaid with yesterday’s data for my solar array (custom device type) using Google Charts:
Thank you for posting the code. I was able to extract the html related sections into a new device handler and display custom html so no trial and error will be needed.
I can now create a dashboard device handler to go along with my Simple Device Viewer SmartApp.
There is no documentation for this. We did a developer beta for HTML a couple months ago. The current implementation is/will be undergoing an overhaul based on our internal and beta feedback. I don’t have an ETA on when HTML-based development will be supported at this time; and while I’d be trying these things out myself were I in your shoes, I’d be remiss if I didn’t at least mention that current implementations will not be backwards compatible with likely upcoming changes prior to this being supported.
I don’t want to discourage developers pushing the envelope with these capabilities, but want to err on the side of transparency/appropriate expectations WRT to support/maintainability of htmlTile.
tl;dr - use at your own risk and the current implementation can and will change without notice.
Thank you responding this post. I’d rather not blindly try to figure out how to make something work and then have to do it all over again once things change.
Thanks for the clarification - I believe that there are a lot of cool things that can be done with this tile and having developers explore use cases might help getting it finalized in its most useful way.
Would it be possible to give some kind of advanced warning when/how the implementation changes?
Yes, and that was one of the primary goals of the beta. It’s a feature we are pretty excited about, because it offers developers a lot more power and control.
I wish I could commit to providing more information and notice, but I can’t. We need to focus on better supporting/documenting our currently supported APIs, and as this feature is under development, things can and will change without notice. If a usage of this tile remains in the public repo, you could watch for any changes there.
Right now the current implementation is sort of forked between old and new, so I’m not sure with the existing example how that would be done without digging in a little. And even if I could do that, the mechanism to do so would likely change in the near future.