#i have not go into this right now. Only

1 messages · Page 1 of 1 (latest)

sick wadi
#
Bron: components/automation/__init__.py:747
integratie: Automatisering (documentatie, problemen)
Eerst voorgekomen: 10:00:01 (1 gebeurtenissen)
Laatst gelogd: 10:00:01

Error while executing automation automation.notification_medicatie_herinneren: Error rendering data template: UndefinedError: None has no element 0
deft robin
#

Can we cut this down to something smaller leading directly to the issue?

sick wadi
#

when you tell me what to do i'm sure of it.

deft robin
#

It's rendering a template somewhere

#

but where

#

and what is it missing

sick wadi
#

BTW i have a lot of other error in the log

#

could i put the log here?

#

i will show you the automation,

deft robin
#

ah

#

state attributes are deprecated

#

or well

#

they were 6 months ago

#

they are now removed

sick wadi
#

this is the whole automation script:

sick wadi
sick wadi
#
        {%- set forecast = state_attr('weather.buienradar', 'forecast')[0] %}
        {%- set temperature_unit = state_attr('weather.buienradar',
        'temperature_unit') -%} {% set state = forecast.condition %}    {% set
        temperature = forecast.temperature %}    {% set humidity =
        state_attr('weather.buienradar', 'humidity') %}   {% set windspeed =
        state_attr('weather.buienradar', 'wind_speed') %}    {% set rain =
        forecast.precipitation %} {% if state == 'partlycloudy' %}
          {% set state = 'Gedeeltelijk bewolkt'%}
        {% endif %}  
deft robin
#

@harsh elk Do you have some examples somewhere?

sick wadi
#

is it something like:

  - alias: Fetch prive agenda
    service: calendar.get_events
    target:
      entity_id:
        - calendar.nielsnl68_gmail_com
    data:
      duration:
        hours: 24
        minutes: 0
        seconds: 0
    response_variable: agenda

?

deft robin
#

(I think the weather documentation Martijn linked also contain examples for this)

sick wadi
#

but then for the weather

deft robin
#

I think so

sick wadi
#

top

harsh elk
#

yes, there is an example in the docs

sick wadi
#

yeah, i did saw that but i was not able to translate that back to the script at first.