Closed KenKilty closed 1 year ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
sensor documentation sensor source (message by IssueLinks)
Hey there @ottowinter, @jesserockz, mind taking a look at this issue as it has been labeled with an integration (esphome
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
esphome documentation esphome source (message by IssueLinks)
Hello, same for me with gas
core log: WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.energie_momentan_gas (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using state class 'measurement' which is impossible considering device class ('gas') it is using; expected None or one of 'total_increasing', 'total'; 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+esphome%22
If i change the esphome config file from gas to total i get from the validate
sensor.total_daily_energy: [source /config/esphome/espenergy.yaml:230] platform: total_daily_energy name: Energie Gas power_id: id_counter_gas id: id_tde_counter_gas icon: mdi:fire internal: False unit_of_measurement: m³
Unknown value 'total', valid options are '', 'apparent_power', 'aqi', 'battery', 'carbon_dioxide', 'carbon_monoxide', 'current', 'date', 'distance', 'duration', 'energy', 'frequency', 'gas', 'humidity', 'illuminance', 'moisture', 'monetary', 'nitrogen_dioxide', 'nitrogen_monoxide', 'nitrous_oxide', 'ozone', 'pm1', 'pm10', 'pm25', 'power', 'power_factor', 'precipitation_intensity', 'pressure', 'reactive_power', 'signal_strength', 'speed', 'sulphur_dioxide', 'temperature', 'timestamp', 'volatile_organic_compounds', 'voltage', 'volume', 'water', 'wind_speed', 'weight'. device_class: total
Same thing with my phone ...
Logger: homeassistant.components.sensor Source: components/sensor/init.py:608 Integration: Sensor (documentation, issues) First occurred: February 13, 2023 at 21:56:30 (1 occurrences) Last logged: February 13, 2023 at 21:56:30
Sensor sensor.mi_9_se_high_accuracy_update_interval has device class None, state class None and unit seconds thus indicating it has a numeric value; however, it has the non-numeric value: (<class 'str'>); 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+mobile_app%22
Seeing a similar issue with a Konnected alarm panel and ESPHome:
2023-03-02 14:33:02.213 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.alarm_panel_wifi_signal_2 (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement '%' which is not a valid unit for the device class ('signal_strength') it is using; expected one of ['dBm', 'dB']
I have same error: Logger: homeassistant.components.sensor Source: components/sensor/init.py:597 Integration: Érzékelő (documentation, issues) First occurred: 21:10:28 (6 occurrences) Last logged: 21:10:28
Sensor sensor.spathiphyllum_conductivity has device class None, state class measurement and unit µS/cm thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. Sensor sensor.spathiphyllum_soil_moisture has device class moisture, state class measurement and unit % thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. Sensor sensor.spathiphyllum_temperature has device class temperature, state class measurement and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. Sensor sensor.spathiphyllum_air_humidity has device class humidity, state class measurement and unit % thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. Sensor sensor.spathiphyllum_ppfd_mol has device class None, state class measurement and unit mol/s⋅m² thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still occurring with 2023.6.1 for signal_strength:
2023-06-12 20:44:55.578 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.alarm_panel_wifi_signal_2 (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement '%' which is not a valid unit for the device class ('signal_strength') it is using; expected one of ['dB', 'dBm']; 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+esphome%22
Still occurring with 2023.6.1 for signal_strength:
2023-06-12 20:44:55.578 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.alarm_panel_wifi_signal_2 (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement '%' which is not a valid unit for the device class ('signal_strength') it is using; expected one of ['dB', 'dBm']; Please update your configuration if your entity is manually configured, otherwise create a bug report at home-assistant/core/issues (is:open label:"integration: esphome")
%
is not a valid unit for signal strength. This error is correct
I am using the code from the example and I have the same error: https://esphome.io/components/sensor/wifi_signal.html
Either your code or the documentation is wrong.
FWIW I think that %
is a valid unit for signal strength. Although not technically precise, it is a commonly approximated measurement because dBm stated as a negative number is difficult for many people to understand. WiFi signal strength on iOS and Android is commonly expressed in "bars" which in essence is a visual representation of percent.
Also the fact that this example in the ESPHome documentation is the source of (at least some) of the warning messages here.
The problem
A possible false positive for an ESPHome device with what I believe is a proper configuration below, note the unit_of_measurement is '%' in the ESPHome YAML. Possible false positive?
Logs from Core:
What version of Home Assistant Core has the issue?
Home Assistant 2023.1.4 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230110.0 - latest
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ESPHome
Link to integration documentation on our website
https://www.home-assistant.io/integrations/esphome/
Diagnostics information
config_entry-esphome-41ecba6545e56f31234f565af27c6d4e.json.txt
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response