Lovelace UI Weather Forecast

Yeah you’re right I don’t have any mention of it I run it just off broadlink IR and as its either bloody hot or mildly cool here I just turn aircon on when its hot, on full boar with alexa I don’t use the temperature for controlling its operation as its pretty expensive to run so I wait till mid summer to run it.

You can find my air conditioner config in the packages/climate_control.yaml

If you would like to set lovelace as your default it can be done.
[https://gist.github.com/ciotlosm/9508388876edf92c4c1f3579e740fbd5]

However i am currently running normal view via computer/tablet and accessing just lovelace via Phone (mostly using new glances cards)

1 Like

How can I change language of weather information?

Is anyone using a weather service for this besides Yahoo weather? I’m using ecobee currently but I don’t get the forecast icons. I’d like to use weather underground but it doesn’t show as a “weather” domain, just individual sensors.

@brad999 Instead of using the sensor component you need to have it added under the weather component

Thanks for the link. The problem is that WeatherUnderground isn’t a weather component, only sensors. Although I wish it was so I didn’t have to add another component and API key.

I’m currently using the ecobee weather platform for this but it doesn’t display icons. Was checking to see what other people were using that worked with icons.

Weather Underground seems to have died for me altogether; they stopped handing out free API keys a while back, and as far as I can tell it’s dead now. I’ve switched over to Dark Sky…actually I like it better.

Question: If I use the weather component, can I still break out current conditions as sensors? I love the wx card up there, but I also use the current temperature from Dark Sky as an input for my HVAC automation script. I’d really like to be able to use both if possible.

I have updated my config/repo for climate control :wink:

Darksky will work with icons

You definitely can, you need to mae sure you have all the sensors you would like to use under the dark sky weather component as monitored conditions.

sensor:

# Dark Sky Weather
  - platform: darksky
    api_key: !secret darksky_api
    update_interval: '00:05:00'
    name: Weather
    monitored_conditions:
      - summary
#      - icon
#      - nearest_storm_distance
#      - nearest_storm_bearing
#      - precip_type
      - precip_intensity
#      - precip_probability
      - temperature
#      - apparent_temperature
#      - dew_point
#      - wind_speed
#      - wind_bearing
#      - cloud_cover
      - humidity
#      - pressure
      - visibility
#      - ozone
#      - minutely_summary
      - hourly_summary
      - daily_summary
      - temperature_max
      - temperature_min
#      - apparent_temperature_max
#      - apparent_temperature_min
#      - precip_intensity_max 

then you can use those sensor states in other places by using

- sensor.weather_temperature

so replace your WU input state with the above and you should be good to go with your automation.

Hi, I set darksky as WEATHER-FORECAST component, but the GUI show me every hour… How I change it to daily forecast?

Thanks!
image

4 Likes

Hi

I’m only new to Hassbian and I wanted to do a weather forecast section, but when I searched for that, I found Weather forecast card - Home Assistant

Unfortunately, for newbies like me, I found the documentation to be “lacking”.

For example, to simply say:

(string)(Required)The entity_id of the weather platform to use.

and show the example of:

entity: weather.demo_weather_north

didn’t really mean much to me since I’m a newbie.

Where do we find these “weather” platforms? I noticed in this thread, radinsky uses weather.yweather. Is this the only one? (edit: I found this page which has links to other weather services like BOM. I’ll need to read this further.)

I’m feeling lost when it comes to doing things in HA when you get pages like the weather forecast page linked above that seem to assume you know things such as weather platforms etc. I actually got to this forum page “accidentally” as I searched Google for the term “weather platform lovelace home assistant” to learn what weather platforms were available.

I have:

# Weather YWeather
sensor:
  - platform: yweather
    monitored_conditions:
      - weather
      - weather_current
      - temp_min
      - temp_max
      - wind_speed
      - pressure
      - visibility
      - humidity
      - temperature

in my configuration.yaml file that gives me icons at the top of the page, but to get the card in lovelace, radinsky says to have:

# Weather YWeather
weather:
  - platform: yweather

in the configuration.yaml file. Without it at the moment I’m getting an error in the lovelace interface.

Do I combine them to look like:

# Weather YWeather
sensor:
  - platform: yweather
    monitored_conditions:
      - weather
      - weather_current
      - temp_min
      - temp_max
      - wind_speed
      - pressure
      - visibility
      - humidity
      - temperature
weather:
  - platform: yweather

Thanks in advance.

I’m in the same boat as MadMax1412. I’ve been shamelessly copying YAML from various different repositories to develop my frontend. However I have run into difficulties in getting the “Weather Forecast” card to display.

In Configuration.yaml I have the following

  - platform: yweather
    name: yweather
    woeid: !secret woeid

# The code below is copied from the Arsaboo configuration - see Weather.yaml in the 
# packages folder

  - platform: darksky
    api_key: !secret darksky
    forecast:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
    monitored_conditions:
      - summary
      - precip_probability
      - wind_speed
      - cloud_cover
      - icon
      - temperature_low
      - temperature_high
      - daily_summary
      - hourly_summary
      # - Added for weather card
      - humidity
      - temperature
      - wind_bearing
      - pressure
      - visibility
    update_interval:
      minutes: 5
  - platform: season
  - platform: template
    sensors:
      forecast_0:
        friendly_name: "Today"
        value_template: >
          {{states.sensor.dark_sky_daytime_high_temperature.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon.state ~ '.png'}}

      forecast_1:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (1 * 86400 ) -%}
          {{ date | timestamp_custom("Tomorrow (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
          {{states.sensor.dark_sky_daytime_high_temperature_1.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_1.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_1.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_1.state ~ '.png'}}

      forecast_2:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (2 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
          {{states.sensor.dark_sky_daytime_high_temperature_2.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_2.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_2.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_2.state ~ '.png'}}

      forecast_3:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (3 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
          {{states.sensor.dark_sky_daytime_high_temperature_3.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_3.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_3.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_3.state ~ '.png'}}

      forecast_4:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (4 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
          {{states.sensor.dark_sky_daytime_high_temperature_4.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_4.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_4.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_4.state ~ '.png'}}

      forecast_5:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (5 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
          {{states.sensor.dark_sky_daytime_high_temperature_5.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_5.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_5.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_5.state ~ '.png'}}

      forecast_6:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (6 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
            {{states.sensor.dark_sky_daytime_high_temperature_6.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_6.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_6.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_6.state ~ '.png'}}

      forecast_7:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (7 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%m/%d)") | replace("(0", "(") | replace("/0", "/") }}
        value_template: >
            {{states.sensor.dark_sky_daytime_high_temperature_7.state|round(0)}}°/{{states.sensor.dark_sky_overnight_low_temperature_7.state|round(0)}}°/{{states.sensor.dark_sky_precip_probability_7.state|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon_7.state ~ '.png'}}

In UI-Lovelace I then have:

  • icon: mdi:weather-cloudy
    id: weather
    title: Weather
    cards:

    • type: entities
      title: Weather
      entities:
      • sensor.dark_sky_temperature
      • sensor.dark_sky_daytime_high_temperature
      • sensor.dark_sky_overnight_low_temperature
      • sensor.dark_sky_wind_speed
      • sensor.dark_sky_cloud_coverage
      • sensor.pollen_level
      • sensor.cold_flu_risk
      • sensor.dark_sky_hourly_summary
      • sensor.dark_sky_daily_summary
  • type: entities
    title: Weather Forecast
    entities:

    • sensor.forecast_0
    • sensor.forecast_1
    • sensor.forecast_2
    • sensor.forecast_3
    • sensor.forecast_4
    • sensor.forecast_5
    • sensor.forecast_6
    • sensor.forecast_7
  • type: weather-forecast
    entity: weather.yweather

The weather and weather forecast cards display correctly however the final Weather-Forecast card results in an error:

“No state available for weather.yweather”

Can anyone advise what I am doing wrong and how to fix it?

you are mixing up yweather and darksky as far as I can see?

Hi,

Did you manage to fix this?

Nop, never found the solution, hope someone could help us

Same problem here. Did you ever figure this out?

Did you manage to fix this?

Hi everyone. I have problems with dark sky. all of a sudden it stopped working and gives me this error:

[homeassistant.components.sensor.darksky] Unable to connect to Dark Sky: HTTPSConnectionPool(host=‘api.darksky.net’, port=443): Max retries exceeded with url: /forecast/xxxxxxxxxxxxxxxxxxxx/44.xxxxxx,8.xxxxxx?units=si&lang=it (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x72ba6ab0>: Failed to establish a new connection: [Errno -3] Try again’,))

Seems like this link should do it for you:

from what I can get out of it you would do something like
weather:

  • platform: darksky
    api_key: YOUR_API_KEY
    mode: daily