Closed aherbjornsen closed 1 year ago
Hi @aherbjornsen, it looks weird. I've just tested it against 2021.2 and all tests passed successfully. Nevertheless, I've added some additional checks for this piece of code, now it should write an error message to the HA log instead of crashing.
Could you please install last version from the main branch and check HA logs for Watchman errors? In order to do this:
In order to check if new version was installed, go to Settings->Devices&Services and click "1 service" link under Watchman tile. You should see version 0.6.1 under Service Info. Then, please, check HA logs and paste here the error message from Watchman for further investigations. Thanks!
Thanks for the detailed response.
I've tried to update Watchman from HACS, as per your instructions, but is unable to see a higher version than 0.6.0. I even checked for beta versions, but I seem to be stuck with 0.6.0.
This is correct, 0.6.1 will not be shown in the HACS versions list. You should select "main" in the list of versions as per attached screenshot:
This is not an "official" new version published to HACS yet, just a quick and dirty fix in the main branch to figure out the reason of this error. AFAIK all the states for all entities in Home Assistant reported as strings even if they're numbers. In your case a state was reported as float so I'm curious what entity/integration caused this.
Sorry, I missed the "main" part. Redownloaded once again and now I see 0.6.1 and the error messages seems to have gone. Thanks for your patience and fast response.
@aherbjornsen Great! Could you please check HA logs now and post here the relevant error message(s) from Watchman (Unable to get state for...
)? I hope it helps to find out the reason of this error.
The messages I saw before the upgrade has gone. Then I saw them at regular 15 minute intervals.
After the upgrade I see two errors:
2023-01-17 11:51:25.271 ERROR (MainThread) [custom_components.watchman.utils] Unable to get state for sensor.nordpool_kwh_oslo_nok_3_095_025: 'float' object has no attribute 'replace'. Type: <class 'float'>
2023-01-17 11:52:32.999 ERROR (MainThread) [custom_components.watchman.utils] Unable to get state for sensor.nordpool_kwh_oslo_nok_3_095_025: 'float' object has no attribute 'replace'. Type: <class 'float'>
This a sensor created by the Nordpool custom integration: https://github.com/custom-components/nordpool/releases
Thanks, this confirms my speculation about a custom integration which, probably, does not follow HA development guidelines. I'll check it. So far (in 0.6.1) these two sensors will be present in your Watchman report with error
state. In the next Watchman release these sensors will be processed as a regular sensor with no errors.
Lately I've started seeing this error every 15 minutes:
Any suggestions to what the problem is? This is HASS 2023.1.4