theneweinstein / somneo

Home Assistant custom component for Philips Someo
33 stars 18 forks source link

Error on launch - setting up sensors #14

Closed dk1 closed 7 months ago

dk1 commented 2 years ago

Hi - I'm running 2.2.4 on home assistant 2021.11.2 and I'm getting the following error in my logs:

Unable to prepare setup for platform somneo.sensor: Platform not found (cannot import name 'SensorDeviceClass' from 'homeassistant.components.sensor' (/usr/src/homeassistant/homeassistant/components/sensor/__init__.py)).

Alarms/alarm controls show up but the light/temperature/sound sensors don't appear.

Is anyone else running in to this problem?

theneweinstein commented 2 years ago

Hi, you are running a wrong combination of versions. I updated Somneo component to use the SensorDeviceClass introduced in homeassistant 2021.12. So either downgrad to version 2.2.3 or upgrade homeassistant and it should work.