7 Day Weather Forecast

Nope, the friendly name template takes care of that now. You can remove the python script.

1 Like

Ok I re-copied the section with with packages. I now get the card and the data. The only thing I am missing is the icons to the left. It seems to restart HA slowly looking for these. Under /config/icons/dark_sky/ i have the png files…but I don’t think i have the correct PNG files. But one step closer to having this working completely.
image

The icons should be under /config/www/icons/dark_sky

1 Like

That was it. It is working perfectly now. hanks for all of your help and patience with me trying to figure everything out.

For anyone looking for updated code that uses the mdi icons, see below. I would edit the OP, but apparently you can’t after a certain amount of time.

2 Likes

Trying the latest code from DetroitEE and for some reason, I am getting this error message.

I have tried several editors (Atom, Brackets, Komodo) from my Mac and can’t get past this hurdle.

Invalid config for [sensor.darksky]: value is not allowed @ data[‘monitored_conditions’][2]. Got ‘temperature_low’
value is not allowed @ data[‘monitored_conditions’][3]. Got ‘temperature_high’. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.darksky/

What version are you running?

Based on that error, I’m guessing you are not on 0.70? The monitored conditions temperature max/min were changed to high/low, and I believe the component was updated in 0.70.

I am using the version posted 2 posts up from this one.
I am on Home Assistant 69.1 from the official Docker release.
I have tried the packages/weather.yaml and also splitting it up, in sensor: and groups:
I have also tried indenting the monitored_conditions by 2 spaces as it was done by someone else in his example … and “no go”. I am a lille surprised as everything seems to be pretty much straight forward. I’ve also tried to copy from the “raw” format from github, still no luck.

Any ideas? I don’t think that it’s the code, seems like something else, but my setup is pretty light as I am in the process of building a new machine.

Either update to 0.70 or change the monitored conditions to temperature_min and temperature_max. I think they also changed the sensors names to “daytime_high” and “overnight_low” from “daily_high” and “daily_low”, so you may need to change back to the “daily” ones if you’re going to stay on 0.69 for now.

Please try one of these out and let us know if you get it working.

OK, great … sure will later this evening. Thanks for your suggestion and starting this thread!

1 Like

@DetroitEE - Got it to work with just doing the upgrade to 70.1. Don’t know how I missed that this was the required version of HA, but I appreciate you pointing it out for me. Really like the look of these cards with the mdi icons! Thanks again.

1 Like

@DetroitEE, @arsaboo, and others: Appreciate the help and guidance you have provided in this thread. I am somewhat new to Home Assistant (Hassbian) and have learned immensely by your examples and ideas.
Thank you!

1 Like

Thanks for the package. I came across is and it was what I was looking for. I did put in 1 tweak that added some headings. Being new to HA this may not be the best way but wanted to share. This is a section with surrounding lines for context.

      heading:
        friendly_name: "Day"
        value_template: >
          High/Low/Precip
      forecast_0:
        friendly_name: "Today"
        value_template: >

Then at the bottom in the group definition

  weather_card_forecast:
    name: Forecast
    view: no
    icon: mdi:sun
    entities:
      - sensor.heading
      - sensor.forecast_0
      - sensor.forecast_1
      - sensor.forecast_2
      - sensor.forecast_3
      - sensor.forecast_4
      - sensor.forecast_5
      - sensor.forecast_6
      - sensor.forecast_7

Thought just thought it removed questions about what the values are.

Thanks,
Doug

1 Like

Hi there,

has someone an idea how to make the summary icons at the top the same color as the others?

Huge thanks to everyone that contributed to this. I started with @arsaboo’s weather.yaml linked in post# 298 of this thread, and I made some changes/additions and I thought I’d share in case anyone is interested.

I have an overview group on my home page (default view), and on my Weather tab I have a Details group and the Forecast group. I added the weekly summary to the top of the forecast; the wind bearing is converted to letter abbreviations; and the wind bearing arrow in the Details group points in the correct direction. It looks like this - Weather overview on home page:

Weather%20Overview

Weather tab:

More information about how this works:

