Closed sweichbr closed 2 years ago
Falling back to 3.8 and the sensors are back.
i can confirm this behavior. i'll wait to see if anything changes in 2022.4.1, but if not i'll be rolling back to 2022.3.8 and staying there maybe indefinitely.
Same for me. I did not notice it on the beta ( I wish I had seen it there and reported it).
This is because of the change from device_state_attributes
to extra_state_attributes
. There is an open pull request to resolve this, but the change in the pull request can also be manually added to address the error: https://github.com/kevinvincent/ha-wyzesense/pull/218
i have the fix in #218 applied, but the sensor attributes are still lost in 2022.4.0.
I manually changed my file and the attributes are back.
Yup. Worked for me too. Thanks @strikeir13 for the tip.
well hell. thought i had merged a pull request with this fix in my fork back in jan, but i must have forgotten about it. merged the fix and updated my custom components, but the attributes are still missing. not sure what to look at next.
I just went into the wyzesense/binary_sensor.py and made the change. Then restarted HA and they reappeared.
On Thu, Apr 7, 2022, 9:33 PM stanwebber @.***> wrote:
well hell. thought i had merged a pull request with this fix in my fork back in jan, but i must have forgotten about it. merged the fix and updated my custom components, but the attributes are still missing. not sure what to look at next.
— Reply to this email directly, view it on GitHub https://github.com/kevinvincent/ha-wyzesense/issues/223#issuecomment-1092353838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI5HDGP3WIXWPABGIVPST3VD6EHDANCNFSM5SXLRI6Q . You are receiving this because you modified the open/close state.Message ID: @.***>
I manually changed my file and the attributes are back.
Forgive my ignorance...Can you be more specific about the change in 'custom_components/wyzesense/binary_sensor.py' ?
What I understand is to change the function's name i.e. 'device_state_attributes' to 'extra_state_attributes'. save and reboot HA. If there is any other change(s) required please advise.
However, this change below doesn't show the attributes once I reboot HA. Please clarify, thank you.
def extra_state_attributes(self):
"""Attributes."""
attributes = self._data.copy()
del attributes[ATTR_STATE]
del attributes[ATTR_AVAILABLE]
The only change I made to my binary_sensor.py file was
@property
def extra_state_attributes(self):
Make sure that you used a text editor and did not change any of the spaces. Mine worked as soon as I did a restart or HA
I manually changed my file and the attributes are back.
Forgive my ignorance...Can you be more specific about the change in 'custom_components/wyzesense/binary_sensor.py' ?
What I understand is to change the function's name i.e. 'device_state_attributes' to 'extra_state_attributes'. save and reboot HA. If there is any other change(s) required please advise.
However, this change below doesn't show the attributes once I reboot HA. Please clarify, thank you.
def extra_state_attributes(self): """Attributes.""" attributes = self._data.copy() del attributes[ATTR_STATE] del attributes[ATTR_AVAILABLE]
Same here,doesn't work.
The only change I made to my binary_sensor.py file was
@property def extra_state_attributes(self):
Correction: It actually took some time but its now indicating battery attributes as it did previously. Thank you!!
it's been 2 days and i've restarted the host and hass a couple times, but i'm not seeing any attributes. i even pulled the custom components folder via sftp to manually verify the binary_sensor.py file had the fix and it did.
Everything seems to be working again. I had to retrigger the sensors for them to show up.
working now--all devices need to be physically triggered after the change. i lost a contact sensor (dead even with fresh battery) which added to the confusion.
I know this project is technically dead, but I just updated my HA to 4.0 and all wyze sense attributes are gone (and we all know how important the battery level is).
Anyone know what the issue may be?