Binary Sensors missing

Hello everyone,

I need help I can’t get my Binary Sensors to show as entities on my integrations. Can you help.

I can see the sensor when looking on the device logs in the ESPHome.

My Config:

esphome:
  name: kitchen-sensors

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ""
    password: ""

captive_portal:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO12
      inverted: false
      mode:
        input: true
    name: KitchenSensor
    device_class: motion

  - platform: gpio
    pin:
      number: GPIO13
      inverted: false
      mode:
        input: true
    name: BathroomSensor
    device_class: motion

i2c:
  sda: GPIO4
  scl: GPIO5
  scan: true
  id: bus_a
  
sensor:
  - platform: am2320
    temperature:
      name: "Kitchen Temperature"
    humidity:
      name: "Kitchen Humidity"
    update_interval: 10s

Remove, readd esphome integration

Please post your logs and config in a readable format.

1 Like

Hi nikito7, I didn’t understand you can you please explain?

Hi, sorry for the bad formatting, I hope it’s better now.

And add it again.

Hi, I have done that multiple times, didn’t get it to work.

Do not name ESPhome devices using dashes. This will most often break HA integrations as dashes are not supported in sensor names.

So try without the dashes and let us know if that solves it.

esphome:
  name: kitchensensors

esp8266:
  board: esp01_1m

I know they are supposed to work according to ESPhome but I have had issues

1 Like

I really hopped this would work, but no luck… open to other suggestions.

Have you looked in dev tools - states for them ?

1 Like

First delete the integration. In your config folder you will see a folder called .storage. In that folder you will find text files in the format esphome.**random numbers/letters** Open the files and you should find a copy of the yaml for the problematic node, delete it. Then restart HA and add the integration back.

1 Like

It turned out to be something in the configuration.yaml I hade some binary switches connected directly to the RasPi, removed them since I wasn’t using them anymore. Thanks to everyone who helped with this.

Another reason why a binary sensor doesn’t show up in Home Assistant is if you don’t give it a name, because then it gets treated as internal.

  • internal (Optional, boolean): Mark this component as internal. Internal components will not be exposed to the frontend (like Home Assistant). Only specifying an id without a name will implicitly set this to true.

That wasn’t the issue for OP, but this thread ranks at the top for “home assistant binary sensor missing”.

3 Likes

I searched everywhere thanks to you i realised i haven’t named them, I sat 6 hours infront of my PC and did not understand why it would not show up.
Many Thanks,
You saved me from going insane.

2 Likes