Hi there,
after Update to HA 2021.7.2 from 2021.6.5 the integragtion of Rituals Perfume Genie stopped working correctly. The switch entity (and some other sensors) have the state unavailable and therefore cannot be used. In the logs I have the following errors:
ValueError: invalid literal for int() with base 10: ''
2021-07-16 08:29:23 ERROR (MainThread) [homeassistant.components.switch] Error while setting up rituals_perfume_genie platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 258, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 666, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in _async_write_ha_state
extra_state_attributes = self.extra_state_attributes
File "/usr/src/homeassistant/homeassistant/components/rituals_perfume_genie/switch.py", line 50, in extra_state_attributes
"fan_speed": self._diffuser.perfume_amount,
File "/usr/local/lib/python3.9/site-packages/pyrituals/__init__.py", line 63, in perfume_amount
return int(self.hub_data["attributes"]["speedc"])
ValueError: invalid literal for int() with base 10: ''
2021-07-16 08:29:53 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 453, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 425, in _stringify_state
state = self.state
File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 113, in state
return self.value
File "/usr/src/homeassistant/homeassistant/components/rituals_perfume_genie/number.py", line 53, in value
return self._diffuser.perfume_amount
File "/usr/local/lib/python3.9/site-packages/pyrituals/__init__.py", line 63, in perfume_amount
return int(self.hub_data["attributes"]["speedc"])
ValueError: invalid literal for int() with base 10: ''
I tried to delete and reinstall the integration without luck.
I wonder if it has something to do with this breaking change:
Rituals Perfume Genie
The switch extra state attributes
fan_speed
androom_size
will be removed in the next release. As of this release, both attributes are available as entities, making it possible to change the value with Home Assistant.
Has anybody else issues with this integration or any idea how to fix it?
Any help or hint is very appreciated!