Not wishing to derail the thread, I personally find the custom component ShellyForHass https://github.com/StyraHem/ShellyForHASS much more straightforward for integrating Shelly devices. Just install with HACS, add
shelly:
to configuration.yaml and restart Home Assistant.
Then, all Shelly devices will show up automatically. Search for shelly under Configuration/Devices from the frontend, and you’ll see them. If you add more Shelly devices to your WiFi network, they’ll show up automatically the same way. You don’t have to restart HA again.
You also don’t need to configure MQTT in the Shelly settings, nor do you need to have the cloud enabled. But you can have both of those enabled for other purposes if you’d like.
The weak point of SHellyForHASS integration is that it creates sensors/switches controlled by REST API which is less sufficient comparing to MQTT. I wish it will help with mqtt.
I still suggest to use manually configured mqtt switches/sensors. I’m curious how many hours more guys will spend with integration which is intended to save time.
Just out of curiosity, what makes sufficiency (efficiency?) important in this case? I don’t notice any latency that may be due to using the REST API, and the impact on WiFi traffic must be minimal. Is there an important point that I’m missing? Cheers.
The fact you don’t notice latency doesn’t mean it may not exist. Also it should be obvious that polling data with some frequency, getting the same values at most time is waste of resources.
Of course it doesn’t mean you will experience delays or it will affect you in any other way. It’s just suboptimal approach: anti-pattern
Using data gateway pattern (mqtt) makes system easier to maintain and secure.
In REST approach a controller (application) needs to maintain addresses of all known devices. In MQTT approach all devices work with one, the same MQTT server. Isn’t it less complex and easier to maintain?
Likely there are more reasons. I have no doubt gateway pattern has cons too. For sure you can find discussion about it on this forum or over Internet.
And I also see a bunch of exclamation marks in the entities-subTab.
So still work to do, but first I have a drink on this nice intermediate result.
After that I am going to try to implement a few simple use cases with MQTT, automations, scripts and scenes. First case: switch all my three devices simultaneous on / off after receiving an on/off message via the broker sent by a remote Rpi.
Any clues regarding the logErrors and exclamation marks?
The overview is changed, looking better and I now am able to control my devices from “the dashboard”, witch is pretty cool! I guess an extra reboot was needed to complete the configuration.
Errors in the log are still there.
Do I understand that you are updating the script for this?