Ha-card-weather-conditions setup with ClimaCell/Tomorrow.io Integration

Hi,

i found that the Visualcode addon was in error.

install VSC on my computer and it is now working.

i have only one question, for the second parts of your code, the following:

do i have to install in the same file as the first one?

because i have the following error when checking:

image

regards

I have been following this thread and have been able to get some of the numbers outputted for my temp, humidity and everything (see top part of image) When it comes to the pollen stuff for the configuration.yaml file, I am getting a message that states: incorrect type: expected “array”.

How do I get around this message as I have copied and pasted the original section from this thread and just changed the naming convention to match my sensors from tomorrow.io?

You can’t have - sensor: twice. Just make it another of the 2 sensors above it. And change value_template: to state: and icon_template: to just icon:

Ok that seemed to have cleared up some of my issues, but now it just says bad indentation of mapping entry.

- name: home_tomorrow_io_home_grass_pollen_index

and line it under the other hyphens

Thank you, that worked. Now I just need to figure out why the graphics on the card aren’t reflecting the high, medium and low marks.

Hello everyone…

I know its a somewaht aged subject but i am trying it right now and do not get anything.
I have all the sensors created without issues and they do populate in auto completion which shows they are known etc…
I copied the code for the card i to a manual card and did not get any error messages, but when i get out of edit mode, it is not even showing a placeholder…like it is not even there.
How can i troubleshoot

Thx alot

So, little update…

I have now some info but i dont get the day 1 to 4 numbers populated…i am playing with array value grabing but o far not to successful.

Not sure how to help you here. Can you paste some code? Remember indentations will kill you.

template:  
  - sensor:
      - name: cc_weather_condition_0d
        state: "{{ state_attr('weather.climacell_daily','forecast')[0].condition  }}"
      - name: cc_weather_condition_1d
        state: "{{ state_attr('weather.climacell_daily','forecast')[1].condition }}"
      - name: cc_weather_condition_2d
        state: "{{ state_attr('weather.climacell_daily','forecast')[2].condition }}"
      - name: cc_weather_condition_3d
        state: "{{ state_attr('weather.climacell_daily','forecast')[3].condition  }}"
      - name: cc_weather_condition_4d
        state: "{{ state_attr('weather.climacell_daily','forecast')[4].condition  }}"

The above works for me… have the entities and tomorrow.io working

Also try this:
Go to Developer Tools → Template

Paste this into the top (box under Template Editor)

{{ state_attr('weather.climacell_daily','forecast')[0].condition  }}

You should see the condition on the first line in the results…

Ohh, testing the strings is also a thing…good to know…

How are you using them in the card then?

Hello and good morning…

I tried as you said with my given variables and it got return value from the integration one:

{{ state_attr('weather.tomorrow_io_home_daily','forecast')[0].condition  }} 

comes back as cloudy
as the attribute of the forcast suggests.
But the “home_daily” variable is not the one i want the attributes out from.
I created my own request with way more data fields from tomorrow and that shows all fields successfully filled and reported back
i have 4 variables now

sensor.tomorrowio_day_0
sensor.tomorrowio_day_1
sensor.tomorrowio_day_2
sensor.tomorrowio_day_3

and they all have the correct day related info in them as attributes.

temperature: 21.19
temperatureApparent: 21.19
temperatureMax: 21.19
temperatureMin: 9.19
humidity: 78
windSpeed: 5.63
windGust: 8.88
pressureSurfaceLevel: 996.02
precipitationIntensity: 0
precipitationProbability: 0
precipitationType: 0
sunriseTime: 2023-06-04T09:41:00Z
sunsetTime: 2023-06-05T00:13:00Z
visibility: 16
cloudCover: 100
cloudBase: 2.18
cloudCeiling: 1.92
moonPhase: 4
weatherCode: 1000
grassIndex: 5
treeIndex: 5
weedIndex: 0
uvIndex: 7
friendly_name: Tomorrowio Day 0

