Closed mermelmadness closed 1 year ago
Good catch! I'm seeing this as well on my end, so let me investigate
Follow-up question- did you add a "time" sensor, and is it updating?
I did, but it is in a weird numerical format and also not updating.
If the Time
sensor messed stuff up you can remove it. I'll figure out an alternative.
Nope, not the time sensor. I'm thinking it might have something to do with re-configuring the sensors, but not sure yet
Random thought. Now that all these are individual sensors instead of attributes of a single sensor, did I exceed my 10,000 API calls per month? Is each sensor making its own call now?
Good thought, but luckily that's not it! The data update coordinator handles all the fetching, so no matter how many sensor or weather entities you have for a given location, it's all done in a single call. I've isolated this down to making a change using the configure button- updates stop working whenever it's configured. The key question is if this is a new issue, or something that has always been happening before 1.3
From my limited testing this issue seems to happen if you have the time sensor selected in your list of sensors. I was having the same issue and it seems that removing the sensor (and restarting HA) seems to have solved the issue for me. I'm going to observe it for a bit longer to say conclusively if that is the issue or not.
Have you tried removing the time sensor to see if that solves your issue?
Oh interesting, I didn't try restarting. Definitely let me know if that works- first with the time sensor, then without
So I had already disabled the time sensor and restarted, which worked. Now all temps are updating.
Will try re-adding the Time sensor and restart again.
Enabling Time
without restarting freezes the sensors.
Enabling Time
with restarting leaves the sensors frozen.
Hmm, now nothing is updating, not even the weather entity.
Ok, I think I've got a solution here! For some reason it's not linking with the existing weather coordinator when options are changed. In the current version I had a check to see if there was an existing coordinator, but that was only there in case someone wanted both a daily and hourly forecast in their dashboard. Now that both of those are handled in one place, that's no longer required! Long story short, 1.3.2 is incoming shortly
I see. Ok, will look out it and test.
1.3.2 installed and HA restarted. I have my scan interval set to 2min 15sec and it doesn't seem to be updating at that interval.
Do you mind going to setting -> logs -> load full logs? The coordinator logs an info log every time it checks for an update, so it should show up there if it's updating
This is the only log entry I can find for PirateWeather:
2023-11-15 11:29:06.329 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration pirateweather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-11-15 11:29:18.023 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.pirateweather
2023-11-15 11:29:18.024 WARNING (MainThread) [custom_components.pirateweather.sensor] Configuration of Pirate Weather sensor in YAML is deprecated Your existing configuration has been imported into the UI automatically and can be safely removed from your configuration.yaml file
2023-11-15 11:29:18.103 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'conversation', 'device_automation', 'switch', 'system_health', 'hacs', 'generic', 'assist_pipeline', 'hardware', 'timer', 'light', 'blueprint', 'utility_meter', 'default_config', 'lovelace', 'bluetooth_adapters', 'ffmpeg', 'zone', 'input_datetime', 'group', 'openrgb', 'roku', 'tplink', 'map', 'shell_command', 'moon', 'teamtracker', 'scrape', 'ipp', 'tts', 'config', 'mobile_app', 'image_upload', 'waze_travel_time', 'enphase_envoy', 'media_source', 'input_number', 'weatherdotcom', 'template', 'rest_command', 'roomba', 'thread', 'esphome', 'brother', 'automation', 'input_select', 'flume', 'hue', 'wled', 'person', 'search', 'schedule', 'octoprint', 'honeywell', 'onboarding', 'pirateweather', 'input_boolean', 'mqtt', 'stt', 'scene', 'counter', 'diagnostics', 'tag', 'cast', 'trace', 'tasmota', 'history', 'sensor', 'my', 'stream', 'application_credentials', 'mass', 'google_sheets', 'logbook', 'spotify', 'persistent_notification', 'analytics', 'script', 'notify', 'wemo', 'jokes', 'repairs', 'input_text', 'energy', 'homeassistant_alerts', 'auth', 'input_button', 'camera', 'upnp', 'wake_word', 'sun', 'ibeacon', 'zwave_js', 'file_upload', 'smartthinq_sensors'}
2023-11-15 11:29:18.217 INFO (MainThread) [homeassistant.setup] Setting up pirateweather
2023-11-15 11:29:18.217 INFO (MainThread) [homeassistant.setup] Setup of domain pirateweather took 0.0 seconds
2023-11-15 11:29:22.048 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.247420285933096,-73.22891145944597
2023-11-15 11:29:22.070 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.2474,-73.2289
2023-11-15 11:29:23.720 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.pirateweather
2023-11-15 11:29:26.132 INFO (MainThread) [homeassistant.components.weather] Setting up weather.pirateweather
2023-11-15 11:31:40.319 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.247420285933096,-73.22891145944597
2023-11-15 11:33:56.145 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.247420285933096,-73.22891145944597
2023-11-15 11:36:12.129 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.247420285933096,-73.22891145944597
2023-11-15 11:38:28.041 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.247420285933096,-73.22891145944597
2023-11-15 11:40:44.017 INFO (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 41.247420285933096,-73.22891145944597
That's great! Check out those bottom lines, that's the update coordinator checking for updates every 2 seconds, which is looking promising. Also worth adding a the time sensor back in, since that should update every go
Time sensor is back in, but is still displaying that odd 10-digit string. The other sensors are still not showing as updated recently.
Unless I'm being too impatient. I can let it run for a few hours and report back.
Yea, the 10-digit string is the UNIT time for the forecast. I'm not sure if HA has a better way of displaying it (maybe ISO), but it should change with every update:
Mine isn't updating like that
Can you try selecting "reload" from the three dot menu on the integration page? I'm thinking that might kick it into gear
Ok, that did it. And now that I know it's Unix time I wrote this template to convert it to human-readable MM/DD.
forecast_date_2d:
friendly_name: "Forecast Date 2d"
value_template: "{{ states('sensor.pirateweather_time_2d') | int | timestamp_custom('%m/%d') }}"
Ok, everything seems to be working as expected now. Thank you for your prompt responses and for maintaining this integration.
I updated to v1.3.1, which I know is a pre-release, but wanted to let you know that none of the sensors that are selectable from the Configure section are updating and have been static for the past 15 hours or so.
My config for the sensors:
and my entry in sensors.yaml:
Should I try a new API key?