Platinum Weather Card support

Holy crap this is fantastic, thank you!

The only things I can’t get to work are the nws_daytime_low and nws_daytime_high values. The _low shows up as the same temp as the high in sensor.summary_0, and the _high shows up as NaN. Any advise?

1 Like

Oops. Forgot to mention…

I use the Daily Sensor found on HACS.

I create a daily maximum temperature, sensor.maxtempdaily based on sensor.nws_temperature:

The low temperature should be populated with nws_daytime_low.

What results is the highest temperature being recorded over the day. I know it says Forecast, but for the card, I didn’t attempt to hack the heading. The low is the overnight forecast as reported by the template, which can change during the day.

I do have a header “short forecast” for the area above the detailed forecast, but it requires downloading the NWS integration and modifying two files. A formal PR was submitted to include it with the integration, but it wasn’t accepted.

2 Likes

The only way I can think of is to understand how the weatherundergound integration orders the information over time, and then make templates to populate the card as you like.

Good idea!

I actually found a feature that the developer of the integration I’m using added that uses the low for the calendar day rather than the 7am-7am time window that I think Weather underground uses by default. It’s an undocumented part of their API, but so far it seems to be working.

1 Like

Hey! Love this weather card above all the others.

Has anyone worked out if it’s possible to overried the animation lengths for the animated icons? Or is it a case of editing the css of the icons themselves individually…?

very interested in your ‘shore forecast’… whats your github?

I recently attempted to apply the short forecast to the most recent version of the NWS integration. Unfortunately, it didn’t work. It resulted in an error, and I have yet to figure out how to mitigate it. If I can get it to work, I’ll report back.

Any update on tap_action support? I’d like tapping on this app to open the detailed weather service so I can also see the hourly forecast. Even better if the hourly forecast could be shown in this card. Otherwise an absolutely lovely card, thanks for the work on this! (Using this with Tomorrow.io)

Any ideas if we can assign an icon to a descriptor? mostly_sunny has nothing assigned to it and appears as a blank box…

did you ever figure this out? i am in the same boat and would like to introduce an if-statement inside the card for an attribute.

The card does not support jinja or JavaScript templates.

Actually not, but it seems tom_I has just answered the question.

Understood!

Hi, was there an answer to this?

Have freshly installed the card but am getting the same errors as tsCARLsanity

Hi, You must define these sensors like this and specify the first occurrence in the card.

template:
  - sensor:
  
# Conditions
  
    - name: 'def_previsions_condition_j0'
      unique_id: 'def_previsions_ondition_j0'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[0].condition }}"
      
    - name: 'def_previsions_condition_j1'
      unique_id: 'def_previsions_condition_j1'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[1].condition }}"
  
    - name: 'def_previsions_condition_j2'
      unique_id: 'def_previsions_condition_j2'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[2].condition }}"
  
    - name: 'def_previsions_condition_j3'
      unique_id: 'def_previsions_condition_j3'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[3].condition }}"
  
    - name: 'def_previsions_condition_j4'
      unique_id: 'def_previsions_condition_j4'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[4].condition }}"

    - name: 'def_previsions_condition_j5'
      unique_id: 'def_previsions_condition_j5'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[5].condition }}"

 entity_forecast_icon_1: sensor.def_previsions_condition_j1
 entity_forecast_max: sensor.minmax_temperature_max_jour
 entity_forecast_max_1: sensor.def_previsions_temperature_j1
 entity_forecast_min: sensor.minmax_temperature_min_jour
 entity_forecast_min_1: sensor.def_previsions_templow_j1
 entity_humidity: sensor.tempest_st_00032986_humidity
 entity_pop: sensor.shawinigan_probabilite_d_averses
 entity_pop_1: sensor.def_previsions_precipitation_probability_j1

Thanks for this.

Do I do this with the template editor?

I use the File Editor add-on. You can add the definition in configuration.yaml


The template editor is only for testing templates. Not for defining configuration.

Hi, thanks for this I’m still struggling so I hope I can prevail on you again.

I have put the code you detailed into my ‘configuration.yaml’ file ( although I notice that your screen shot shows ‘packahes/previsions.yaml’ which I don’t have configured).

When I put any of the other rows into the card config I get the ‘not found’ message.

Yes, I use the packages instead of putting all the code in the configuration.yaml file. This is in order to group the definitions of sensors by types. It is not necessary to define the package directory. If you define the sensors in the configuration.yaml file, it will work too. Here is an example of the definition of all the sensors used in the card. Example also to use packages.

template:
  - sensor:
  
