Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Time loop replay #381

Open
Maxouwell opened this issue Nov 25, 2023 · 7 comments
Open

[FEATURE] Time loop replay #381

Maxouwell opened this issue Nov 25, 2023 · 7 comments
Labels
enhancement New feature or request feature request Feature requests goes here feel free to help with pr Feel free to help by implementing the logics and submit a Pull Request

Comments

@Maxouwell
Copy link

Maxouwell commented Nov 25, 2023

Is your feature request related to a problem? Please describe.
I want to see the evolution of the temperature in my home in the last X hours, how the heat and the cold flows in the house

Describe the solution you'd like
Allow to add time options around the floor plan to launch a loop replay of the last hours, with each sensor/floor plan animation updating as time passes (time which should be displayed somewhere)

Describe alternatives you've considered
As far as I know the only alternative is a graph with all the temperature sensor, which go quickly messy.

Illustrations and examples
Your example is exactly what I had in mind, with a loop showing the evolution across time.

Additional
Floorplan seems amazing and I came across it while I was considering painfully learning how to do it myself.

@Maxouwell Maxouwell added feature request Feature requests goes here waiting on review Issues which are not categorized, yet. labels Nov 25, 2023
@OzGav
Copy link
Contributor

OzGav commented Nov 25, 2023

It’s an interesting idea but I can’t think how this would be achieved. ha-flooplan runs within HA and I don’t see any way to have this work in HA and a quick Google didn’t bring up any related discussions.
We have been looking at adding graphing capability but that hasn’t been finished yet

@Maxouwell
Copy link
Author

Maxouwell commented Nov 26, 2023

Disclaimer: I don't have a clue how works Lovelace cards.

But if a graph card can show the evolution of a sensor on a span of X hours, why couldn't you get it ?
Once the history of all sensors is fetched, is it not just a ordering problem?
Looping a second at a time and inject it to floorplan to display the evolution across time.
I don't know how you do the animated example but I suspect it's not far from this.

@OzGav
Copy link
Contributor

OzGav commented Nov 26, 2023

The examples are artificial constructs to show what is possible with representing current state. As I said the original developer of ha-floorplan has been looking at adding graphing capabilities so pulling in the state history is possible. The graphing capability leverages existing graphing libraries though. Coming up with a mechanism to be able to indicate which entity(ies) on a floorplan should be animated and for how long and to be able to indicate what time frame is being shown would be more difficult. But you have put it out there so we can see what other users think and if we find some dev time (which is in short supply) then this might get looked at.

@Maxouwell
Copy link
Author

I looked into the code, and what I envision would be to rebuild the "timeframe" hass.states objects from the history API and time the calls to hassChanged to reflect the state at a given moment, replaying.

It would need to disable all user interaction though, and maybe regular hassChanged calls.
What do you think ?

@OzGav
Copy link
Contributor

OzGav commented Nov 28, 2023

Sounds like a decent deviation from the existing functionality but maybe you could fork the project and build this yourself. Let me ping the devs though and see if they have time to comment @pkozul @exetico

@Maxouwell
Copy link
Author

I didn't look in the examples code, but it's exactly what's your doing with a custom Hass simulator :D

@exetico
Copy link
Member

exetico commented Nov 29, 2023

I can't really see why a feature like this should fit into ha-floorplan, but, I'm ofc. open for a PR 😄 . It sounds like a very specific need, which I won't spend time on.

@exetico exetico added enhancement New feature or request feel free to help with pr Feel free to help by implementing the logics and submit a Pull Request and removed waiting on review Issues which are not categorized, yet. labels Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request Feature requests goes here feel free to help with pr Feel free to help by implementing the logics and submit a Pull Request
Projects
None yet
Development

No branches or pull requests

3 participants