Ariela icon indicating copy to clipboard operation
Ariela copied to clipboard

Ariela alarm sensor broken in 2023.5

Open justinmaiuto opened this issue 1 year ago • 1 comments

The problem

2023.5 latest release seems to have broken Arielas alarm sensor seems to be related to an incorrect assignment of illuminance device class to the alarm sensor, which is stricter in 2023.5 as I understand it

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:583
Integration: Sensor (documentation, issues)
First occurred: 19:12:46 (4 occurrences)
Last logged: 19:12:46

Error adding entities for domain sensor with platform mobile_app
Error while setting up mobile_app platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: '2023-05-18T06:45+1000'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state
raise ValueError(
ValueError: Sensor sensor.justin_alarm_sensor has device class illuminance, state class None unit and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: 2023-05-18T06:45+1000 (<class 'str'>)

What version of Home Assistant Core has the issue?

2023.5 What was the last working version of Home Assistant Core?

2023.4 What type of installation are you running?

Home Assistant Core Integration causing the issue

mobile_app Link to integration documentation on our website

No response Diagnostics information

No response Example YAML snippet

No response Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:583
Integration: Sensor (documentation, issues)
First occurred: 19:12:46 (4 occurrences)
Last logged: 19:12:46

Error adding entities for domain sensor with platform mobile_app
Error while setting up mobile_app platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 579, in state
    numerical_value = int(value)
ValueError: invalid literal for int() with base 10: '2023-05-18T06:45+1000'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 583, in state
    raise ValueError(
ValueError: Sensor sensor.justin_alarm_sensor has device class illuminance, state class None unit  and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: 2023-05-18T06:45+1000 (<class 'str'>)

Additional information

No response

justinmaiuto avatar May 25 '23 07:05 justinmaiuto

Please see https://github.com/home-assistant/core/issues/93205 for more context

justinmaiuto avatar May 25 '23 07:05 justinmaiuto