Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96121

Condition in automation is not working

$
0
0

@progonn wrote:

Hi,
I have a strange issue. I am trying to automate my covers and I can control them through homeassistant just fine and I can also read the current position.
Now, what I am trying to do is to trigger an action only if the cover is closed (position is 0). However, the command is also triggered if the position > 0.

I also checked the template tool within developer tools and the state is showing as I would expect there.

  condition:
  - condition: template
    value_template: '{{ state_attr("cover.cover_bedroom_left", "current_position")
      < 1}}'
  action:
  - data:
      entity_id: cover.cover_bedroom_left
      position: 2
    service: cover.set_cover_position

not sure if it matters but the component is controlled via mqtt

Any hints on how to debug further?

Posts: 8

Participants: 5

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>