Platinum Weather Card support

Hi All!

I’m trying to make platinum weather card more dynamic.
I would like to give parameters depend on a status of a sensor.

For example:

- type: custom:platinum-weather-card
  card_config_version: 8
  daily_extended_forecast_days: 3
  daily_forecast_days: >
               [[[
                   if states["sensor.xcvxs"].state=="something" return 3;
                   else return 5;
               ]]]
  daily_forecast_layout: horizontal

It doesn’t work. Maybe it should.

Is there any idea how I can do this if it is possible?

Just started playing with this card, and I’m so pleasantly surprised with it :slight_smile: . Thanks!

There is one item that took me a while to figure out so thought I would share my results.
It has to do with the daily forecast showing a text string at the bottom for each day.

My weather entity (WRAL is my weather provider/integration) provides a detailed textual description of the forecast for each day. According to the documentation for the platinum weather card, when the forecast are configured for vertical layout (daily_forecast_layout: vertical), one can configure an entity that provides this detailed forecast description.

The documentation calls the configuration for the daily detailed description: “Entity Extended Forecast 1”. I found the yaml for this to be: entity_extended_1. The documentation further states that for extended forecasts and fire danger as they aren’t included in weather integrations) in which case it will use the data from the attributes, or you can use individual sensors and provide the name of the sensor for tomorrow (these sensors must have an incrementing number in their name).

I couldn’t find a way to get this to work using my weather entity’s attribute. This attribute has a layout of states.weather.wral_weather.attributes.forecast[N]['detailed_description'] where N is the day’s forecast starting at 0 (current day). However I was able to create individual template sensors to get this to work.

Notice from the documentation the wording “incrementing number in their name”.
So I made up N number of template entities with the name: sensor.wral_forecast_detailsN, where N=1 for the current day, and N=2, 3, 4, etc. for the next consecutive days. Since “state” data has a limited number of characters, I wanted the textual detailed description to be an attribute of the template sensor since attributes don’t have such restrictions and the name I gave this attribute is called text. The state of this sensor isn’t so important, but I made it to be the forecasted condition for that same day. The platinum weather card’s yaml config for this attribute uses: daily_extended_use_attr and daily_extended_name_attr

So the configuration I used for the platinum weather card to pick up the daily detailed description uses these N sensors looks something like:

daily_forecast_layout: vertical
....
daily_extended_forecast_days: 6
entity_extended: sensor.wral_forecast_details1  #the current day for use in the extended section
entity_extended_1: sensor.wral_forecast_details2 #starting tomorrow for use in the daily section
daily_extended_use_attr: true
daily_extended_name_attr: text

This is now what I have

Is it possible to increase the fontsize for the time entity? If so, how?

Use card-mod

I like what you did here… I’m trying to space out the forecast section vertically, to fill the space left on my wall display after my old weather integration went the way of the dodo… here’s what it looks like now:

On the left is a Platinum Weather card with Overview and Slots sections only. On the right is a Platinum Weather card with the Daily Forecast section only. I’d like the daily forecast info to better fill the vertical space in that right card. I’m using card-mod, and I’ve found that this doesn’t do anything for me:

card_mod:
  style: |
    .forecast-section {
      margin-top: -25px;
      padding-left: 25px;
    }

Any ideas on what might work?

EDIT: Also, before it comes up… we’re not getting 3+ feet of snow tomorrow. I don’t know what’s going on with Pirate Weather. We might get a foot…

I always feel like CSS changes with card-mod require a goat sacrifice and a contract with a demon to get working right, and you really have to know how the card is structured in terms of the CSS elements. So unfortunately, I’m not sure how you might do something like space the lines out a bit more.

Is it possible to modify the time and date text? I want to remove the year from the date and the card won’t work with my custom time sensor since it isn’t RFC339 compliant.

I wanted to ask if there was a way to have the daily min/max temperatures show in reverse order. In other words when in horizontal mode instead of min/max have it show max/min; and when in vertical mode show Max temp above Min temp (instead of Min temp above Max temp)

The reason for this is that my weather provider defines a day’s min temperature as the upcoming overnight (roughly from 18:00 to 6:00) low temp.

I’m just lost here.
My card still displays nothing, as no integration is set:
immagine

But my OpenWeatherMap integration is set correctly:

What am I missing, or what am I doing wrong??

Thanks for helping me getting out of this! :slight_smile:

If you would if you post your card configuration (either screen shots or the YAML), that would help us help you. Otherwise we’re just guessing here.

This is my yaml:

card_config_version: 8
option_show_overview_decimals: false
option_show_overview_separator: false
option_static_icons: false
overview_layout: complete
section_order:
  - overview
  - extended
  - slots
  - daily_forecast
show_section_overview: true
type: custom:platinum-weather-card

This is the actual screenshot:

Thanks!

Now fill out the rest of the config. The parts that match your forecast sensors to the card “slots”.

Okay, I thought it gathered automatically data from the integration.
What is the best integration to be used to fill all entities for this card? OpenWeatherMap is not complete to me…

The BoM weather integration but that only works in Australia.

I just updated to this card recently and I’m happy with it. I was using a hacked version of the old DarkSky version, and since that repo is no longer active, I couldn’t get it updated.

The reason I hacked it originally, is because while I’m in the US, my wife is from Asia and she prefers her temperature readings to be in Celsius instead of Farenheit. So, I have two of these cards on my main dashboard, one that uses the normal sensors and one that uses sensors I created that convert to Celsius. That all works fine, except the unit_of_measure always shows “F” instead of “C”. The hack I made to the previous card was for it to recognize a “unit_of_measure” property and use that for any temperature readings.

I may have submitted a pull request to the author of my old card, but I don’t remember now since it’s been years ago. Is it possible to add this as a feature request for this card? Should I create a feature request issue in github?

Hello!
Please help.
I have ONYX e-ink reader as screen. I need big icons and text and only black and white colors.
3 days I try to change text weight and color in slot-section.
Now I have:

   style: |
      .slot-section {
      font-weight: 800 !important;          <-------- no work
      font-size: 28px;
      margin-top: -10px;
      font-color: black;        <-------- no work
      padding-left: 15px;
      color: black;               <-------- no work
      }

I try to see, why it no work in Google by CTRL-U.
And finded in body section “font-weight: 400”

How I can make priority settings?
And how can I increase the space between the lines in this section?

Looks like Dark Sky has finally gone offline. And with it, my platinum weather card did too. Just completely disappeared. I was still using dark sky sensors for the following

        entity_extended: sensor.dark_sky_hourly_summary
        entity_forecast_icon: sensor.dark_sky_icon
        entity_extended: sensor.dark_sky_hourly_summary
        entity_forecast_icon: sensor.dark_sky_icon
        entity_wind_gust: sensor.dark_sky_wind_gust
        entity_todays_uv_forecast: sensor.dark_sky_daily_summary

I’ve tried just removing them and also replacing them with the weather entity from my weatherflow integration but I can’t get the card to reappear. Has anyone found suitable sensors which the card will accept?

The card will accept any sensors as long as the values are valid. It doesn’t care where they come from.

I ended up starting again from zero and adding just one sensor at a time and got it working again. Thanks for answering.

FYI, Dark Sky is working again. Who knows for how long…