# Conditions
  
    - name: 'def_previsions_condition_j0'
      unique_id: 'def_previsions_ondition_j0'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[0].condition }}"
      
    - name: 'def_previsions_condition_j1'
      unique_id: 'def_previsions_condition_j1'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[1].condition }}"
  
    - name: 'def_previsions_condition_j2'
      unique_id: 'def_previsions_condition_j2'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[2].condition }}"
  
    - name: 'def_previsions_condition_j3'
      unique_id: 'def_previsions_condition_j3'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[3].condition }}"
  
    - name: 'def_previsions_condition_j4'
      unique_id: 'def_previsions_condition_j4'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[4].condition }}"

    - name: 'def_previsions_condition_j5'
      unique_id: 'def_previsions_condition_j5'
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[5].condition }}"
  
# Temperature
  
    - name: 'def_previsions_temperature_j0'
      unique_id: 'def_previsions_temperature_j0'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[0].temperature }}"
      
    - name: 'def_previsions_temperature_j1'
      unique_id: 'def_previsions_temperature_j1'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[1].temperature }}"
  
    - name: 'def_previsions_temperature_j2'
      unique_id: 'def_previsions_temperature_j2'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[2].temperature }}"
  
    - name: 'def_previsions_temperature_j3'
      unique_id: 'def_previsions_temperature_j3'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[3].temperature }}"
  
    - name: 'def_previsions_temperature_j4'
      unique_id: 'def_previsions_temperature_j4'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[4].temperature }}"

    - name: 'def_previsions_temperature_j5'
      unique_id: 'def_previsions_temperature_j5'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[5].temperature }}"
      
# Basse température      

    - name: 'def_previsions_templow_j0'
      unique_id: 'def_previsions_templow_j0'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[0].templow }}"
      
    - name: 'def_previsions_templow_j1'
      unique_id: 'def_previsions_templow_j1'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[1].templow }}"
  
    - name: 'def_previsions_templow_j2'
      unique_id: 'def_previsions_templow_j2'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[2].templow }}"
  
    - name: 'def_previsions_templow_j3'
      unique_id: 'def_previsions_templow_j3'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[3].templow }}"
  
    - name: 'def_previsions_templow_j4'
      unique_id: 'def_previsions_templow_j4'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[4].templow }}"

    - name: 'def_previsions_templow_j5'
      unique_id: 'def_previsions_templow_j5'
      unit_of_measurement: "°C"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[5].templow }}"
      
# precipitation probability      

    - name: 'def_previsions_precipitation_probability_j0'
      unique_id: 'def_previsions_precipitation_probability_j0'
      unit_of_measurement: "%"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[0].precipitation_probability }}"
      
    - name: 'def_previsions_precipitation_probability_j1'
      unique_id: 'def_previsions_precipitation_probability_j1'
      unit_of_measurement: "%"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[1].precipitation_probability }}"
  
    - name: 'def_previsions_precipitation_probability_j2'
      unique_id: 'def_previsions_precipitation_probability_j2'
      unit_of_measurement: "%"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[2].precipitation_probability }}"
  
    - name: 'def_previsions_precipitation_probability_j3'
      unique_id: 'def_previsions_precipitation_probability_j3'
      unit_of_measurement: "%"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[3].precipitation_probability }}"
  
    - name: 'def_previsions_precipitation_probability_j4'
      unique_id: 'def_previsions_precipitation_probability_j4'
      unit_of_measurement: "%"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[4].precipitation_probability }}"

    - name: 'def_previsions_precipitation_probability_j5'
      unique_id: 'def_previsions_precipitation_probability_j5'
      unit_of_measurement: "%"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[5].precipitation_probability }}"
      
# Precipitation

    - name: 'def_previsions_precipitation_j0'
      unique_id: 'def_previsions_precipitation_j0'
      unit_of_measurement: "mm"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[0].precipitation }}"
      
    - name: 'def_previsions_precipitation_j1'
      unique_id: 'def_previsions_precipitation_j1'
      unit_of_measurement: "mm"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[1].precipitation }}"
  
    - name: 'def_previsions_precipitation_j2'
      unique_id: 'def_previsions_precipitation_j2'
      unit_of_measurement: "mm"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[2].precipitation }}"
  
    - name: 'def_previsions_precipitation_j3'
      unique_id: 'def_previsions_precipitation_j3'
      unit_of_measurement: "mm"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[3].precipitation }}"
  
    - name: 'def_previsions_precipitation_j4'
      unique_id: 'def_previsions_precipitation_j4'
      unit_of_measurement: "mm"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[4].precipitation }}"

    - name: 'def_previsions_precipitation_j5'
      unique_id: 'def_previsions_precipitation_j5'
      unit_of_measurement: "mm"
      state: "{{ state_attr('sensor.previsions_meteorologiques_journaliere', 'forecast')[5].precipitation_probability }}"