7 Day Weather Forecast

you probably didn’t add the mandatory sensors which are mentioned in the template or the naming is different.

Spoke with arsaboo we need to be in the last release for this one to work.

I did update and everything is working perfect.

1 Like

RE: the templates not working in Hassio, seems OttoWinter has made some changes here:

Can this be rolled into weather.yaml and be made available now? Thanks.

I also noticed that in this yaml file, it shows as an example:

{%- set date = as_timestamp(now()) + (7 * 86400 ) -%}
{{ date | timestamp_custom("%A (%-m/%-d)") }}

But that github has a different order %-d/%-m so I don’t know if that’s significant either. I’m in Australia here…

I get this error :frowning:

Testing configuration at /config ERROR:homeassistant.util.yaml:Unable to read file /config/packages/weather.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 596: invalid start byte ERROR:homeassistant.bootstrap:Error loading /config/configuration.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 596: invalid start byte Failed config General Errors: - Error loading /config/configuration.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 596: invalid start byte

Place the template.py from the PR in custom_components\sensor\ subdirectory and it will work for you.

where can I find the template.py ? “pr” ?

thanks in advance

Here’s the file.

ok it doesn’t work for me. Getting forecast 1 etc still.
I copied the template.py to /config/custom_components/sensor
I used the new weather.yaml which uses the value template
I disabled the startup automation that calls the python script that I was using before.

I guess, you will have to then wait for the next release (when it is available in master).

sure. I don’t know why it’s not working now though. I was helping a dev troubleshoot the limitlessled component and the used the custom_config folder for that and was able to verify the changes.

not everything can be run from custom_components

Well that would explain it. Thanks.

now I get this error :slight_smile:

Testing configuration at /config ERROR:homeassistant.util.yaml:Unable to read file /config/packages/weather.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 814: invalid start byte ERROR:homeassistant.bootstrap:Error loading /config/configuration.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 814: invalid start byte Failed config General Errors: - Error loading /config/configuration.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 814: invalid start byte

I got similar yesterday when I added a CPU temperature reading and the unit was set to “°C” it is the ° it’s pitching a fit over. Funnily enough, the weather.yaml uses “°” which works for that character (for me anyway)

Nice tip

I chanced the ° to C and I got no errors anymore

I want to chance the names of the days ( to duch) . In dark_sky_friendly_names.py you can change the names, but nothing changes here .
I also want to change the date from 03/13 to 13/03. Is that possible ?

 forecast_2:
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (2 * 86400 ) -%}
          {{ date | timestamp_custom("%A (%-m/%-d)") }}
        value_template: >
          {{states.sensor.dark_sky_daily_high_temperature_2.state|round(0)}}°/{{states.sensor.dark_sky_daily_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'}}

Changing (%-m/%-d)") to %d/%m should change the date format

Stupid me. That was too easy to ask for :slight_smile:

Did the new template.py make it into 0.65.5? I didn’t see it in the release notes?

Doesn’t look like. It will be part of 0.66.