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

Automation value_template match 2 conditions?

$
0
0

@kroonen wrote:

Hi.

I will do an automation wit 2 conditions from zigbee2mqtt
 zigbee2mqtt:info 11/9/2019, 6:50:10 PM MQTT publish: topic 'zigbee2mqtt/remote', payload '{"linkquality":39,"last_seen":"2019-11-09T17:50:10.385Z","action":"on","action_group":146}'

I have this

- alias: "remote lamp staand on"
  trigger:
   - platform: mqtt
     topic: 'zigbee2mqtt/remote'
  condition:
     condition: template
     value_template: '{{ "on" == trigger.payload_json.action }}'
  action:
     service: light.turn_on
     data:
       entity_id:
         - light.staandelamp

How can I make an and statement?

 value_template: '{{ "on" == trigger.payload_json.action }}'  and '{{ "146" == trigger.payload_json.action_group }}'

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95372

Trending Articles



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