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

Not working error 400 #22

Closed max5962 closed 4 years ago

max5962 commented 4 years ago

Hello,

First thanks a lot for this component !

I install the component, configured it. and i have an error 400 :

2020-08-18 22:50:00 INFO (SyncWorker_33) [custom_components.climacell.sensor] __init__ setup_platform 'sensor' start for climacell with config OrderedDict([('platform', 'climacell'), ('api_key', 'XXXXXX'), ('name', 'pollen'), ('latitude', XXXX), ('longitude', XXXX), ('monitored_conditions', OrderedDict([('realtime', OrderedDict([('conditions', ['surface_shortwave_radiation', 'pm25', 'pm10', 'o3', 'no2', 'co', 'so2', 'epa_aqi', 'epa_primary_pollutant', 'epa_health_concern', 'china_health_concern', 'pollen_tree', 'pollen_weed', 'pollen_grass', 'road_risk_score', 'road_risk', 'road_risk_confidence', 'road_risk_conditions', 'fire_index']), ('update', ['auto']), ('scan_interval', datetime.timedelta(seconds=1800)), ('exclude_interval', [OrderedDict([(1, ['23:30', '06:00'])])])]))]))]).
2020-08-18 22:50:00 INFO (SyncWorker_33) [custom_components.climacell.sensor] __init__ setup_platform 'sensor' start for climacell.
2020-08-18 22:50:01 ERROR (SyncWorker_33) [custom_components.climacell] ClimacellRealtimeDataProvider._retrieve_data error status_code 400
2020-08-18 22:50:01 INFO (SyncWorker_33) [custom_components.climacell.sensor] __init__ setup_platform 'sensor' done for climacell.

`

Any idea ? Any idea in order to activate more logs ?

EDIT : i test my api key with https://developer.climacell.co/v3/reference#get-realtime and it was reconized. thanks a lot !

max5962 commented 4 years ago

After added more logs : "custom_components.climacell: debug"

i have : 2020-08-18 23:02:46 DEBUG (SyncWorker_12) [custom_components.climacell] _retrieve_data response.text: {"statusCode":400,"errorCode":"BadReques t","message":"Field road_risk is not supported in this region."}

max5962 commented 4 years ago

After remove some monitored item ( all road stuff) it's now working ! Thanks a lot !