when i now try versions of your

{{ state_attr('sensor.tomorrowio_day_0','forecast')[0].condition  }}

i get all sorts of errors
the array seems to have different structure
mine only has straight attributes with no forcast like the home daily
mine is build this way:

      - name: "Tomorrowio Day 3"
        value_template: "{{ value_json.data.timelines[0].intervals[3]['values']['temperature'] }}"
        json_attributes_path: "$.data.timelines[0].intervals[3].values"
        json_attributes:
          - temperature
          - temperatureApparent
          - temperatureMax

Hope that helps in any way to get me read this out

Slowly but steady eats the squirrel as we say in germany…

So i got rid of all my entries and reinstalled tomorrowio…
and realized that my sensors are disabled…no idea why…but after enabling them i got values…
Not all of them as far as i can tell on the quick, but values…
Now the {{ state_attr(‘weather.climacell_daily’,‘forecast’)[0].condition }} finally makes sense and works and i just need to get my values into my variables…
I will keep you posted…

hello,
well wanted to use this card because like the moon display and that you can add pollen and warnings etc… but as it looks like the card is broken… using last Home Assistant 2023.7.3 …
does anyone know how to fix or is there a better card with same features?
Platinum Weather is not an option… looks like also dead… translation is broken long time but nobody does update nor fix… it’s so sad to see so many abandoned projects … you can be lucky to find a working Card and Addon these day’s… wondering about and the HA community …

If your problem is the icons are only showing up on that second day then the first place I’d look is the underlying data you pointed at the icon for those days. If one works I would think all work.

I’ve been using this for some time with no change and it continues to function. I wish the developer would be available to tweak/adjust in case something broke but we get what we pay for.

I’m not worried about Home Assistant - it’s a tinkerer’s platform. There are hundreds of thousands of installations of HA and enough use the Nabu Casa to fund employees that it seems healthy. We do run the risk of non-support with the fringe/cooler things.

Hi, I have investigated, that the specific values are expected in order to display right condition icon.

I am using Card Weather Conditions only a few days, so I have found out these so far:
snow instead of ‘snowy’,
rain instead of ‘rainy’)

I solved it by replacing value given by tomorrow.io by expected in sensor definition (templates.yaml)

- sensor:
    - name: cc_weather_condition_1d
      state: >
        {% set condit_map = {'rainy': 'rain', 'snowy': 'snow'} %}
        {% set condit = state_attr('weather.tomorrow_io_domov_daily', 'forecast')[1].condition %}
        {{ condit_map.get(condit, condit) }}

or

 - name: cc_weather_condition_1d
      state: >
         {% set condit = state_attr('weather.tomorrow_io_domov_daily', 'forecast' [1].condition %}
         {% if condit == 'rainy' %}
           rain
         {% elif condit == 'snowy' %}
           snow
         {% else %}
             {{ condit }}
         {% endif %}

Well done! I rarely get snow here in TX so missed the gap the few times it might occur. Excellent work. Thanks!

hm, it looks like never ending story. Today was undefined icon for condition “sunny” :open_mouth: I have to update state with a new item in order to get icon :sunny:

{% set condit_map = {'rainy': 'rain', 'snowy': 'snow', 'sunny': 'clear'} %}

This way seems to be painful … :frowning:

Is it possible to code rain* , snow* etc to cover rain, rainy, raining?

The related code is probably on line 270

,xt={freezing_rain_heavy:"rainy-3","heavy freezing rain":"rainy-3",...

I guess that code could be modified by adding missing weather conditions - something like

,xt={rain:"rainy-1","rainy":"rainy-1",...

Hello,
I have just started using the tomorrow.io integration and all works fine. I see in your list of attributes that you have the ‘weathercode’ which is missing in my list of entities.
The weather code would be really useful so that I could determine which condition icon to display or is there an easier method?

thanks and regards