I added a few things to monitored conditions:

    monitored_conditions:
      - summary
      - precip_probability
      - wind_speed
      - wind_bearing
      - humidity
      - cloud_cover
      - icon
      - temperature_low
      - temperature_high
      - daily_summary
      - hourly_summary
      - temperature
      - apparent_temperature
      - minutely_summary
      - precip_intensity_max

Next I added 5 additional template sensors. I’ve converted the Dark Sky wind bearing in degrees to N, NNW, NW, etc., and I’ve created an arrow graphic that points in the correct direction which is used for the Wind Bearing icon. There is a wind sensor in the overview group that rounds the wind speed and puts the wind bearing together with it on the same line for compactness. Here are the additional template sensors:

  weather_now:
    friendly_name: "Currently"
    value_template: >
      {{states.sensor.dark_sky_summary.state}}
    entity_picture_template: >-
      {{ '/local/icons/dark_sky/' ~ states.sensor.dark_sky_icon.state ~ '.png'}}
      
  weather_week_text:  
    friendly_name: "Week"
    value_template: >
      {{states.sensor.dark_sky_daily_summary.state}}
      
  wind_bearing_text:
    value_template: >-
      {% if 11.25 <= states('sensor.dark_sky_wind_bearing')|float < 33.75 %}
         NNE 
      {% elif 33.75 <= states('sensor.dark_sky_wind_bearing')|float < 56.25 %}
         NE
      {% elif 56.25 <= states('sensor.dark_sky_wind_bearing')|float < 78.75 %}
         ENE
      {% elif 78.75 <= states('sensor.dark_sky_wind_bearing')|float < 101.25 %}
         E
      {% elif 101.25 <= states('sensor.dark_sky_wind_bearing')|float < 123.75 %}
         ESE
      {% elif 123.75 <= states('sensor.dark_sky_wind_bearing')|float < 146.25 %}
         SE
      {% elif 146.25 <= states('sensor.dark_sky_wind_bearing')|float < 168.75 %}
         SSE
      {% elif 168.75 <= states('sensor.dark_sky_wind_bearing')|float < 191.25 %}
         S
      {% elif 191.25 <= states('sensor.dark_sky_wind_bearing')|float < 213.75 %}
         SSW
      {% elif 213.75 <= states('sensor.dark_sky_wind_bearing')|float < 236.25 %}
         SW
      {% elif 236.25 <= states('sensor.dark_sky_wind_bearing')|float < 258.75 %}
         WSW
      {% elif 258.75 <= states('sensor.dark_sky_wind_bearing')|float < 281.25 %}
         W
      {% elif 281.25 <= states('sensor.dark_sky_wind_bearing')|float < 303.75 %}
         WNW
      {% elif 303.75 <= states('sensor.dark_sky_wind_bearing')|float < 326.25 %}
         NW
      {% elif 326.25 <= states('sensor.dark_sky_wind_bearing')|float < 348.75 %}
         NNW
      {% else %}
         N 
      {% endif %}
      
  wind_bearing:
    friendly_name: "Wind Bearing"
    value_template: "{{ states.sensor.dark_sky_wind_bearing.state }}° / {{ states.sensor.wind_bearing_text.state }}"
    entity_picture_template: >
      {% if is_state('sensor.wind_bearing_text', 'NNE') %}
        /local/compass_points/fromNNE.png
      {% elif is_state('sensor.wind_bearing_text', 'NE') %}
        /local/compass_points/fromNE.png
      {% elif is_state('sensor.wind_bearing_text', 'ENE') %}
        /local/compass_points/fromENE.png
      {% elif is_state('sensor.wind_bearing_text', 'E') %}
        /local/compass_points/fromE.png
      {% elif is_state('sensor.wind_bearing_text', 'ESE') %}
        /local/compass_points/fromESE.png
      {% elif is_state('sensor.wind_bearing_text', 'SE') %}
        /local/compass_points/fromSE.png
      {% elif is_state('sensor.wind_bearing_text', 'SSE') %}
        /local/compass_points/fromSSE.png
      {% elif is_state('sensor.wind_bearing_text', 'S') %}
        /local/compass_points/fromS.png
      {% elif is_state('sensor.wind_bearing_text', 'SSW') %}
        /local/compass_points/fromSSW.png
      {% elif is_state('sensor.wind_bearing_text', 'SW') %}
        /local/compass_points/fromSW.png
      {% elif is_state('sensor.wind_bearing_text', 'WSW') %}
        /local/compass_points/fromWSW.png
      {% elif is_state('sensor.wind_bearing_text', 'W') %}
        /local/compass_points/fromW.png
      {% elif is_state('sensor.wind_bearing_text', 'WNW') %}
        /local/compass_points/fromWNW.png
      {% elif is_state('sensor.wind_bearing_text', 'NW') %}
        /local/compass_points/fromNW.png
      {% elif is_state('sensor.wind_bearing_text', 'NNW') %}
        /local/compass_points/fromNNW.png
      {% elif is_state('sensor.wind_bearing_text', 'N') %}
        /local/compass_points/fromN.png
      {% endif %}

  wind:
    friendly_name: "Wind"
    value_template: "{{ states.sensor.dark_sky_wind_speed.state|round(0) }} mph {{ states.sensor.wind_bearing_text.state }}"

