@Blindside wrote:
Hi all,
what I would like to do is set the shutter in my office to a specific position depending on the weather and sund conditions. The trigger is either the sun rising or a change of the wheather state.
What I also would like to do is not running the automations (I have several for sevral triggers) if the cover is above 95% closed (or as HASS reads it, less than 5% open).
I try to use the following template in order to read out the cover position state, and in the template editor it works fine:
'{{ state_attr('cover.shelly_shsw_25_8caab505a689', 'current_position') < 5}}'
However, when I try to set up the condition in the automations.yaml, I geht the following error message:
can not read an implicit mapping pair; a colon is missed at line 22, column 19: '{{ state_attr('cover.shelly_shsw_25_8caab505a68 ... ^
Following is an example of one of the automations.yaml:
- id: '1586975582792' alias: Rolladen Büro runter description: Fährt Rolladen im Büro vormittags runter bei Sonnenschein trigger: - entity_id: weather.home for: 00:10:00 platform: state to: sunny - entity_id: weather.home for: 00:10:00 platform: state to: partlycloudy - entity_id: weather.home for: 00:10:00 platform: state to: exceptional condition: - condition: time after: 06:00:00 before: '10:59:00' - condition: template '{{ state_attr('cover.shelly_shsw_25_8caab505a689', 'current_position') < 5}}' action: - data: entity_id: cover.shelly_shsw_25_8caab505a689 position: 55 service: cover.set_cover_position
Any ideas what is going wrong?
Posts: 1
Participants: 1