-
I'm still considered a beginner regarding the use of python and pyscript. Can anyone tell me whats the pros and cons by using the pyscript.entity.attr (domain)? I have now used pyscript on my some of my counter. All of my data is gone due to the state.persist braking change in 2022.3.1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For your last point, the current pyscript github master version should fix the state persist change in 2022.3.x. Can you try that please? |
Beta Was this translation helpful? Give feedback.
-
If you had used some other domain your data may have been lost anyway as Home Assistant doesn't restore state by default on most of its entities. Persistent entity data is useful for storing computed information -- is a room occupied? when was the last time I pulled my bank balance? how many people are in my home at the moment?. All of these things are either information that is temporary, non-critical, or reproduceable. If you're storing any other kind of data In Home Assistant state (pyscript or otherwise), I'd advise that you also store that data somewhere else. Use the entities for convenience, but have the official store of the data for catastrophes. input_text, specifically, is restored (if configured properly), but one mistake (on your part, or due to a bug in home assistant) and it's gone. So even that platform isn't resilient. It's not meant to be. If you really need the data back, you may be able to poke around in the sqlite database (or whatever you have Home Assistant set up to use for state storage and historical data) and find the old data as long as you look for it before your configuration purges it. |
Beta Was this translation helpful? Give feedback.
If you had used some other domain your data may have been lost anyway as Home Assistant doesn't restore state by default on most of its entities. Persistent entity data is useful for storing computed information -- is a room occupied? when was the last time I pulled my bank balance? how many people are in my home at the moment?. All of these things are either information that is temporary, non-critical, or reproduceable. If you're storing any other kind of data In Home Assistant state (pyscript or otherwise), I'd advise that you also store that data somewhere else. Use the entities for convenience, but have the official store of the data for catastrophes.
input_text, specifically, is rest…