Custom animated weather card for Lovelace

I am using Weather Card from HACS:
image

and the code in the card is as follows:

type: 'custom:weather-card'
entity: weather.openweathermap
entity_temperature: sensor.solar_weather_temp
number_of_forecasts: '6'
hourly_forecast: false
forecast: true
details: true

However, nothing changes.

I dont think that is th card referenced in this thread but it uses th weather nitty so you ar out of luck with that. Th rar other water cards you can us that will do this for you.

Iā€™m also a bit lost here with OpenWeatherMap. This is my config:

type: 'custom:weather-card'
number_of_forecasts: '5'
hourly_forecast: false
details: true
forecast: true
entity: weather.openweathermap
current: true

and this is the card:

image

It shows TUE for all days even though the data seems to differ from day to day.

Edit: stupid me, I had the OpenWeatherMap integration configured wrong with an hourly call instead of a daily. After I changed that, it started working.

I assume this is related to OpenWeatherMap rather than custom weather card, but Iā€™d like to see the ability to round/truncate valuesā€¦ I really donā€™t need to know barometric pressure down to the quadrillionth digit:

type: 'custom:weather-card'
entity: weather.openweathermap
name: ' '
1 Like

Is there a way I can add the wind forecast as a new row at the bottom, below precipitation forecast? Thanks.

1 Like

Yes, I have the same issue with Barometric Pressure.

2021-06-08 15_03_33-865186180 - AnyDesk

.

I have been using this weather card for some time and really like it. However, I have an issue where the main weather icon does not show up when the weather is reported as ā€œexceptionalā€. I have tried most weather APIā€™s to get this behavior to stop but it still happens. It also happened on the builtin Lovelace weather card for forecasts.

Any ideas on how to manage this so I get an appropriate icon?

card data

immagine
I want to eliminate low temperature and precipitation, but I canā€™t.

type: custom:weather-card
entity: weather.casa
number_of_forecasts: '5'
forecast: 
  card_mod:
    style:
      div.lowTemp {display: none;}
      div.precipitation_probability {display: none;}
      div.precipitation {display: none;}
details: true
hourly_forecast: false
current: true

can you give me the complete code of the card with div.lowTemp working?

Hello,

I have using this card already for a long time. very nice card. Now i have a small tablet which i would like to put on the wall. But the title (name) of the weather card is not scaling the same way as the other parts of the card. see picture below. Is there a way to fix this?

I thought I would ask if anyone knows if this card will be affected by the upcoming removal of paper elements?

I just installed the custom weather card via HACS but it doesnā€™t show up. Instead I am getting this error message:

Logger: frontend.js.latest.202203010
Source: components/system_log/__init__.py:190
First occurred: 10:38:49 (1 occurrences)
Last logged: 10:38:49

https://xyz.de/hacsfiles/weather-card/weather-card.js?hacstag=192732636147:353:12 TypeError: css is not a function

I am using the latest version of hassos and the latest version of the custom weather card.

Iā€™m getting the same error message: TypeError: css is not a function

Also using the latest version of HassOS and v1.4.6 of weather-card

Anyone have a problem using this card with @briis WeatherBit? The forecast days are starting with yesterday. Today is Monday but the forecast is showing the first day as Sunday. Forecast datetime 1 seems right, datetime: ā€˜2022-03-28T00:00:00+00:00ā€™ but display is not.

There is already a bug report on this here. I will look at it as soon as I can.
Can you tell me the Timezone you are in?

Thank you for quickly responding, Denver, USA

1 Like

Is it possible to get a tap_action in the card?

1 Like

Iā€™m using this card but on my iphone the icons are not loaded the first time.
On a pc or my ipad i do not have this problem, does somebody know how to solve this?

if i remove the cache then it works 1 time.

Edit: I thought I do a redownload within hacs but now the component canā€™t be found. I already did browser cache cleanup.
Removed it completely and installed it again but donā€™t get it working any more.
Itā€™s available within the resources.

Looking at the git repo, I found a fix, but you have to edit weather-card.js in /config/www/community/weather-card for this.
The first line should be changed from

const LitElement = Object.getPrototypeOf(customElements.get("hui-view"));

to

const LitElement = customElements.get("ha-panel-lovelace") ? Object.getPrototypeOf(customElements.get("ha-panel-lovelace")) : Object.getPrototypeOf(customElements.get("hc-lovelace"));

Next, remove the weather.js.gz file, restart core, force-refresh your browser (not sure if this is all neede, quite new @ hass) and the card works!
:crossed_fingers: hoping for a new release soonā€¦

Same goes for weather-card-editor.js, line 21.

1 Like

Fixed it for me! Is there a good primer on the JavaScript objects and the LitElement and how itā€™s best used?

Took quite a bit of playing, but this is eventually what worked for me to hide some of the forecast details. After getting the precipitation and probability display to disappear, I tested lowTemp removal, which worked, but I wanted to keep that displayed. I also added some more mods: no background color, tweak current icon and temp size and placement plus top padding.

type: custom:weather-card
entity: weather.climacell_daily
number_of_forecasts: '7'
details: false
hourly_forecast: false
forecast: true
card_mod:
  style: |
    ha-card .forecast
      div.precipitation_probability {display: none;}
      div.precipitation {display: none;}
    ha-card {
      background: none;
    }
    ha-card div.current span.icon.bigger {
      width: 12em;
      height: 12em;
      margin-top: -4.6em;
    }
    ha-card div.current span.temp {
      font-size: 2.9em;
      right: 1.25em;
      top:0.8em;
    }
    ha-card div.forecast.clear.spacer {
      padding-top: 0.4px;
    }
1 Like