I couldn’t figure out how to do the mdi icons in the template sensor without getting an error, so in my customize.yaml file I have:

sensor.dark_sky_temperature:
  friendly_name: Temperature
  
sensor.dark_sky_apparent_temperature:
  friendly_name: Apparent Temperature
  
sensor.dark_sky_humidity:
  friendly_name: Humidity
  
sensor.dark_sky_wind_speed:
  friendly_name: Wind Speed
  
sensor.dark_sky_daily_max_precip_intensity:
  friendly_name: Daily Max Precip Intensity
  icon: mdi:beaker
  
sensor.dark_sky_cloud_coverage:
  friendly_name: Cloud Coverage
  
sensor.wind:
  icon: mdi:weather-windy
  
sensor.weather_week_text:
  icon: mdi:calendar-range

And these are my groups:

group:
  weather_today:
    name: Weather
    entities:
    - sensor.weather_now
    - sensor.dark_sky_temperature
    - sensor.dark_sky_humidity
    - sensor.wind
    - sensor.forecast_0
    - sensor.forecast_1
    
  weather_details:
    name: Weather Details
    entities:
    - sensor.weather_now
    - sensor.dark_sky_temperature
    - sensor.dark_sky_apparent_temperature
    - sensor.dark_sky_humidity
    - sensor.dark_sky_cloud_coverage
    - sensor.dark_sky_wind_speed
    - sensor.wind_bearing
    - sensor.dark_sky_daily_max_precip_intensity

  weather_card_forecast:
    name: Forecast
    view: no
    icon: mdi:sun
    entities:
      - sensor.weather_week_text
      - sensor.forecast_0
      - sensor.forecast_1
      - sensor.forecast_2
      - sensor.forecast_3
      - sensor.forecast_4
      - sensor.forecast_5
      - sensor.forecast_6
      - sensor.forecast_7

I’ve learned a lot by reading other people’s posts, and much credit goes to their work which I’ve adapted to my purposes. I’m not sure I did everything in the most efficient way possible, because I’m still learning, but it works! If anyone is interested, I’m happy to post the arrow graphics. Hope someone finds this interesting/useful :slight_smile:

Edited to add: I’m using Hass.io 0.70.1.

6 Likes

For me the forecast option does not work. I get no forecast instances created. config is:

sensor:
  - platform: darksky
    api_key: somekey
    forcecast:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
    language: de
    monitored_conditions:
      - icon
      - summary
      - precip_type
      - precip_intensity
      - precip_probability
      - precip_accumulation
      - temperature
      - apparent_temperature
      - dew_point
      - wind_speed
      - wind_bearing
      - cloud_cover
      - humidity
      - pressure
      - visibility
      - ozone
      - minutely_summary
      - hourly_summary
      - daily_summary
      - temperature_high
      - temperature_low
      - apparent_temperature_high
      - apparent_temperature_low
      - precip_intensity_max
      - uv_index
    units: si
    update_internval:
      minutes: 5

Any idea?

@Anwen, Thanks for the contribution, it works well. Could you post the arrow graphics?

Anything in the error log? Try putting the language in single quotes: ‘de’

Just noticed that you have update_interval spelled wrong.

Hi, I have the same problem with tne naming of weekdays: forecast 1, forecast 2, forecast 3, etc. Still any solution?