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

MQTT Sensor outputting payload in apostrophes

$
0
0

@adamp237 wrote:

Hi, I have the following config:

#Garage Door Status   
  - platform: mqtt
    name: garage_door_time
    state_topic: "garadget/APGarageDoor/status"
    value_template: ‘{{ value_json.time }}’ 
  - platform: mqtt
    name: Wifi Strength
    state_topic: "garadget/APGarageDoor/status"
    value_template: ‘{{ value_json.signal }}’          
    unit_of_measurement: 'dB'
  - platform: mqtt
    name: garage_door_status
    state_topic: "garadget/APGarageDoor/status"
    value_template: ‘{{ value_json.status }}’ 

It works fine at telling me whether my Garage Door is closed or not. However the status outputs ‘closed’ in apostrophes or ‘open’ etc. Lots of my automations aren’t working and I’m wondering if this is the reason. Is there a way I can get it to stop putting the status within apostrophes?

I’ve tried removing the apostrophies from {{ value_json.time }} but then the YAML breaks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 101899

Trending Articles



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