Hi, I have an MQTT topic that publishes a number and I want to use this as a motion binary sensor so that if the number is 0 it’s off otherwise it’s on.
that just comes back and says the motion is clear all the time, it’s not a json value being passed it’s just a raw 0 or 1 or 2 etc so I wonder if that makes a difference. Thanks for looking at this by the way.
If it helps I have a seperate sensor called sensor.garage_person that shows the count, I think my first hurdle was using binary_sensor.camera_person_garage in my config for itself as that should always be on or off and not the number if that makes sense.
Brilliant I did have to add the payload_on and off parts as well but it’s working perfectly now. Thank you very much for your help, I think I need to brush up on a few of the configuration basics now.
- name: Camera Person Garage
platform: mqtt
state_topic: "frigate/garage/person"
device_class: motion
availability_topic: "frigate/available"
unique_id: "camera_person_garage"
payload_on: true
payload_off: false
value_template: '{{ value | int > 0 }}'