Entites not showing in Home assistant

Hi All,

I’m hoping someone out there can have a look over my Yaml and spot where I have gone wrong. here is what is happening… as far as I can tell from the logs output from this little sensor everything is working perfectly the LED’s flash to show they are booting, searching for WIFI and Connected to WIFI and HA… BUT I can’t see the states on Home assistant, it’s not that they are unavailable or sowing the wrong data… no… they are just not there at all …

here is my log output

INFO ESPHome 2024.10.3
INFO Reading configuration /config/esphome/sensor-lounge.yaml...
INFO Detected timezone 'Europe/London'
INFO Starting log output from 192.168.0.151 using esphome API
INFO Successfully connected to sensor-lounge @ 192.168.0.151 in 0.004s
INFO Successful handshake with sensor-lounge @ 192.168.0.151 in 0.028s
[19:15:47][I][app:100]: ESPHome version 2024.10.3 compiled on Nov 15 2024, 19:14:43
[19:15:47][C][wifi:600]: WiFi:
[19:15:47][C][wifi:428]:   Local MAC: ************
[19:15:47][C][wifi:433]:   SSID: [redacted]
[19:15:47][C][wifi:436]:   IP Address: 192.168.0.151
[19:15:47][C][wifi:439]:   BSSID: [redacted]
[19:15:47][C][wifi:441]:   Hostname: 'sensor-lounge'
[19:15:47][C][wifi:443]:   Signal strength: -68 dB ▂▄▆█
[19:15:47][C][wifi:447]:   Channel: 1
[19:15:47][C][wifi:448]:   Subnet: 255.255.255.0
[19:15:47][C][wifi:449]:   Gateway: 192.168.0.254
[19:15:47][C][wifi:450]:   DNS1: 192.168.0.254
[19:15:47][C][wifi:451]:   DNS2: 0.0.0.0
[19:15:47][C][logger:185]: Logger:
[19:15:47][C][logger:186]:   Level: DEBUG
[19:15:47][C][logger:188]:   Log Baud Rate: 115200
[19:15:47][C][logger:189]:   Hardware UART: UART0
[19:15:47][C][i2c.arduino:071]: I2C Bus:
[19:15:47][C][i2c.arduino:072]:   SDA Pin: GPIO4
[19:15:47][C][i2c.arduino:073]:   SCL Pin: GPIO5
[19:15:47][C][i2c.arduino:074]:   Frequency: 50000 Hz
[19:15:47][C][i2c.arduino:086]:   Recovery: bus successfully recovered
[19:15:47][I][i2c.arduino:096]: Results from i2c bus scan:
[19:15:47][I][i2c.arduino:102]: Found i2c device at address 0x39
[19:15:47][C][uptime.sensor:033]: Uptime Sensor 'lounge Sensor uptime do not use'
[19:15:47][C][uptime.sensor:033]:   Device Class: 'duration'
[19:15:47][C][uptime.sensor:033]:   State Class: 'total_increasing'
[19:15:47][C][uptime.sensor:033]:   Unit of Measurement: 's'
[19:15:47][C][uptime.sensor:033]:   Accuracy Decimals: 0
[19:15:47][C][uptime.sensor:033]:   Icon: 'mdi:timer-outline'
[19:15:47][C][uptime.sensor:034]:   Type: Seconds
[19:15:47][C][template.text_sensor:020]: Template Sensor 'lounge Sensor Uptime'
[19:15:47][C][template.text_sensor:020]:   Icon: 'mdi:clock-start'
[19:15:47][C][esp8266_pwm:022]: ESP8266 PWM:
[19:15:47][C][esp8266_pwm:023]:   Pin: GPIO14
[19:15:47][C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[19:15:47][C][esp8266_pwm:025]:   Inverted: YES
[19:15:47][C][esp8266_pwm:022]: ESP8266 PWM:
[19:15:47][C][esp8266_pwm:023]:   Pin: GPIO12
[19:15:47][C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[19:15:47][C][esp8266_pwm:025]:   Inverted: YES
[19:15:47][C][esp8266_pwm:022]: ESP8266 PWM:
[19:15:47][C][esp8266_pwm:023]:   Pin: GPIO13
[19:15:47][C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[19:15:47][C][esp8266_pwm:025]:   Inverted: YES
[19:15:47][C][light:103]: Light 'lounge Decorative Light'
[19:15:47][C][light:105]:   Default Transition Length: 1.0s
[19:15:47][C][light:106]:   Gamma Correct: 2.80
[19:15:47][C][homeassistant.time:010]: Home Assistant Time:
[19:15:47][C][homeassistant.time:011]:   Timezone: 'GMT0BST,M3.5.0/1,M10.5.0'
[19:15:47][C][tsl2561:040]: TSL2561 'lounge Ambient Light'
[19:15:47][C][tsl2561:040]:   Device Class: 'illuminance'
[19:15:47][C][tsl2561:040]:   State Class: 'measurement'
[19:15:47][C][tsl2561:040]:   Unit of Measurement: 'lx'
[19:15:47][C][tsl2561:040]:   Accuracy Decimals: 1
[19:15:47][C][tsl2561:040]:   Icon: 'mdi:lightbulb-on-outline'
[19:15:47][C][tsl2561:041]:   Address: 0x39
[19:15:47][C][tsl2561:048]:   Gain: 1x
[19:15:47][C][tsl2561:049]:   Integration Time: 402.0 ms
[19:15:47][C][tsl2561:051]:   Update Interval: 60.0s
[19:15:47][C][dht:017]: DHT:
[19:15:47][C][dht:018]:   Pin: GPIO0
[19:15:47][C][dht:022]:   Model: DHT11
[19:15:47][C][dht:027]:   Update Interval: 60.0s
[19:15:47][C][dht:029]:   Temperature 'lounge Temperature'
[19:15:47][C][dht:029]:     Device Class: 'temperature'
[19:15:47][C][dht:029]:     State Class: 'measurement'
[19:15:47][C][dht:029]:     Unit of Measurement: '°C'
[19:15:47][C][dht:029]:     Accuracy Decimals: 1
[19:15:47][C][dht:030]:   Humidity 'lounge Humidity'
[19:15:47][C][dht:030]:     Device Class: 'humidity'
[19:15:47][C][dht:030]:     State Class: 'measurement'
[19:15:47][C][dht:030]:     Unit of Measurement: '%'
[19:15:47][C][dht:030]:     Accuracy Decimals: 1
[19:15:47][C][version.text_sensor:021]: Version Text Sensor 'lounge Sensor ESPHome version'
[19:15:47][C][version.text_sensor:021]:   Icon: 'mdi:new-box'
[19:15:47][C][restart:068]: Restart Switch 'lounge Sensor Restart'
[19:15:47][C][restart:070]:   Icon: 'mdi:restart'
[19:15:47][C][restart:090]:   Restore Mode: always OFF
[19:15:47][C][captive_portal:089]: Captive Portal:
[19:15:47][C][web_server:153]: Web Server:
[19:15:47][C][web_server:154]:   Address: sensor-lounge.local:80
[19:15:47][C][mdns:116]: mDNS:
[19:15:47][C][mdns:117]:   Hostname: sensor-lounge
[19:15:47][C][esphome.ota:073]: Over-The-Air updates:
[19:15:47][C][esphome.ota:074]:   Address: sensor-lounge.local:8266
[19:15:47][C][esphome.ota:075]:   Version: 2
[19:15:47][C][safe_mode:018]: Safe Mode:
[19:15:47][C][safe_mode:019]:   Boot considered successful after 60 seconds
[19:15:47][C][safe_mode:021]:   Invoke after 10 boot attempts
[19:15:47][C][safe_mode:022]:   Remain in safe mode for 300 seconds
[19:15:47][C][api:140]: API Server:
[19:15:47][C][api:141]:   Address: sensor-lounge.local:6053
[19:15:47][C][api:145]:   Using noise encryption: NO
[19:15:47][C][wifi_signal.sensor:010]: WiFi Signal 'lounge Sensor WiFi signal'
[19:15:47][C][wifi_signal.sensor:010]:   Device Class: 'signal_strength'
[19:15:47][C][wifi_signal.sensor:010]:   State Class: 'measurement'
[19:15:47][C][wifi_signal.sensor:010]:   Unit of Measurement: 'dBm'
[19:15:47][C][wifi_signal.sensor:010]:   Accuracy Decimals: 0
[19:15:56][D][tsl2561:126]: Got illuminance=12.8lx
[19:15:56][D][sensor:093]: 'lounge Ambient Light': Sending state 12.81966 lx with 1 decimals of accuracy
[19:16:01][D][dht:048]: Got Temperature=21.5°C Humidity=62.0%
[19:16:01][D][sensor:093]: 'lounge Temperature': Sending state 21.50000 °C with 1 decimals of accuracy
[19:16:01][D][sensor:093]: 'lounge Humidity': Sending state 62.00000 % with 1 decimals of accuracy
[19:16:19][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[19:16:56][D][tsl2561:126]: Got illuminance=12.8lx
[19:16:56][D][sensor:093]: 'lounge Ambient Light': Sending state 12.81966 lx with 1 decimals of accuracy
[19:17:01][D][dht:048]: Got Temperature=21.5°C Humidity=59.0%
[19:17:01][D][sensor:093]: 'lounge Temperature': Sending state 21.50000 °C with 1 decimals of accuracy
[19:17:01][D][sensor:093]: 'lounge Humidity': Sending state 59.00000 % with 1 decimals of accuracy
[19:17:56][D][tsl2561:126]: Got illuminance=12.8lx
[19:17:56][D][sensor:093]: 'lounge Ambient Light': Sending state 12.81966 lx with 1 decimals of accuracy
[19:17:58][W][api.connection:105]: ESPHome Logs 2024.10.3 (192.168.0.32): Connection closed
[19:18:01][D][dht:048]: Got Temperature=21.5°C Humidity=59.0%
[19:18:01][D][sensor:093]: 'lounge Temperature': Sending state 21.50000 °C with 1 decimals of accuracy
[19:18:01][D][sensor:093]: 'lounge Humidity': Sending state 59.00000 % with 1 decimals of accuracy

And here is my Full Yaml file.


esphome:
  name: "sensor-lounge"
  friendly_name: Sensor Lounge
  platform: ESP8266
  board: d1_mini
  on_boot:
    - priority: 400.0 # after sensor setup, before WIFI initialization 
      then:
        - light.turn_on: # indication that the controller has power
            id: lounge_decorative_light
            brightness: 100%
            red: 0%
            green: 0%
            blue: 100%
    - priority: 250.0 # after WIFI initialization
      then:
        - light.turn_on: # indication that the controller is looking for a wifi connection
            id: lounge_decorative_light
            brightness: 100%
            red: 100%
            green: 0%
            blue: 0%
        - delay: '00:00:05'    
    - priority: -100.0 # everything is initialized, system is online - if condition waits for connection
      then:
        if:
          condition:
            wifi.connected:
          then:
            - light.turn_on: # indication of wifi connection confirmation
                id: lounge_decorative_light
                brightness: 100%
                red: 0%
                green: 100%
                blue: 0%
            - delay: '00:00:05'
            - light.turn_on: # confirming that blue led's are working
                id: lounge_decorative_light
                brightness: 100%
                red: 0%
                green: 0%
                blue: 100%
            - delay: '00:00:02'
            - light.turn_off: # turns off light waiting on automation to start
                id: lounge_decorative_light
   

wifi:
  ssid: !secret ssid
  password: !secret password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "lounge Sensor Fallback Hotspot"
    password: "*******"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  platform: esphome

# Enable Web server.
web_server:
  port: 80

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

i2c:
  sda: 4  # (Optional, Pin): The pin for the data line of the I²C bus. Defaults to GPIO4 for ESP8266.
  scl: 5  # (Optional, Pin): The pin for the clock line of the I²C bus. Defaults to GPIO5 for ESP8266.
  scan: True # (Optional, boolean): If ESPHome should do a search of the I²C address space on startup. Defaults to True.
  id: bus_a

sensor:
  - platform: wifi_signal
    name: "lounge Sensor WiFi signal"
    update_interval: 600s

  - platform: uptime
    name: "lounge Sensor uptime do not use"
    id: lounge_sensor_uptime_do_not_use
    internal: true
    update_interval: 600s

  - platform: tsl2561
    name: "lounge Ambient Light"
    icon: mdi:lightbulb-on-outline
    address: 0x39
    update_interval: 60s
 
  - platform: dht
    pin: D3
    model: DHT11
    temperature:
      name: "lounge Temperature"
      accuracy_decimals: 1
    humidity:
      name: "lounge Humidity"
      accuracy_decimals: 1
    update_interval: 60s
   
    
text_sensor:
  - platform: version
    name: "lounge Sensor ESPHome version"
    
  - platform: template
    name: "lounge Sensor Uptime"
    lambda: |-
      uint32_t dur = id(lounge_sensor_uptime_do_not_use).state;
      int dys = 0;
      int hrs = 0;
      int mnts = 0;
      if (dur > 86399) {
        dys = trunc(dur / 86400);
        dur = dur - (dys * 86400);
      }
      if (dur > 3599) {
        hrs = trunc(dur / 3600);
        dur = dur - (hrs * 3600);
      }
      if (dur > 59) {
        mnts = trunc(dur / 60);
        dur = dur - (mnts * 60);
      }
      char buffer[17];
      sprintf(buffer, "%ud %02uh %02um %02us", dys, hrs, mnts, dur);
      return {buffer};
    icon: mdi:clock-start
    update_interval: 600s

switch:
  - platform: restart
    name: lounge Sensor Restart
    
light:
  - platform: rgb
    name: "lounge Decorative Light"
    id: lounge_decorative_light
    red: red
    green: green
    blue: blue
    effects:
      - random:
          name: Fadeing Rainbow
          transition_length: 2.5s
          update_interval: 2s       

# Example output entry
output:
  - platform: esp8266_pwm
    id: blue
    pin: D5
    inverted: True
  - platform: esp8266_pwm
    id: red
    pin: D6
    inverted: True
  - platform: esp8266_pwm
    id: green
    pin: D7
    inverted: True




I can understand if one or two of my states don’t show, but for absolutely none… has me stumped… I should mention that the Yaml is a collection of help and me trying to figure things out, the uptime sensors and stuff will be getting removed to just what’s needed.

thank you all for your help,

Robin

What does the device page in HA show? Is it even adopted in HA?

it shows up in ESPhome as active and if I go to Devices–> esphome it shows as being 1 device with 9 entities but nothing is showing in Homa Assistant.

Downloaded the Diagnostics

},
  "data": {
    "config": {
      "created_at": "1970-01-01T00:00:00+00:00",
      "data": {
        "device_name": "sensor-lounge",
        "host": "192.168.0.151",
        "noise_psk": "",
        "password": "",
        "port": 6053
      },
      "discovery_keys": {
        "zeroconf": [
          {
            "__type": "<class 'homeassistant.helpers.discovery_flow.DiscoveryKey'>",
            "repr": "DiscoveryKey(domain='zeroconf', key=('_esphomelib._tcp.local.', 'lounge_sensor._esphomelib._tcp.local.'), version=1)"
          },
          {
            "__type": "<class 'homeassistant.helpers.discovery_flow.DiscoveryKey'>",
            "repr": "DiscoveryKey(domain='zeroconf', key=('_esphomelib._tcp.local.', 'sensor-lounge._esphomelib._tcp.local.'), version=1)"
          }
        ],
        "dhcp": [
          {
            "__type": "<class 'homeassistant.helpers.discovery_flow.DiscoveryKey'>",
            "repr": "DiscoveryKey(domain='dhcp', key='500291c35227', version=1)"
          }
        ]
      },
      "disabled_by": null,
      "domain": "esphome",
      "entry_id": "8dbed042baea185f8a0f0ee54e27a0cd",
      "minor_version": 1,
      "modified_at": "2024-11-15T20:04:16.174289+00:00",
      "options": {
        "allow_service_calls": true
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "zeroconf",
      "title": "lounge_sensor",
      "unique_id": "50:02:91:c3:52:27",
      "version": 1
    },
    "storage_data": {
      "device_info": {
        "uses_password": false,
        "name": "sensor-lounge",
        "friendly_name": "Sensor Lounge",
        "mac_address": "**REDACTED**",
        "compilation_time": "Nov 15 2024, 19:14:43",
        "model": "d1_mini",
        "manufacturer": "Espressif",
        "has_deep_sleep": false,
        "esphome_version": "2024.10.3",
        "project_name": "",
        "project_version": "",
        "webserver_port": 80,
        "legacy_voice_assistant_version": 0,
        "voice_assistant_feature_flags": 0,
        "legacy_bluetooth_proxy_version": 0,
        "bluetooth_proxy_feature_flags": 0,
        "suggested_area": ""
      },
      "services": [],
      "api_version": {
        "major": 1,
        "minor": 10
      },
      "switch": [
        {
          "object_id": "lounge_sensor_restart",
          "key": 1021454084,
          "name": "lounge Sensor Restart",
          "unique_id": "sensor-loungeswitchlounge_sensor_restart",
          "disabled_by_default": false,
          "icon": "mdi:restart",
          "entity_category": 1,
          "assumed_state": false,
          "device_class": ""
        }
      ],
      "sensor": [
        {
          "object_id": "lounge_sensor_wifi_signal",
          "key": 2928664899,
          "name": "lounge Sensor WiFi signal",
          "unique_id": "500291c35227-wifisignal",
          "disabled_by_default": false,
          "icon": "",
          "entity_category": 2,
          "device_class": "signal_strength",
          "unit_of_measurement": "dBm",
          "accuracy_decimals": 0,
          "force_update": false,
          "state_class": 1,
          "last_reset_type": 0
        },
        {
          "object_id": "lounge_ambient_light",
          "key": 3824244507,
          "name": "lounge Ambient Light",
          "unique_id": "sensor-loungesensorlounge_ambient_light",
          "disabled_by_default": false,
          "icon": "mdi:lightbulb-on-outline",
          "entity_category": 0,
          "device_class": "illuminance",
          "unit_of_measurement": "lx",
          "accuracy_decimals": 1,
          "force_update": false,
          "state_class": 1,
          "last_reset_type": 0
        },
        {
          "object_id": "lounge_temperature",
          "key": 450645260,
          "name": "lounge Temperature",
          "unique_id": "sensor-loungesensorlounge_temperature",
          "disabled_by_default": false,
          "icon": "",
          "entity_category": 0,
          "device_class": "temperature",
          "unit_of_measurement": "\u00b0C",
          "accuracy_decimals": 1,
          "force_update": false,
          "state_class": 1,
          "last_reset_type": 0
        },
        {
          "object_id": "lounge_humidity",
          "key": 100962217,
          "name": "lounge Humidity",
          "unique_id": "sensor-loungesensorlounge_humidity",
          "disabled_by_default": false,
          "icon": "",
          "entity_category": 0,
          "device_class": "humidity",
          "unit_of_measurement": "%",
          "accuracy_decimals": 1,
          "force_update": false,
          "state_class": 1,
          "last_reset_type": 0
        }
      ],
      "text_sensor": [
        {
          "object_id": "lounge_sensor_esphome_version",
          "key": 2290411277,
          "name": "lounge Sensor ESPHome version",
          "unique_id": "500291c35227-version",
          "disabled_by_default": false,
          "icon": "mdi:new-box",
          "entity_category": 2,
          "device_class": ""
        },
        {
          "object_id": "lounge_sensor_uptime",
          "key": 1350618371,
          "name": "lounge Sensor Uptime",
          "unique_id": "sensor-loungetext_sensorlounge_sensor_uptime",
          "disabled_by_default": false,
          "icon": "mdi:clock-start",
          "entity_category": 0,
          "device_class": ""
        }
      ],
      "update": [],
      "light": [
        {
          "object_id": "lounge_decorative_light",
          "key": 1100620457,
          "name": "lounge Decorative Light",
          "unique_id": "sensor-loungelightlounge_decorative_light",
          "disabled_by_default": false,
          "icon": "",
          "entity_category": 0,
          "supported_color_modes": [
            35
          ],
          "min_mireds": 0.0,
          "max_mireds": 0.0,
          "effects": [
            "None",
            "Fadeing Rainbow"
          ],
          "legacy_supports_brightness": true,
          "legacy_supports_rgb": true,
          "legacy_supports_white_value": false,
          "legacy_supports_color_temperature": false
        }

if I click on the entities here (haven’t done this before now) it says “This entity is disabled” if I click in to the setting here, it tells me “cannot change status, Disabled by Config entry.” where can that entry be? I don’t recol changing anything like this… any idea where to find it or track it down?

Nope. That’s my biggest gripe with HA, there are so many different places that things get configured and navigating them is a nightmare. I would start by deleting the device from HA and re-adding it.

Yup… not ideal but boot it out and re-load it… worked a charm!! Thankyou doing that didn’t even cross my mind… but it will the next time lol thanks again :slight_smile:

1 Like