CarPresence

Hi,

I thought I had cracked at this but it won’t work :face_with_raised_eyebrow: I am new to HA so just learning the ropes!

I am trying to get CarPresence working as described in DrZZs video

So far I have got the D1 Mini working fine, I can see it connected to MQTT :slightly_smiling_face:

MQTT discovery connectivity config: [homeassistant/binary_sensor/CarPresence/config] : [{"name": "CarPresence", "device_class": "connectivity", "state_topic": "homeassistant/binary_sensor/CarPresence/state"}]
MQTT discovery connectivity state: [homeassistant/binary_sensor/CarPresence/state] : [ON]
MQTT discovery signal config: [homeassistant/sensor/CarPresence-signal/config] : [{"name": "CarPresence-signal", "state_topic": "homeassistant/sensor/CarPresence-signal/state", "unit_of_measurement": "dBm", "value_template": "{{ value }}"}]
MQTT discovery signal state: [homeassistant/sensor/CarPresence-signal/state] : -76
MQTT discovery uptime config: [homeassistant/sensor/CarPresence-uptime/config] : [{"name": "CarPresence-uptime", "state_topic": "homeassistant/sensor/CarPresence-uptime/state", "unit_of_measurement": "msec", "value_template": "{{ value }}"}]
MQTT discovery uptime state: [homeassistant/sensor/CarPresence-uptime/state] : 767106
MQTT connected

I have added a Binary Sensor to configuration.yaml

binary_sensor:
    - platform: mqtt
      state_topic: "homeassistant/sensor/CarPresence/state"
      name: "CarPresence"
      payload_on: "ON"
      payload_off: "OFF"
      qos: 0

The problem I have is that HA isn’t doing anything when the D1 is connected to the wifi, the entity state remains off

binary_sensor.carpresence off friendly_name: CarPresence

Can anyone see where I am going wrong?

Regards
James

solved!

This line

state_topic: “homeassistant/sensor/CarPresence/state”

Should have been

state_topic: “homeassistant/binary_sensor/CarPresence/state”

Regards