Home Assistant Community

7 Day Weather Forecast

#368

yah, I repasted the file so that the spaces were gone.

0 Likes

#369

I would suggest trying to load the dark sky sensor component directly in your configuration.yaml file and paste the api key directly in there as well, and use that as a starting point to see if you are still getting the error.

0 Likes

#370

I have had both the DarkSky sensor and Platform working, currently they are commented out to eliminate any potential conflicts.

edit: I just went back and re-enabled the Darksky sensor entry and it pulled the data as needed.
The Darksky platform worked as well when I re-enabled it.
I don’t understand the key error.

0 Likes

#371

From google searches it seems the required key not provided is a vague error that isn’t related to the darksky api key.
I’ve seen entries for switches, sensors, automations, MQTT, and more.

0 Likes

#372

I’ve also been reading the docs on packages https://www.home-assistant.io/docs/configuration/packages/ and it references ‘keys representing the filenames’.

So outside of packages:

!include_dir_named packages

in the configuration.yaml does there need to be any other entry or am I misunderstanding the keys thing?

0 Likes

#373

Hello I’m trying to install and copy the two directories from github to my hassio config, add two line in my configuration.yaml and when check if configuration is valid I obtain yhis :extra keys not allowed @ data[‘python_script’]. I have 0.80.2 version.

0 Likes

#374

that would be an indentation error. Check that you have 2 spaces where required

0 Likes

#375

Verify you’ve read through the post and are using the latest code. You shouldn’t need to use the python script to update the friendly names, you can do this with friendly name templating.

0 Likes

#376

As of version 0.81:

Template sensors will no longer auto update if we can’t find relevant entities in the template. You’ll want to review your template sensors and consider adding relevant entity_id entries or use the new homeassistant.update_entity service.

Adding entity_id to every template sensor seemed clunky, so this automation is what I added in my weather.yaml package:

automation:
  - alias: Update Sensors
    initial_state: on
    trigger:
      platform: time
      hours: '/3'
      minutes: 01
      seconds: 00
    action:
        service: homeassistant.update_entity
        data:
          entity_id: 
            - sensor.weekday
            - sensor.forecast_today
            - sensor.forecast_1
            - sensor.forecast_2
            - sensor.forecast_3
            - sensor.forecast_4
            - sensor.forecast_5
            - sensor.forecast_6
            - sensor.forecast_7

This will update all weather sensors every 3 hours. Seems to be working fine. Please note that you must be on v0.81.1 or later. v0.81.0 did not allow the use of a list for the service data for homeassistant.update_entity

0 Likes

Howto create battery alert without creating a template for every device
#377

Won’t that still give an error in the log when HA starts up?

I added the entity id’s to all my templates… there were only 7 to add and copy/paste made it pretty simple.

0 Likes

#378

What did you enter for the entity_id’s?

0 Likes

#379

Here is an example of the first forcast for me.

      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'}}
        entity_id: sensor.dark_sky_daytime_high_temperature_1, sensor.dark_sky_overnight_low_temperature_1, sensor.dark_sky_precip_probability_1
0 Likes

#380

Oh, I understand now. You use the entity_id the value_template is based on. I was confused as to what should be used. That clears it up, thank you.

1 Like

#381

I just updated to the latest package and receive this error for every forcast

2018-12-19 20:13:17 WARNING (MainThread) [homeassistant.components.sensor.template] Template sensor forecast_1 has no entity ids configured to track nor were we able to extract the entities to track from the friendly_name template(s). This entity will only be able to be updated manually.

is that intentional? I can add the entity id’s and have no issue with doing so, just figure that since its not there, they might be a reason?

0 Likes

#382

yes it was a breaking change a few versions ago. you need to add the entity_id to the sensor

0 Likes

#383

Totally familiar with the breaking change. I updated today because of the day 0 addition. The git was just updated 25 days ago

@arsaboo is such a key person I’d assume the entity ids would be included which is why i asked if it was intentional

I’ll probably add the ids unless I hear otherwise.

0 Likes

#384

adding the entity id’s is not the only way to solve the problem. You can also use an automation.

1 Like

#385

Thanks everyone for all your help here to get me up and running on this. I have a question, is there a way to convert the forecast card to an image file so I can sms/email etc it outside of HA?

My wife would love that if I could have it delivered to her phone.

Mike

0 Likes

#386

I don’t know of a way to do what you’re asking, not to say that it can’t be done. How about just creating a view in hass with only the data you want her to see, navigate to that via Chrome on her device, and use “Add to Home” to create an icon that leads directly to that page?

0 Likes

#387

Thanks, will do it that way for now. Sill looking into it, thinking there may be a generic cam approach here.

0 Likes