r-renato / ha-climacell-weather

Climacell weather provider integration is a custom component for Home Assistant. The climacell platform uses the Climacell API as a source for meteorological data for your location.
MIT License
46 stars 10 forks source link

Question on new API #38

Open julianrinaldi opened 3 years ago

julianrinaldi commented 3 years ago

I spent the morning setting up a Road Risk conditions card, and then updated to the new version, and they all broke. I now realize the API has changed. I'm looking at the API documents and I'm not seeing anything for road conditions. Is this now gone?

mfabiani53 commented 3 years ago

I think we need to know all the breaking changes after the latest update of the integration.... I will wait these before updating....

r-renato commented 3 years ago

Is this issue still there?

julianrinaldi commented 3 years ago

Yes. Actually all of my sensors are throwing errors and showing up as "Unknown" 2021-01-25 16:12:12 WARNING (SyncWorker_27) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc Climacell Precipitation 0d

I have signed up for and am using the V4 API Key

- platform: climacell
  api_key: !secret climacell_api_key
  name: Climacell
  timelines:
    - name: ""
      fields:
        - temperature
        - wind_direction
        - precipitation
        - precipitation_type
        - wind_speed
        - wind_direction
        - weather_condition
        - pollen_tree
        - pollen_weed
        - pollen_grass
        - road_risk
        - road_risk_conditions
        - road_risk_confidence
      update: auto
      forecast_observations: 5
      timestep: "15m"
      scan_interval:
          minutes: 5
InToSSH commented 3 years ago

I have exactly the same problem. It worked for a bit, but only some sensors. The log is full of errors:

2021-01-26 01:14:02 WARNING (SyncWorker_6) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc Home Daily Temperature 0d
2021-01-26 01:14:02 WARNING (SyncWorker_2) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc Home Daily Temperature 1d
2021-01-26 01:14:02 WARNING (SyncWorker_4) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc Home Daily Temperature 2d

UPDATE: It started working after the latest update from HACS. Also make sure your fields are correctly set, it looks like if there is any, that's not supported, it won't load the rest aswell (had one myself)

cbergmann commented 3 years ago

@InToSSH that is correct. One timeline is one request to the API with all the fields. This is to reduce the number of requests as this is the limiting factor of the free tier. But if the request fails for some reason there is no data for any field of that timeline.

@julianrinaldi is the problem still there with the current version?

julianrinaldi commented 3 years ago

@cbergmann It is working now, but I think it was due to having old sensors still in my configuration. As I said earlier, the road conditions entities seem to have been removed, but I had left them in the configuration. Once I removed them, it worked correctly. Hopefully they come back at some point since that's the main reason I used this integration.

jazzyisj commented 3 years ago

@julianrinaldi

ClimaCell has removed everything but these core data layers from the free API in v4. I doubt any of the premium features will ever be added back to the core layers again. They gotta make money somehow!

https://www.climacell.co/data-catalog/core

cbergmann commented 3 years ago

Hi, unfortunately that is correct but furthermore road risks seem to be available in no data layer. Despite the fact, that they mention it in the Overview. Therefore my PR #46 removes them completely. That should print a invalid field error and just skip the field.