Hi!
It’s possible, by somehow, to have both MQTT and API enabled?
Let me explain: I don’t want to use HA + ESPHome using MQTT, I’m already using API and it’s perfect.
The reason for using MQTT is because I need to read some sensor running ESPHome into my weather station (that subscribe to some MQTT topics)…so I need to publish just some sensor from ESPHome into my weather station using MQTT.
Is that possible??
I’m using mqtt: key…but this creates 2 devices in my HA and only one works…also, everything get’s duplicated and device (ESPHome) keeps rebooting, which is the correct behavior:
Warning
If you enable MQTT and you do not use the “native API” for Home Assistant, you must remove the api: line from your ESPHome configuration, otherwise the ESP will reboot every 15 minutes because no client connected to the native API.
If I understand correct you are using HA API for this node. And need MQTT for your weather station.
As long as there is a API connection to the node, nothing will happen. The reboot will only occur, if no HA API connection is available.
OK, that’s a quick short answer. Can you give a more specific point to review. “MQTT Component” is several pages long. I have read it, but, to digest it in one view isn’t that easy.
Thanks for adding a pointer to what you think answers this excellent question. I don’t understand/know why MQTT and the API can’t coincide.
If you are using API and MQTT you will end with to devices in HA. One is created from API integration and one is created from MQTT.
Device creation could be disabled with discovery: false