Hi! I have my own MQTT server which fires me info about intensity of light. It just publishes numeric (int, 0 - no light, >20 some light) data on specific topic. I’m trying to use that value to trigger some event:
- alias: Wentylator on
trigger:
above: 20
entity_id: sensor.swiatlo_w_lazience
platform: numeric_state
action:
data:
entity_id: switch.fan
service: switch.turn_on
and it doesn’t trigger…
Configuration for that is:
sensor 5:
platform: mqtt
state_topic: "MyMQTT/26/13/V_LIGHT_LEVEL"
name: "Światło w łazience"
qos: 0
unit_of_measurement: "lx"
How do I do that properly? I was trying to use some templates (both in sensor and in trigger definition) suspecting the problem with JSON payload but it seems I get it wrong. How can I see how exactly JSON data for the even looks like?