NickStallman / home-assistant-repo

18 stars 6 forks source link

power_factor -- no unit of measurement #32

Open mtrekker opened 1 week ago

mtrekker commented 1 week ago

Is this config or winet-extractor issue ?

2024-11-13 12:13:03.951 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.sh15t_**********_total_power_factor (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('power_factor') it is using; expected one of ['no unit of measurement', '%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
NickStallman commented 1 week ago

What HA version are you running by any chance?

Your HA is wanting power factor as a percentage which caused some discussion in https://github.com/home-assistant/architecture/issues/469 and https://github.com/home-assistant/core/pull/85181 since strictly speaking power factor is not a percentage but this should have been fixed last year.

I also don't see that message in my logs running on 2024.11.1.

mtrekker commented 1 week ago

I am getting power_factor warning at restart.

> ha info              
arch: amd64
channel: stable
docker: 27.2.0
features:
- reboot
- shutdown
- services
- network
- hostname
- timedate
- os_agent
- haos
- resolved
- journal
- disk
- mount
hassos: "13.2"
homeassistant: 2024.11.1
hostname: homeassistant
logging: info
machine: generic-x86-64
operating_system: Home Assistant OS 13.2
state: running
supervisor: 2024.11.2
supported: true
supported_arch:
- amd64
- i386
mtrekker commented 1 week ago

Comparing 2 sensors, one has and the other doesn't have unit defined.

image