7 Day Weather Forecast

Use Notepad ++, it’s much much easier than using textpad/notepad. I don’t know if that will solve your problem or not, but regardless…download Notepad ++.

2 Likes

Thanks, I’ll give that a try.

Something odd, 2 of the days aren’t displaying the the icons. Yesterday each day was showing properly. I tried to run the script manually however it didn’t update. Tuesday should be showing “partly-cloudy-night.png” which is the same as Wednesday. Friday should be showing “rain.png”. If anyone has encountered this or has any ideas please let me know.

Thx

Forecast

Yeah beats me too.

Is anyone here using this and also using hassio on a RPi3 with v 0.61.1?

As soon as I commented out the weather.yaml and python script, hassio loaded immediately. I downloaded the .py and yaml files from your github and only edited in my API key. It was initially working but all of a sudden it just died and I no longer could see any files in Winscp and SSH only showed a bash command line (not a hassio message etc)

It is very puzzling. I thought my card was dead and only by fluke noticed I had a small window of access after a restart where I could edit files and see everything correctly so I could recover.

Very odd. Is anyone else running this on hass.io 61.1 without any issues?

Yes. Got it running last night. If I get some time this weekend I’ll write up all of the things I ran into. Here are a few…

One that caused errors on home assistant loading was formatting problems from copying and pasting the python script. It was the long lines of code for each day of the week–just after value template I think–there were some extra line returns and the indention was not right.

Another was getting the script to run in the first place to create a boatload of sensors. Kudos to @DetroitEE for this little tidbit:

And for a card to show, I didn’t use the one in weather.yaml (commented it out). I already had a weather view in a groups include file, so I put the code there.

To get rid of the badges on the default view, I copied all of the dark sky sensors from the dev panel into Google Sheets, cleaned them up and formatted them for my weather groups file and made a hidden group as suggested.

Looks something like…

Hidden Dark Sky Sensors:
  - sensor.dark_sky_cloud_coverage
  - sensor.dark_sky_cloud_coverage_1
  - sensor.dark_sky_cloud_coverage_2
  - etc...

And go to Configuration > General > Reload Groups and they’ll all disappear.
EDIT: The badges will disappear from the default view, but you will then get a card with all the sensors instead. I use views in addition to the default view and didn’t see the new card until I scrolled down.

That’s a few things… :slight_smile:

I think you mean the yaml file - that’s where the value template lives.

I opened it up using the github link and did a select all and save to file. My script and yaml file look fine to me and editpad is showing both as unix LF format, not windows crlf.

I found it worked fine - for a while but once it died reverting the config was all I could do.

Yeah, that’s right. I’m going from memory here! And the memory doesn’t work like it used to!

Thank you so much. This is really great. 7 days forecast.

1 Like

@Sunonline I’m jealous of your temperature forecast (assuming it’s degrees C)

1 Like

If this happens again, please use the developer tools States screen to click on the sensor for those days, and report what you see as the value for the “entity_picture” attribute.

David, I realize this isn’t working for you at the moment, but I wanted to reply to your post showing tons of the dark sky sensor badges showing up. I would really recommend using custom views/tabs; this allows you to explicitly define what shows up in each view, rather than any new sensor you add automatically showing up and having to hide items you don’t want to see. This makes it much easier to navigate, especially on a mobile device.

By adding the line view: true you promote a group to a view. See below for how I have my groups split up and some example code:
image

default_view:
  name: Home
  view: true
  icon: mdi:home
  entities:
  - group.home_status_card
  - updater.updater
  - camera.driveway
  - camera.garage
lights_view:
  name: Lights
  view: true
  icon: mdi:lightbulb-outline
  entities:
  - group.living_room_lights
  - group.dining_room_lights
  - group.office_lights
  - group.kitchen_lights
  - group.upstairs_lights
  - group.garage_lights
  - group.exterior_lights
hvac_view:
  name: HVAC
  view: true
  icon: mdi:thermometer-lines
  entities:
  - group.hvac_card
security_view:
  name: Security
  view: true
  icon: mdi:lock
  entities:
  - group.security_card
weather_view:
  name: Weather
  view: true
  icon: mdi:weather-partlycloudy
  entities:
  - group.weather_card_today
  - group.weather_card_forecast
  - camera.weather_radar
media_view:
  name: Media
  view: true
  icon: mdi:youtube-tv
  entities:
  - media_player.downstairs_speakers
  - group.harmony_card
  - media_player.living_room_tv
network_view:
  name: Network
  view: true
  icon: mdi:network
  entities:
  - group.network_card
mail_view:
  name: Mail
  view: true
  icon: mdi:mailbox
  entities:
#  - camera.usps
  - group.mail_card
settings_view:
  name: Settings
  view: true
  icon: mdi:settings
  entities:
  - script.restart_ha
  - script.reload_groups
  - script.reload_automations
  - script.reload_scripts
1 Like

Hi. Thanks for that. I am moving in this direction.

I’m going to try again with this project when I update to 0.62

Please kindly advice regarding. customize all the sensor provide from 7 days weather forecast. How to make it shorter like in node_anchors. As all of them exposes to homebridge. I have try to put like below, still exposes all 7 days weather forecast.

homeassistant:
  customize:  
    package.node_anchors:
      customize: &customize
        package: 'darksky'  and 'dark_sky'

      expose: &expose
        <<: *customize
        emulated_hue: false
        homebridge_hidden: true

So it seems that some people are having issues with getting this to work. I’m not sure why it works for some and not others.

If it’s not working for you, here’s an alternate package for weather.yaml. This is based on the original code that I wrote for the 7-day forecast before others had improved on it. It does not use a python script, so you do not need to use the python file referenced above. The code is long and not pretty, but it does work. You’ll need to do some modifications if you want to use custom icons.

The way it works is it uses the group.set service to create the forecast group. It chooses the correct order of the days based on the current day.

1 Like

They seem to have issues with everything so suspect it’s PEBKAC

The package worked no issues for me… drop in and go.

1 Like

Using Notepad++ resolved my issue with the degrees sign. Thanks for the tip!

1 Like

This animated weather card with forecast should be coming in 0.63

Actually, I think I misread that. A PR is going in to make it possible to have a custom animated state card like the one in the post; it will not change weather cards, I believe.

1 Like

Thanks to all, great job, great share.

are those C or F? :slight_smile: