I got the shelly integration with a faster update interval working as a custom integration!
- Download the shelly integration from GitHub (whole folder) https://github.com/home-assistant/core/tree/dev/homeassistant/components/shelly
- Place it in the
\config\custom_components\shelly
folder of your HA installation. - Modifiy the
const.pyfile, in my case (Shelly 3EM) changing line 68
UPDATE_PERIOD_MULTIPLIER: Final = 2.2
to
UPDATE_PERIOD_MULTIPLIER: Final = 0.22
did the trick. - Modify the
manifest.jsonfile by adding a “version”, otherwise the custom integration won’t be loaded - Don’t forget the “,” after
"loggers": ["aioshelly"],
{
"domain": "shelly",
"name": "Shelly",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/shelly",
"requirements": ["aioshelly==1.0.9"],
"zeroconf": [
{
"type": "_http._tcp.local.",
"name": "shelly*"
}
],
"codeowners": ["@balloob", "@bieniu", "@thecode", "@chemelli74"],
"iot_class": "local_push",
"loggers": ["aioshelly"],
"version": "0.1.1.1" <-------------------------------
}
- Restart Home Assistant
- Enjoy faster sensor refresh rate
UPDATE:
I got rarely timeouts from the polling, so I also changed line 52 to a 10th of the value
POLLING_TIMEOUT_SEC: Final = 1.8
I will report if it didn’t work.
