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

Whats wrong with my automation syntax

$
0
0
alias: awtrix_bday_kay_countdown
description: ""
mode: single
trigger:
  - platform: state
    entity_id:
      - sensor.anniversary_bday_kay
condition: []
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.anniversary_bday_kay
        below: 1
    then:          
	  - service: mqtt.publish
	    data:
	      qos: 2
	      retain: true
	      payload: |-
    		{ 
    		    "text": "{{ states.sensor.anniversary_bday_kay.state }} K",
    		    "rainbow": true,
    		    "icon": 14004,
    		    "duration": 10 
    		}
	      topic: awtrix1/custom/bday_kay
    else:          
	  - service: mqtt.publish
	    data:
	      qos: 2
	      retain: true
	      payload: |-
    		{ 
    		    "text": "Happy Birthday!",
    		    "rainbow": true,
    		    "icon": 14004,
    		    "duration": 10 
    		}
	      topic: awtrix1/custom/bday_kay

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107282

Trending Articles



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