Code Monkey home page Code Monkey logo

ha-climacell-weather's People

Contributors

cbergmann avatar jcgoette avatar l1p0-m avatar lgtm-migrator avatar r-renato avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-climacell-weather's Issues

Add feels_like to sensor list

climacell provides a data point called feels_like which is the apparent temperature that takes into account wind and other factors. Would be great to see this added (and added to the new lovelace card, which I will put in a request on that repository)

[Feature Request] High/low temp for the day

Since I'm using this as part of an irrigation management system, two of the sensors required is high and low temp for the day. I had a custom AppDaemon routine that was doing what your integration does and I had created the extra sensors that simply reset to the current temperature at midnight. Can you incorporate this feature? It will save anyone that needs it from having to do it themselves.

if you'd be so kind as to consider calling them sensor.cc_lowtoday and sensor.cc_hightoday, it would save me having to redo a lot of my work.

Invalid timestep: current

Hello,

On the new API 4, I am seeing this error in the log:

Logger: custom_components.climacell.sensor
Source: custom_components/climacell/sensor.py:197
Integration: Climacell weather (documentation)
First occurred: 11:08:41 AM (1 occurrences)
Last logged: 11:08:41 AM
Invalid timestep: current 

Configuration:

  - platform: climacell
    api_key: 
    name: Climacell Weather
    latitude: 
    longitude: 
    timelines:
      - name: "Current"
        timestep: "current"
        fields:
          - temperature
...

As far as I can tell from the docs, this should be a valid timestep.

https://docs.climacell.co/reference/data-layers-overview

Cheers.

Hourly forecast is not pulling back correct values

The hourly forecast values are not bringing back the correct values.

Examples:
The current forecast and the 0h forecast differ greatly.
When I use postman to access the Climacell API using my system's lat and long, the values do not match the values on the sensors.

Running into a "too many requests error" - code 429 since move to v4 API

Hi, I do have 5 location I want to request information from. All of them require daily and real time information (but in intervals of 15 min or 60min) and one which requires realtime (every 15 min), daily (every 3hours) and hourly (every 15 min).
In HA I get a 400 and 429 error.

Details from log view:

Logger: custom_components.climacell.data_provider
Source: custom_components/climacell/data_provider.py:235
Integration: Climacell weather (documentation)
First occurred: 9:39:16 (5 occurrences)
Last logged: 9:39:17

ClimacellTimelineDataProvider._retrieve_data error status_code 400
ClimacellTimelineDataProvider._retrieve_data error status_code 429

Is there a chance to put some delay between the requests? Or whatever is required? Thank...

Return decimals for Temperature and Feels Like

I noticed that the climacell api returns a number for all their numeric values but for the fields temp and feels_like I always receive a number without decimals. Is it possible to receive the whole number?

Missing current temperature sensors 'unknown'

Hi,

Today I made the update to Climacell API v4 and updated the fields but I can't get the current temperature sensors to work.

