Climacell integration - weather doesn't get updated in the desired intervals (15min/30min), but more every 14+ hours

Hello,

I moved since some time from darksky to the custom climacell component (https://github.com/r-renato/ha-climacell-weather). This worked well for sensors, but I didn’t put in the effort for the weather component.
Now I am using the core climacell integration. I have to get:
main location

  • hourly forecast (weather card usage)
  • daily forecast (weather card usage)
  • current weather data and some specific hourly forecast (I take this from the daily or hourly weather component)
    2 additional locations
  • daily forecast (just today now and next day)

Code to generate my specific sensors additionally to the two weather cards (hourly + daily for main location) below.

The issues I found:

  • Data in the hourly weather card (most likely also daily) is not updated every 15 min (I set the config to 15min and 30min to test). Actually I saw it refreshing later than after 14 hours.
  • I don’t know how many calls the integration is doing. Not sure if I run into limits… I have now 3 climacell integrations and set all frequencies to 30min.
  • I can only set the frequency to max 30min. For my secondary locations, I would set them to every 3 hours to reduce API calls.

Any hint for debugging or fixing is highly valued!!! I want (need) an update of every 15min on my main location…

Thanks,

André

Update:
API calls are not exceeding, I checked my Tomorrow.io account. With the new integration, this is <100 calls per day. With the custom component, I was at 700/day… Seems not to be the issue.
I also only see 4 requests every two hours, though I configured every 30min for all three climacell location I set up with the integration.

YAML for main location sensors from weather component:

platform: template
sensors:
# now temp
  cc_wetter_berlin_climacell_feels_like:
    value_template: "{% if states.sensor.climacell_feels_like.state not in ['unavailable', 'unknown', None ] %}{{ states.sensor.climacell_feels_like.state | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: °C
  cc_wetter_berlin_climacell_temperature:
    value_template: "{% if state_attr('weather.climacell_daily','temperature') not in ['unavailable', 'unknown', None ] %}{{ state_attr('weather.climacell_daily','temperature') | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: °C
# now wind
  cc_wetter_berlin_wind_bearing: 
    value_template: "{% if state_attr('weather.climacell_daily','wind_bearing') not in ['unavailable', 'unknown', None ] %}{{ state_attr('weather.climacell_daily','wind_bearing') }}{% else %}unavailable{% endif %}"
    unit_of_measurement: '°'
  cc_wetter_berlin_wind_speed:
    value_template: "{% if state_attr('weather.climacell_daily','wind_speed') not in ['unavailable', 'unknown', None ] %}{{ state_attr('weather.climacell_daily','wind_speed') | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: m/s
  cc_wetter_berlin_climacell_wind_gust:
    value_template: "{% if states.sensor.climacell_wind_gust.state not in ['unavailable', 'unknown', None ] %}{{ states.sensor.climacell_wind_gust.state | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: m/s
# now clouds
  cc_wetter_berlin_climacell_cloud_cover:
    value_template: "{% if states.sensor.climacell_cloud_cover.state not in ['unavailable', 'unknown', None ] %}{{ states.sensor.climacell_cloud_cover.state }}{% else %}unavailable{% endif %}"
    unit_of_measurement: '%' 
# daily
  cc_wetter_berlin_climacell_temperature_maximum_0d:
    value_template: "{% if state_attr('weather.climacell_daily','forecast') not in [ None ] %}{{ state_attr('weather.climacell_daily','forecast')[0].temperature | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: °C
  cc_wetter_berlin_climacell_temperature_minimum_0d:
    value_template: "{% if state_attr('weather.climacell_daily','forecast') not in [ None ] %}{{ state_attr('weather.climacell_daily','forecast')[0].templow | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: °C
  cc_wetter_berlin_climacell_weather_condition_0d:
    value_template: "{% if state_attr('weather.climacell_daily','forecast') not in [ None ] %}{{ state_attr('weather.climacell_daily','forecast')[0].condition }}{% else %}unavailable{% endif %}"
  cc_wetter_berlin_climacell_precipitation_probability_0d:
    value_template: "{% if state_attr('weather.climacell_daily','forecast') not in [ None ] %}{{ state_attr('weather.climacell_daily','forecast')[0].precipitation_probability | round }}{% else %}unavailable{% endif %}"  
    unit_of_measurement: '%'  
# hourly
  cc_wetter_berlin_climacell_humidity_percentage:
    value_template: "{% if state_attr('weather.climacell_hourly','humidity') not in ['unavailable', 'unknown', None ] %}{{ state_attr('weather.climacell_hourly','humidity') | round }}{% else %}unavailable{% endif %}"
    unit_of_measurement: '%' 
  cc_wetter_berlin_climacell_barometric_pressure:
    value_template: "{% if state_attr('weather.climacell_hourly','pressure') not in ['unavailable', 'unknown', None ] %}{{ state_attr('weather.climacell_hourly','pressure') | round }}{% else %}unavailable{% endif %}"
    unit_of_measurement: hPa
  cc_wetter_berlin_climacell_precipitation_probability:
    value_template: "{% if state_attr('weather.climacell_hourly','forecast') not in [ None ] %}{{ state_attr('weather.climacell_hourly','forecast')[0].precipitation_probability | round }}{% else %}unavailable{% endif %}"
    unit_of_measurement: '%'  
  cc_wetter_berlin_climacell_precipitation_probability_1h:
    value_template: "{% if state_attr('weather.climacell_hourly','forecast') not in [ None ] %}{{ state_attr('weather.climacell_hourly','forecast')[1].precipitation_probability | round }}{% else %}unavailable{% endif %}"
    unit_of_measurement: '%'  

and for one secondary location (they are actually pretty much the same - except the location/used weather component of course)

platform: template
sensors:
# now temp
  cc_wetter_hamburg_climacell_feels_like:
    value_template: "{% if not states.sensor.climacell_feels_like_2.state in ['unavailable', 'unknown', None ] %}{{ states.sensor.climacell_feels_like_2.state | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: °C
  cc_wetter_hamburg_climacell_temperature:
    value_template: "{% if not state_attr('weather.climacell_daily_2','temperature') in ['unavailable', 'unknown', None ] %}{{ state_attr('weather.climacell_daily_2','temperature') | round(1) }}{% else %}unavailable{% endif %}"
    unit_of_measurement: °C

# daily
  cc_wetter_hamburg_climacell_precipitation_probability:
    value_template: "{% if state_attr('weather.climacell_daily_2','forecast') not in [ None ] %}{{ state_attr('weather.climacell_daily_3','forecast')[0].precipitation_probability | round }}{% else %}unavailable{% endif %}" 
    unit_of_measurement: '%'  

To clarify, i added some screenshots of the temperature history… You can clearly see the old sensor integration which updated multiple times per hour and the new integration, which simply rests for some time. As I changed configuration in between (frequencies etc), this might have caused some quicker updates…

Before I forget: I run HA in docker on a QNAP Intel NAS. HA version is 2021.10.1:

System Health

version: core-2021.10.1
installation_type: Home Assistant Container
dev: false
hassio: false
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 4.14.24-qnap
arch: x86_64
timezone: Europe/Berlin


GitHub API: ok
Github API Calls Remaining: 4994
Installed Version: 1.15.2
Stage: running
Available Repositories: 890
Installed Repositories: 32


dashboards: 1
resources: 17
views: 16
mode: storage

I guess I found the cause:
the integration has a rate limit, which was recently set to 100 for the day. I updated my const.py manually to a higher rate and will monitor the behavior.

I also filed a feature request to be able to configure this more here:

I think the request is solved.

André

Found additional user error: for one climacell integration, polling was disabled… now worling as expected