Error adding entities for domain sensor with platform multiscrape
See original GitHub issueHi Daniel,
First of all many thanks for your great module multiscrape. After updating Home assistant and multiscrape, I got. an error-message. Home assistant does not view my entities I declared with multiscrape. After checking my logs, I located this behavour in the line where I defined the unit of my measurement. I think that this depence by changes of the ‚core‘ Home Assistant 2022.4.1
thanks
Erich
Version of the custom_component
v5.7.0
Configuration
If unit_of_measurement is used
Describe the bug
When I use unit_of_measurement im my configuration.yaml i get the error. When comment out, everything works fine
Debug log
Logger: homeassistant.components.sensor Source: components/sensor/init.py:454 Integration: Sensor (documentation, issues) First occurred: 10:33:24 (2 occurrences) Last logged: 10:33:24
Error adding entities for domain sensor with platform multiscrape Error while setting up multiscrape platform for sensor Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 382, in async_add_entities await asyncio.gather(*tasks) File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 614, in _async_add_entity await entity.add_to_platform_finish() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 799, in add_to_platform_finish self.async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 532, in async_write_ha_state self._async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 570, in _async_write_ha_state state = self._stringify_state(available) File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 538, in _stringify_state if (state := self.state) is None: File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 454, in state assert native_unit_of_measurement AssertionError
Issue Analytics
- State:
- Created a year ago
- Comments:12 (3 by maintainers)
Top GitHub Comments
Would it be worth breaking the config of all users with no obvious advantage? The
template
sensor included in HA does the same thing…For me ist not clear why there is a special handling for devices with device_class temperature.