dckiller51 / bodymiscale

Custom_components Body Metrics for Xiaomi Miscale 1 and 2 (esphome or BLE monitor for Homeassistant)
Apache License 2.0
208 stars 33 forks source link

Not working in 2024.1 beta #218

Closed TheFes closed 9 months ago

TheFes commented 9 months ago

error message:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:360
Integration: Sensor ([documentation](https://rc.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 20:50:04 (2 occurrences)
Last logged: 20:50:04

Error while setting up bodymiscale platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/bodymiscale/sensor.py", line 56, in async_setup_entry
    BodyScaleSensor(
  File "/config/custom_components/bodymiscale/sensor.py", line 193, in __init__
    self.entity_description.state_class = SensorStateClass.MEASUREMENT
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'state_class'
SmarterHomeLife commented 9 months ago

I'm also having this issue.

ombarres commented 9 months ago

I have the same problem, someone know if its fixed? or how do it?

Loeffelmaster commented 9 months ago

Yes, it stopped working with 2024.1 I didn't knew about the problems already in the beta, as I wouldn't have updated, but now it is not working anymore. For all sensors there is this message: This entity is no longer being provided by the bodymiscale integration. If the entity is no longer in use, delete it in settings.

FlareFlo commented 9 months ago

In my case (fresh setup with 2024.1) it just doesn't set up any entities at all. Error message identical to OP.