sampsyo / hass-smartthinq

Home Assistant component for LG SmartThinQ HVAC devices
MIT License
281 stars 98 forks source link

Unable to prepare setup for platform smartthinq_sensors.sensor: Platform not found #106

Closed xMuehlex closed 2 years ago

xMuehlex commented 2 years ago

Hello, I am currently facing the following problem. I am trying to connect a LG washing machine to HomeAssistant. Unfortunately, only an on/off switch is detected. The detection of the sensors fails with the following error:

LOG: Logger: homeassistant.setup Source: setup.py:311 First occurred: 10. Oktober 2021, 12:56:38 (4 occurrences) Last logged: 10. Oktober 2021, 12:59:41

Unable to prepare setup for platform smartthinq_sensors.sensor: Platform not found (cannot import name 'DEVICE_CLASS_PM1' from 'homeassistant.components.sensor' (/usr/src/homeassistant/homeassistant/components/sensor/init.py)). Unable to prepare setup for platform smartthinq_sensors.binary_sensor: Platform not found (cannot import name 'DEVICE_CLASS_PM1' from 'homeassistant.components.sensor' (/usr/src/homeassistant/homeassistant/components/sensor/init.py)).

Any suggestions?

sampsyo commented 2 years ago

Hmm; I don't quite understand these error messages, unfortunately… it seems to be a Python error stemming from an import statement, but we never actually import the name DEVICE_CLASS_PM1? I'm sort of stumped, but perhaps this could have to do with #105 and therefore @cynicer might have some intuition about what's going wrong?

cynicer commented 2 years ago

105 shouldn't have changed any washing machine logic, let alone interact with an PM1 sensor. Can you provide more logs? Do you have any other thinq devices connected (i.e. AC or anything with PM1 sensor?)?

xMuehlex commented 2 years ago

If you tell me where to find more logs, I can provide them. I do not own any other ThinQ devices.

cynicer commented 2 years ago

Ah nvm, this already seems to be the log entry of HA. Which device are you trying to connect? The weird thing is that the problem seems to be in the HA code? Is this classified as "WARNING" or "ERROR"?

xMuehlex commented 2 years ago

The message is classified as an error (Fehler).

Bildschirmfoto 2021-10-14 um 10 31 34

The device I want to connect is an LG V5105SE washing machine.

xMuehlex commented 2 years ago

EDIT:

Problem solved. My Home Assistant runs as a Docker container. After changing from "ghcr.io/home-assistant/raspberrypi4-homeassistant" to "homeassistant/home-assistant" everything works like a charm.