Anybody still using set_state.py?

I was using this script until a few days ago and I think it may have been the cause of my recent system instability. It had been fine for years but I think possible a change had been introduced into HA maybe in January or early February and caused an incompatibility with the script?

Just wondering if anyone is still using it without problems?

You should avoid setting any state because it doesn’t actually do what everyone thinks it does.

I urge you to move away from that script, if you need help with that, post what you’re trying to do with that script.

As for the script itself, I don’t see anything that would change the behavior. Post the script, when you get a chance and how you’re using it.

EDIT: I see the link and the input script. I don’t see anything that would cause problems aside issues that may arise due to using entity_id in data. That has a specific use and the mileage may vary using that to pass the adjusting entity_id. Post the logs for the script when it miss behaves.

1 Like

I have fully moved away from it as my Home Assistant was incredibly unstable.
Might just be coincidence but since I stopped using it, it’s now stable again.
Lots of logs here

Most of those errors are template related, none seem to be related to the python script at all.

Unless you’re using the python script to create entities. Templates don’t work well when entities don’t exist and python scripts get around instantiation of entities, which would lead to errors like this.

agreed. But my lived experience ( :grin: ) says since I removed that script, all is calm and well.
Thanks, Petro
(Edit: wasn’t using the script to create entities)