Ok, so after watching Ben’s(BRUH) video, “$15 DIY Multisensor”, I was able to build and get a couple of these Multisensors working in HA.
Now I want to start using the PIR sensor to control some lights. So what do I want to Subscribe to, in “MQTT Lens” or HA, so that I only see the value, for the PIR sensor???
The following, is the code I am using, to setup one of the sensors,
I don’t think is is a binary.sensor, when I look at it’s states list, all I see is, sensor.livingroom_pir. This is the way Ben has it setup… Can I still make it work, or do I have too rewrite the code???
Your code in the first post, I’m guessing all the entries would be located under sensor: in your configuration.yaml
All you’d need to do is to add a header below all these called binary_sensor: and move the PIR sensor there:
By doing what you state above, breaks the Motion sensor, in HA. I get the following warning;
2018-06-13 17:51:00 WARNING (MainThread) [homeassistant.components.binary_sensor.mqtt] No matching payload found for entity: Kitchen PIR with state_topic: climate/ki-room
It probably because, in Ben’s Sketch for the sensor module, he uses only 1 mqtt topic to get ALL the info, for the 5 different sensors, and that is “climate/li-room”. When I put this topic into a program like “MQTT Lens”, I get the following back;
It’s probably because Ben doesn’t return standard values for motion on and motion off.
Add a couple of lines to tell HA what status means motion on and what status means motion off:
But, in HA it is now showing “ON” for Motion Detected, and “OFF” for Standby(no motion). Which I can live with, but it would be nice for HA to display Motion Detected or Standby.