Closed smart-shed closed 3 months ago
Hey there @ottowinter, @jesserockz, @kbx81, @bdraco, 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)
Signal strength device class requires the unit of measurement to be in decibels. If that isn't doable, the entity should not be marked as signal strength device class.
sure does. so then maybe the work around here thats still required is to remove this from home assistant so i dont waste my time doing what it tells me to do for no result: see the very last line.
Logger: homeassistant.components.sensor Source: components/sensor/init.py:737 integration: Sensor (documentation, issues) First occurred: March 25, 2024 at 11:04:21 PM (3 occurrences) Last logged: March 25, 2024 at 11:04:21 PM
Entity sensor.athom_smart_plug_v2_a78c29_wifi_strength (<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']; 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
The problem
Home assistant logs show:
"Entity sensor.athom_smart_plug_v2_a78c29_wifi_strength (<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']; 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"
These are new to me, ESP is new to me, so i used basic defaults, it all works though. New devices this month so unknown last working home assistant version.
ESPHome web on the device shows: "WiFi Strength | 88 %" seems fine but shows no 'Wifi signal' or variation of 'signal strength' in the ESPHome web gui
Home assistant/dev tools/states/device YAML shows this and seems fine:
state_class: measurement unit_of_measurement: "%" device_class: signal_strength friendly_name: Smart Plug 3 WiFi Strength
which in home assistant device info shows expected: "WiFi Strength 88%" and is working.
I have 3x new Athom Smart Plug V2's recently doing the same thing. I think its to do with this part of the backend templated defaults which arent specified in the actual ESPHome adopt/cfg section:
ESPHome yaml config if i click ESPHome/device/EDIT (athom-smart-plug-v2-a7f8a4.yaml):
substitutions: name: athom-smart-plug-v2-a7f8a4 friendly_name: Smart Plug 3 packages: Athom_Technology.Smart_Plug_V2: github://athom-tech/athom-configs/athom-smart-plug-v2.yaml esphome: name: ${name} name_add_mac_suffix: false friendly_name: ${friendly_name} api: encryption: key: DVbAu0LDmQjhxWAufsN+1EhZ1n/vHstrVavIddcpewM=
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
This is from ESPHome/device/three dots/validate and copy the console running yaml config (partial):
sensor:
It seems to use the device_class: signal_strength correctly and uses the lambda calculation based of the prior wifi_signal_db so its all functioning as intended just that home assistant thinks it should be a db value instead of the calcualted % value, so the fix would be remove the log entry not change the variable as we already have the "wifi_signal_db" db and calculate the "signal_strength" % from it.
current release software on default green hardware.
What version of Home Assistant Core has the issue?
2024.3.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
ESPHome
Link to integration documentation on our website
https://www.home-assistant.io/integrations/esphome
Diagnostics information
config_entry-esphome-fb266b6288687cd78c7985ea1ec079bd.json
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
new user to ESPHome so i havent fiddled/got custom, just checking logs to clean up issues.