I have a device which I created in ESPHome, after connecting it gets discovered by HA and added but no entities show up. I can see from the log on the device it thinkgs its publishing the state, and for another sensor showing a similar publish those sensors show up without any problems. I cant see any errors in either ESPHome or HA which gives me anything to go on. Any suggestions would be greatly appreciated:
10:57:48][D][api:102]: Accepted ::FFFF:10.0.0.200
[10:57:50][D][sensor:125]: 'RealPowerSensor': Sending state -0.80951 W with 2 decimals of accuracy
[10:57:50][D][sensor:125]: 'ApparentPowerSensor': Sending state 8.39622 VA with 2 decimals of accuracy
[10:57:50][D][sensor:125]: 'PowerFactor': Sending state -0.09641 with 2 decimals of accuracy
[10:57:50][D][sensor:125]: 'Voltage': Sending state 240.29095 V with 2 decimals of accuracy
[10:57:50][D][sensor:125]: 'Current': Sending state 0.03494 A with 2 decimals of accuracy
[10:57:50][D][api.connection:827]: Home Assistant 2022.6.7 (::FFFF:10.0.0.200): Connected successfully
[10:57:52][D][sensor:125]: 'RealPowerSensor': Sending state -0.69010 W with 2 decimals of accuracy
[10:57:52][D][sensor:125]: 'ApparentPowerSensor': Sending state 8.28012 VA with 2 decimals of accuracy
[10:57:52][D][sensor:125]: 'PowerFactor': Sending state -0.08334 with 2 decimals of accuracy
[10:57:52][D][sensor:125]: 'Voltage': Sending state 236.98177 V with 2 decimals of accuracy
[10:57:52][D][sensor:125]: 'Current': Sending state 0.03494 A with 2 decimals of accuracy
In HA, going to Settings → Devices & Services → Select the device in the ESPHome block, then click on the 1 device link gives me device info:
Device info
esp32-c3-devkitm-1
by espressif
Firmware: 2022.3.1 (Jul 5 2022, 10:53:35)
If that doesn’t do the trick use the same menu to delete the device from ha and than add it again to see if it makes a difference.
And just to be sure you maybe want to one more sensor that isn’t part of your custom one just to rule out it is a problem with that custom platform, maybe add a safe mode button, always worth it
I have tried that unforunatly. I have also done delete from ESPHome, delete integration, clean and rebuild in esphome, when I install the firmware again it gets picked up again with the same result.
I do have another sensor with a lambda as well, and that one works fine which is the bit that really confuses me
Well, at this point to get rid (just for test) of your custom sensor to see if the button still isn’t available is the best choice to narrow done the troublesome component
Yes, it does seem that the custom sensor is the cause. If I remove the custom sensor the button shows up. If I then put the custom sensor back, then neither the button or the sensors shows up