Closed crussell85 closed 8 months ago
I'd have to check. I think those brackets would be removed by black formatter.
There might be a better fix for it, Python isn't my first language but the brackets definitely change the result. "False" was being assigned to the state of all the entities without them.
Happy for you to close this if my fix isn't formatter friendly
Cheers
I used the master branch in my Home Assistant install (installed in config directory as I dont use HACS) and noticed the enabled sensors all had the values of "False" but I could see the values in the attributes of the entity.
After some debugging of sensor base.py I noticed _state was set to False as it was being set to the result of the IF check not the value of the value attribute from data
wrapping the walrus operator in brackets fixes it