In HA Developer Tools I get the sensors but they display 'unknown' value. This does not happen to all but just the current measurements as the others appear (for example sensor.cc_climacell_temperature = 'unknown' but sensor.cc_climacell_temperature_0d returns a value.

This makes me think I'm missing something for the current weather conditions or that my config is wrong.

  - platform: climacell
    api_key: !secret climacell_api_key
    name: climacell
    units: metric
    timelines:
      - name: "" #Realtime
        timestep: "1m"
        forecast_observations: 1
        fields:
          - temperature
          - feels_like
          - humidity
          - visibility
          - cloud_cover
          - precipitationIntensity
          - precipitation_type
          - pressure
          - wind_speed
          - wind_direction
          - wind_gust
          - sunset
          - sunrise
          - pollen_tree
          - pollen_weed
          - pollen_grass
          - co
          - epa_aqi
          - epa_health_concern
          - no2
          - o3
          - pm10
          - pm25
          - so2
        update: auto
        scan_interval:
          # At least one of these must be specified:
          days: 0
          hours: 0
          minutes: 31
          seconds: 0
          milliseconds: 0
      - name: "" #daily
        forecast_observations: 5
        fields:
          - temperature
          - temperatureMin
          - temperatureMax
          - precipitationIntensityMin
          - precipitationIntensityMax
          - precipitation_probability
          - weather_condition
        scan_interval:
          # At least one of these must be specified:
          days: 0
          hours: 3
          minutes: 0
          seconds: 0
          milliseconds: 0
        exclude_interval:
          1:
            - "10:00"
            - "12:00"
          2:
            - "00:00"
            - "06:30"

Not Receiving wind information since migrating to v4 API

I am not getting and wind information. My sensors report unknown for wind direction and 0 for speed and gust. Here is my config

- platform: climacell
  api_key: !secret climacell_api_v4
  latitude: !secret homeassistant_latitude
  longitude: !secret homeassistant_longitude
  units: imperial
  timelines:
    - name: ""
      timestep: "1m"
      forecast_observations: 1
      fields:
        - weather_condition
        - temperatureMax
        - feels_like
        - humidity
        - wind_speed
        - wind_direction
        - wind_gust
        - pressure
        - precipitationIntensity
        - precipitation_type
        - visibility
        - cloud_cover
      update: auto
      scan_interval:
        # At least one of these must be specified:
        days: 0
        hours: 0
        minutes: 5
        seconds: 0
        milliseconds: 0
    - name: "Forecast"
      timestep: "1d"
      forecast_observations: 6
      fields:
        - temperatureMin
        - temperatureMax
        - precipitationIntensityMin
        - precipitationIntensityMax
        - precipitation_probability
        - weather_condition
      scan_interval:
        # At least one of these must be specified:
        days: 0
        hours: 4
        minutes: 0
        seconds: 0
        milliseconds: 0

Fields that prevent realtime or current (1m) updates from working

I had many of the reported issues with the v4 API that others have posted about resulting in sensors with a status of unknown and log messages with a 400 error from the API, or sensors seeing no data. Having worked with APIs in the past, I pointed Postman at the Climacell v4 API, and dropped in the same parameters in, mimicking the request captured in this components logs in HA.

What I found, in my case, was that at least the following fields are not usable when doing a timestep of "current" or "1m":

  • moonPhase
  • sunsetTime
  • sunriseTime

I had these carried over from my old config, where they must have worked with v3.

Rather than having to carefully document this, and hope people read the docs, would it be possible to simply modify the code to ignore those fields when configured with a timestep of "current" or "1m"?

Thought if nothing else I'd share my findings, as I know I saw some other references to sunrise and sunset.

Interested in collaborating?

Hey there,

Recently came across this integration in a Reddit thread. Not sure if you published this before I started working on my own integration or not (I could have sworn I checked), but I have a PR open to add a climacell integration to home-assistant/core (home-assistant/core#36547). Would you be interested in collaborating on an "official" integration and trying to merge these together? From the looks of it, we went with different design approaches - I tried to conform to HA's standards for their core integrations, but I am definitely open to changing some of the design decisions if it makes sense. Anyway, let me know, it'd be great to have two heads instead of one on it. Cheers!

BTW - if you'd prefer to keep these projects independent, I totally understand, you have a lot more freedom with integrations outside of the core list.

Adding either of 2 attributes cause no data to be available

2021-01-31 19:09:39 WARNING (SyncWorker_5) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell so2 
2021-01-31 19:09:39 WARNING (SyncWorker_10) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell EPA AQI 
2021-01-31 19:09:39 WARNING (SyncWorker_6) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell EPA Health Concern 
2021-01-31 19:09:39 WARNING (SyncWorker_8) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell Pollen Tree 
2021-01-31 19:09:39 WARNING (SyncWorker_9) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell Pollen Weed 
2021-01-31 19:09:39 WARNING (SyncWorker_7) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell Pollen Grass 
2021-01-31 19:09:39 WARNING (SyncWorker_10) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell Fire Index 
2021-01-31 19:09:39 WARNING (SyncWorker_6) [custom_components.climacell.sensor] TimelineSensor.update - Provider has no data for: cc climacell Road Risk Conditions 

Adding either of the 2 comment attributes cause the above warnings, and no data is retrieved

        - weather_condition
        - co
        - so2
        - epa_aqi
        - epa_health_concern
        - pollen_tree
        - pollen_weed
        - pollen_grass
        - fire_index
#        - moon_phase
#        - road_risk_conditions
      update: auto
      scan_interval:
        # At least one of these must be specified:
        days: 0
        hours: 0
        minutes: 30
        seconds: 0
        milliseconds: 0

sensor missing data

I have
sensor.cc_vejret_temperature, that stands as unknown, and a lot of the other sensors is also unknown.
in addition, I have several sensors that are there several times.
for example.

sensor.cc_vejret_temperature_00m
sensor.cc_vejret_temperature_0d
sensor.cc_vejret_temperature_0d_2
sensor.cc_vejret_temperature_0h

what data show the different. some show realtime, others hourly, but what's what?

Adding the field "moon_phase" breaks most of the sensors (V4)

Thank you @r-renato for your great work !
The last update brought me back 99% of the sensors but unfortunately it's seems impossible to add the moon_phase, when i do so most of the sensors are reporting unknown states.
Has you didn't had the field in your configuration exemple there is maybe some issues with this particular sensor.
I hope you will find a way to solve this.
Keep it up, this component and the dedicated card you have created are amazing !

Scan Interval issue?

I'm trying to get the realtime every few minutes but it's only updating every 10. Is there a minimum setting that's overriding my scan interval?

Climacell data not working shwoing as unknown

Hello,

Since a few months i cant get data for climacell, since it shows as unknown.
My config is:

sensor:

Weather climatecell.co

  • platform: climacell
    api_key: !secret climacell_api_key
    name: cc.tempo
    latitude: xxxxxx
    longitude: xxxxx
    monitored_conditions:
    realtime:
    conditions:
    - weather_condition
    - temperature
    - humidity
    - visibility
    - cloud_cover
    - precipitation
    - precipitation_type
    - feels_like
    - dewpoint
    - visibility
    - cloud_cover
    - cloud_base
    - cloud_ceiling
    - surface_shortwave_radiation
    - pressure
    - wind_speed
    - wind_direction
    - wind_gust
    - moon_phase
    - sunset
    - sunrise
    - pm25
    - pm10
    - o3
    - no2
    - co
    - so2
    - epa_aqi
    - epa_primary_pollutant
    - epa_health_concern
    - pollen_tree
    - pollen_weed
    - pollen_grass
    - fire_index
    - road_risk_score
    - road_risk_confidence
    - road_risk_conditions
    update: auto
    scan_interval:
    # At least one of these must be specified:
    hours: 1
    minutes: 30
    exclude_interval:
    1:
    - "23:30"
    - "06:00"
    daily:
    forecast_observations: 5
    conditions:
    - temperature
    - feels_like
    - humidity
    - wind_speed
    - pressure
    - precipitation
    - precipitation_probability
    - sunset
    - sunrise
    - weather_condition
    scan_interval:
    # At least one of these must be specified:
    days: 0
    hours: 3
    minutes: 0
    seconds: 0
    milliseconds: 0
    exclude_interval:
    1:
    - "0:00"
    - "06:00"

imagem

[Feature Request] Support for hourly forecasts

I can't thank you enough for creating this awesome integration, especially after Dark Sky can no longer be depended on. While everything you have built till now works perfectly, I was hoping to suggest a new feature.

Could you please add support for hourly forecasts as well? This seems to be available in the free plan and could be great for aspects like predicting overnight weather or knowing whether it will rain between a certain time range.

https://developer.climacell.co/v3/reference#get-hourly

Use GitHub releases

This GitHub repository has one Release that is marked as a "pre-release". It seems that HACS ignores releases that are marked as Pre-Release. It means that everyone who installed this integration using HACS gets upgrade notification on every commit to the Master branch.
I suggest creating Releases from time to time (that are not marked as "pre-release"), when critical bugs are fixed, and when significant new functionality is introduced.

Create a new GitHub Release, but leave the following checkbox unchecked:
image

Accumulated Rain Sensor

Several versions ago, the accumulated rain sensor disappeared. I haven't tried to run this again since as I've been busy and it was easier to simply shut down the automations that needed that sensor. Is (or has) this sensor been restored? It is needed for the Smart Irrigation integration as well as others that used it and a few of my personal automations.

supported monitored conditions in other units except metric and royal

hi thanks for your great component, can you somehow incorporate the other units option per monitored condition?
Since the API supports asking for a monitored condition to be returned using different units than metric or royal this should be doable if you like to incorporate it.

from the reference docs https://developer.climacell.co/v3/reference#formats
Unit System

We support Metric and Royal unit systems, amongst additional units as well as both public and proprietary weather condition indexing.

Note
Regardless of the units chosen in the request, you may change the units of each data layer by adding the relevant suffix. For example, if you request /daily data in SI units, you can add the field precipitation:in/hr thereby overriding the original units (mm/hr).

eg for wind the other units support km/h

thank you.

Climate Data is way off vs their site.

Climate numbers are off (vs their site). Looks like elevation might play a factor here. Anyway to get that incorporated? Our elevation here is 6276 (feet). I think other weather apis send it automatically. Climacell must have it automatically when I typed in my address.

Screen Shot 2020-07-10 at 2 57 23 PM

[Feature Request] Combine various timestep sensors into a single sensor with a list of attributes

If possible, could you please create a single entity for hourly or daily forecast and providing all the values related to it as an array of attributes available on it? I am not sure if this something the custom component takes care of or if it is handled by HA itself. But, this is how all the weather type entities seem to work.

Attached here is an example of how the NOAA component work. If you notice here, there is only one entity for the daily forecast. However, the entity holds the attributes needed for each and every forecast timestep. I feel like the Climacell component, as it adds more and more attributes, can make use of such a structure to avoid too many new entities from being created.

image
image

Feature request - Actual time rather than 0h, 1h, 2h, etc of hourly forcasts

Hi

Is there any chance you can make the friendly name to say ie 12:00, 13:00, 14:00 for the hourly forecasts rather than 0h,1h,2h,3h, etc ?

I tried to make a friendly_name_template to say "Rainfall {{ now().hour }} and {{ now().hour +1 }}" for 1 hour and then "Rainfall {{ now().hour }} and {{ now().hour +2 }}" for 2 hours, etc

Ive got some friendly_name_templates for individual sensors but could not find a way to do this as its automated

If its possible, I guess the day would be possible too for daily forecasts (not checked this out yet, so it might already do it)

Thanks again

Martyn

Temperature and Feels Like Temperature

Hi.

Great work and cant have been easy the last week or so. So thank you.

I have V4 working and not working but currently working but this time my temperature and feels like temperatures are back to been the same temperatures. This was working at the start of V4 api and had different temperatures but last update put them back to being the same. Is this a bug ?

Met Office in UK is saying for eg 6c but feels like 2 but Climacell is saying both temperature and feels like are both 5.71c

Thanks

Martyn

Question on Forecast_Observations

When using the "forecast_observations" how would you show that in the config?

forecast_observations: 7
or
forecast_observations:
7

or something else?

After update errors

Logger: homeassistant.components.sensor
Source: custom_components/climacell/sensor.py:241
Integration: Sensor (documentation, issues)
First occurred: 12:18:22 PM (1 occurrences)
Last logged: 12:18:22 PM

Error while setting up climacell platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/climacell/sensor.py", line 241, in setup_platform
unit = UNITS[units][field]
KeyError: 'sunsetTime'

Historical Data - feature request

Hi there,

I would like to scan "historical data" from the CC API.
As far as I know there is a "Station" Value in the API which provides historical Data.
I would like to use "precipitation_accumulation" within the last 24 h to trigger my irrigation system.

Any chance to integrate this in this very nice ha-climacell-weather integration :-) ?

regards, JHWas

Pollen index KeyError

My integration started reporting errors while handling pollen values for my area. It seems there is some kind of unit conversion error with the pollen index going on.

Logger: homeassistant.helpers.entity
Source: custom_components/climacell/sensor.py:411
First occurred: 26. März 2021, 22:50:19 (3158 occurrences)
Last logged: 10:50:03

Update for sensor.cc_climacell_pollen_tree fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 277, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climacell/sensor.py", line 411, in update
    self._state = self.__valuemap[str(self._state)]
KeyError: '0.83'

This is my configuration:

- platform: climacell
  api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  name: climacell
  units: metric
  timelines:
    - name: "" #Realtime
      timestep: "1m"
      forecast_observations: 1
      fields:
        - temperatureMax
        - feels_like
        - humidity
        - wind_speed
        - wind_direction
        - wind_gust
        - pressure
        - precipitationIntensity
        - precipitation_type
        - visibility
        - cloud_cover
        - weather_condition
        - pm25
        - pm10
        - o3
        - no2
        - co
        - so2
        - epa_aqi
        - epa_health_concern
        - pollen_tree
        - pollen_weed
        - pollen_grass
        - fire_index
      update: auto
      scan_interval:
        # At least one of these must be specified:
        days: 0
        hours: 1
        minutes: 0
        seconds: 0
        milliseconds: 0
      exclude_interval:
        1:
          - "00:00"
          - "07:00"
    - name: "" #Daily
      timestep: "1d"
      forecast_observations: 5
      fields:
        - temperature
        - temperatureMin
        - temperatureMax
        - precipitationIntensityMin
        - precipitationIntensityMax
        - precipitation_probability
        - weather_condition
      scan_interval:
        # At least one of these must be specified:
        days: 0
        hours: 4
        minutes: 0
        seconds: 0
        milliseconds: 0
      exclude_interval:
        1:
          - "23:00"
          - "06:30"

Climacell weather provider

Just updated to the current version and it is now not showing in lovelace.

Ymal file is still there, but not deplay.

Please check.

Regards

Forecast is not working properly after last update

Hi

After last update, forecast has changed and I've changed the configuration in sensor.yaml

Daily forecast gives always unknown and now the fields name that previously were 0d, 1d, 2d... now are 0_d, 1_d, 2_d

This is my actual configuration

    monitored_conditions:
      realtime:
        conditions:
          - temperature
          - feels_like
          - dewpoint
          - humidity
          - wind_speed
          - wind_direction
          - wind_gust
          - pressure
          - precipitation
          - precipitation_type
#          - precipitation_probability
#          - precipitation_accumulation
          - sunset
          - sunrise
          - visibility
          - cloud_cover
          - cloud_base
          - cloud_ceiling
#          - satellite_cloud
          - surface_shortwave_radiation
          - moon_phase
          - weather_condition
#          - weather_groups
          - pm25
          - pm10
          - o3
          - no2
          - co
          - so2
          - epa_aqi
          - epa_primary_pollutant
          - epa_health_concern
#          - china_aqi
#          - china_primary_pollutant
#          - 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:
          # At least one of these must be specified:
          days: 0
          hours: 0
          minutes: 30
          seconds: 0
          milliseconds: 0
      daily:
        forecast_observations: 5
        conditions:
          - temperature
          - feels_like
#          - dewpoint
          - humidity
          - wind_speed
          - wind_direction
#          - wind_gust
          - pressure
          - precipitation
#          - precipitation_type
          - precipitation_probability
          - precipitation_accumulation
          - sunset
          - sunrise
          - visibility
#          - cloud_cover
#          - cloud_base
#          - cloud_ceiling
#          - satellite_cloud
#          - surface_shortwave_radiation
#          - moon_phase
          - weather_condition
#          - weather_groups
#          - pm25
#          - pm10
#          - o3
#          - no2
#          - co
#          - so2
#          - epa_aqi
#          - epa_primary_pollutant
#          - epa_health_concern
#          - china_aqi
#          - china_primary_pollutant
#          - china_health_concern
#          - pollen_tree
#          - pollen_weed
#          - pollen_grass
#          - road_risk_score
#          - road_risk
#          - road_risk_confidence
#          - road_risk_conditions
#          - fire_index
        scan_interval:
          # At least one of these must be specified:
          days: 0
          hours: 3
          minutes: 0
          seconds: 0
          milliseconds: 0
        exclude_interval:
          1:
            - "10:00"
            - "12:00"
          2:
            - "00:00"
            - "06:30"
      hourly:
        forecast_observations: 5
        conditions:
          - temperature
          - feels_like
          - dewpoint
          - humidity
          - wind_speed
          - wind_direction
          - wind_gust
          - pressure
          - precipitation
          - precipitation_type
          - precipitation_probability
#          - precipitation_accumulation
          - sunset
          - sunrise
          - visibility
          - cloud_cover
          - cloud_base
          - cloud_ceiling
#          - satellite_cloud
          - surface_shortwave_radiation
          - moon_phase
          - weather_condition
#          - weather_groups
          - pm25
          - pm10
          - o3
          - no2
          - co
          - so2
          - epa_aqi
          - epa_primary_pollutant
          - epa_health_concern
#          - china_aqi
#          - china_primary_pollutant
#          - china_health_concern
          - pollen_tree
          - pollen_weed
          - pollen_grass
          - road_risk_score
#          - road_risk
          - road_risk_confidence
          - road_risk_conditions
#          - fire_index
        scan_interval:
          # At least one of these must be specified:
          days: 0
          hours: 1
          minutes: 0
          seconds: 0
          milliseconds: 0
      nowcast:
        timestep: 5
        forecast_observations: 5
        conditions:
          - temperature
          - feels_like
          - dewpoint
          - humidity
          - wind_speed
          - wind_direction
          - wind_gust
          - pressure
          - precipitation
          - precipitation_type
#          - precipitation_probability
#          - precipitation_accumulation
          - sunset
          - sunrise
          - visibility
          - cloud_cover
          - cloud_base
          - cloud_ceiling
#          - satellite_cloud
          - surface_shortwave_radiation
#          - moon_phase
          - weather_condition
#          - weather_groups
          - pm25
          - pm10
          - o3
          - no2
          - co
          - so2
          - epa_aqi
          - epa_primary_pollutant
          - epa_health_concern
#          - china_aqi
#          - china_primary_pollutant
#          - china_health_concern
          - pollen_tree
          - pollen_weed
          - pollen_grass
          - road_risk_score
#          - road_risk
          - road_risk_confidence
          - road_risk_conditions
#          - fire_index
        scan_interval:
          # At least one of these must be specified:
          days: 0
          hours: 0
          minutes: 5
          seconds: 0
          milliseconds: 0

This is what I get

Schermata 2020-07-01 alle 11 50 36

Question on new API

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?

Climacell Nowcast

Hi,

This is not quite an issue, but more a suggestion for improvement.

I am using your HACS integration for Climacell and it looks pretty well. Thanks for the nice job.

Are you considering getting the data for Nowcast (https://developer.climacell.co/v3/docs/forecast#section-nowcast)? With that, available on the free API as well, there is the possibility to have a shorter term forecast and keep an eye on when rain (as an example) is about to start falling.

Appreciate the work.

Cheers,

Error 403 from Climacell API

I have created a Climacell account this morning and then set up the HA component. At the moment it is only configured with a single monitored condition of cloud_cover. My YAML is:

  • platform: climacell
    api_key: !secret climacell_api
    latitude: !secret latitude
    longitude: !secret longitude
    monitored_conditions:
    realtime:
    conditions:
    - cloud_cover
    update: auto
    scan_interval:
    days: 0
    hours: 0
    minutes: 15
    seconds: 0
    milliseconds: 0

When I restart HA I get the following error in the logs:

`Logger: custom_components.climacell
Source: custom_components/climacell/init.py:93
Integration: Climacell weather (documentation)
First occurred: 15:49:51 (2 occurrences)
Last logged: 16:09:53

ClimacellRealtimeDataProvider._retrieve_data error status_code 403`

and then when the sensor tries to update I get:

`Logger: custom_components.climacell.sensor
Source: custom_components/climacell/sensor.py:399
Integration: Climacell weather (documentation)
First occurred: 15:49:51 (5 occurrences)
Last logged: 16:09:53

RealtimeSensor.update - Provider has no data for: cc climacell Cloud Cover`

On the Climacell account page it says that the API key is active and I have double and triple checked that it has been entered into my secrets.yaml file correctly with no spaces etc.

image

I know that the 403 error would normally suggest permission problems but I can't see a reason why I would be getting access denied based on everything that I have listed above.

Any ideas why this might be happening?

Missing _0d in forcast

According to the docs:

daily
[...]
forecast_observations
(integer)(Optional)
Number of days for which you would like to receive forecast. The valid values are numbers starting from 1 to 15. Any condition from monitored_conditions (forecast) will generate a sensor with entity_id _d.
Default value:
5

I do only see 1-n values, but your weather card shows a _0d setting:

https://github.com/r-renato/ha-card-weather-conditions#current-layer-example-of-card-setup

    forecast:
      temperature_high:
        day_1: sensor.cc_test_max_temperature_0d
      temperature_low:
        day_1: sensor.cc_test_min_temperature_0d

Where do I get Zero day, "Today", min and max values?

Stopped working after last update

I had the climacell setup configured in yaml and it worked pretty well. But after the latest update I'm getting the following error in the logs rights after HA restart:

2021-03-10 08:52:10 ERROR (MainThread) [homeassistant.components.sensor] climacell: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 465, in async_device_update
    await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climacell/sensor.py", line 411, in update
    self._state = self.__valuemap[str(self._state)]
KeyError: '0.86'

This can be reproduced and happens every time I'm restarting HA.

Then I thought I should probably switch to the UI config and removed CC from the yaml config, restarted HA and went to config / integrations to add CC there. A popup shows up telling me about a config_flow error. When looking into the logs, I'm seeing this error message:

ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration climacell: No module named 'custom_components.climacell.config_flow'

Is that a known issue? What can I do to get back to a working version? Or can I provide more background information to further analyze the problem?

Is it gonna rain today and how much?

Thanks a lot for your work on this!
Just updated it and the amount of data is overwhelming!

I am going ESP8266/MQTT with my sprinklers, and want to use your component's data to enable, or not the watering automation.

From the realtime/hourly/daily configs, I get the followings:

sensor.cc_climat_precipitation = right now

sensor.cc_climat_precipitation_1h = now + 1h
sensor.cc_climat_precipitation_2h = 1h + 1h after (now + 1h not added)

sensor.cc_climat_precipitation_max_1d = max precipitation tomorrow
sensor.cc_climat_precipitation_max_2d = max precipitation day after tomorrow

What about today? Will it rain today and how much? Almost like a "_0d". Is one of the data received represents this, or creating a template adding like 12 hourly results the only way?

Thanks!!

Pollen Info

Hi! Just switch to this "weather" sensor and it would be great to have Pollen data and fire risk etc.

Would that be something on the roadmap?

API 3 stopping soon and V4 didnt seem to work

Hi many thanks for a great plugin, I could not get the V4 API to work 3 works fine but emailed climacell and they advise that V3 will be stopping soon.

Paul, You may register to V3 here: https://developer.climacell.co/register
Having said that, V3 will be discontinued in the next few week and we strongly recommend you sign up to our V4.

  Jacob   

Best Regard, ClimaCell Customer Success Team

Not working error 400

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 ! 

Feature Request: support for weather platform

Could this integration present a weather.climacell entity as well as the various individual sensors?

This would make it easier to use with the weather card, etal., without having to resort to third-party hackery to construct a fake weather.climacell from the sensors.

Thanks.

All the sensors are gone after latest release

I just updated to the latest release, made the changes accordingly to the docs and created the sensors in this way:

- platform: climacell
  api_key: !secret climacell_api
  name: climacell
  latitude: !secret latitude_casa
  longitude: !secret longitude_casa
  monitored_conditions:
    realtime:
      conditions:
        - weather_condition
        - temperature
        - feels_like
        - humidity
        - visibility
        - cloud_cover
        - precipitation
        - precipitation_type
        - pressure
        - wind_speed
        - wind_direction
        - wind_gust
        - moon_phase
        - sunset
        - sunrise
        - pm25
        - pm10
        - o3
        - co
        - so2
        - no2
        - epa_aqi
        - epa_health_concern
        - pollen_tree
        - pollen_weed
        - pollen_grass
        - road_risk_score
#          - road_risk
        - road_risk_confidence
        - road_risk_conditions
        - fire_index
      scan_interval:
        days: 0
        hours: 2
        minutes: 0
        seconds: 0
        milliseconds: 0
      exclude_interval:
        1:
          - "23:30"
          - "06:00"
    daily:
#    forecast_observation: 1
      conditions:
        - weather_condition
        - temperature
        - feels_like
        - humidity
        - visibility
        - precipitation
        - precipitation_probability
        - precipitation_accumulation
        - pressure
        - wind_speed
        - wind_direction
        - sunset
        - sunrise
      scan_interval:
        days: 0
        hours: 2
        minutes: 0
        seconds: 0
        milliseconds: 0
      exclude_interval:
        1:
          - "23:30"
          - "06:00"
    hourly:
#    forecast_observations:
      conditions:
        - weather_condition
        - temperature
        - feels_like
        - humidity
        - visibility
        - cloud_cover
        - precipitation
        - precipitation_probability
        - precipitation_type
        - pressure
        - wind_speed
        - wind_direction
        - wind_gust
        - moon_phase
        - sunset
        - sunrise
        - pm25
        - pm10
        - o3
        - co
        - so2
        - no2
        - epa_aqi
        - epa_health_concern
        - pollen_tree
        - pollen_weed
        - pollen_grass
        - road_risk_score
        - road_risk
        - road_risk_confidence
        - road_risk_conditions
      scan_interval:
        days: 0
        hours: 2
        minutes: 0
        seconds: 0
        milliseconds: 0
      exclude_interval:
        1:
          - "23:30"
          - "06:00"
    nowcast:
#    forecast_observations:
      conditions:
        - weather_condition
        - temperature
        - feels_like
        - humidity
        - visibility
        - cloud_cover
        - precipitation
        - precipitation_type
        - pressure
        - wind_speed
        - wind_direction
        - wind_gust
        - sunset
        - sunrise
        - pm25
        - pm10
        - o3
        - co
        - so2
        - no2
        - epa_aqi
        - epa_health_concern
        - pollen_tree
        - pollen_weed
        - pollen_grass
        - road_risk_confidence
        - road_risk_conditions
      scan_interval:
        days: 0
        hours: 2
        minutes: 0
        seconds: 0
        milliseconds: 0
      exclude_interval:
        1:
          - "23:30"
          - "06:00"
```
But after a restart i have NO sensors created and the HA log doesn't show any errors....
Where i am wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.