Your whole post is worthless without the code, you use the code in your post to make your point.
Only problem is we can’t read your code because the indentation is wrong.
How do you expect us to replicate the bug? Yes, we would need working code for that…
You do not have sensors, so how would you replicate it
Seriously how would you replicate it without charts, and sensors ???
YAML is using extremely simple script language, so you do not need a “code” to replicate it.
This is not a C# that you would need a code, be serious.
Take any group, swap 2 entities, change name of those entities and here you have it.
As I already explained.
After you change a name of an entity, the actual entity name in HASS stays the same (you can check it in states), this was breaking the “code” as I was pointing to the wrong entity.
I haven’t checked the database, but seems that you can access it, so probably HASS doesn’t update appropriate entity name attribute in a database.
Clearly, if “IT IS WORKING” then you wouldn’t be here asking people for help because something ISN’T WORKING!
You have a pretty horrible attitude for someone only here for a few days and asking other people for help.
We are trying to tell YOU what we need from YOU to help YOU to solve YOUR problem that YOU asked us for help on. Why are YOU fighting about giving us what we are asking for to help YOU out?
If you continue to have such a crappy attitude then I’m not seeing a very bright future for you in getting much help here.