Closed gigatexel closed 11 months ago
Which home assistant version are you using?
Having the same issue and using the latest version available
Also it doesn't work adding the sensor via gui as HA complains about the var "res" not being defined (for whatever cause as it actually should be defined in the action cause above 🤷♂️)
It works on my machine if I put it into a yaml file (I didn't check the GUI). Maybe the VS syntax highlighter doesn't support this quite new feature yet. Regarding the unknown state: In your example, the state will be only updated once per day, at 00:00.
solved for me, can’t say for sure what (I have) changed
@nin9s Please share your configuration.
put in configuration.yaml
template:
- trigger:
- platform: time
at: 15:02
action:
- service: epex_spot.get_lowest_price_interval
data:
earliest_start: "09:00:00"
latest_end: "18:00:00"
duration:
hours: 1
response_variable: resp
sensor:
- name: epex_lowest_intervall
device_class: timestamp
state: "{{ resp.start is defined and resp.start }}"
Again... I'm just a n00b at HASS.
But don't you always need quotation marks around the time so that the colon is not misinterpreted?
at: "15:02:00"
Any updates?
Fixed for me
Could it be that there is an error in the new example for calling the service? VS signals an error and the template renders Unknown