Skip to content

Commit ffbb7a2

Browse files
DavidCraftDevCopilot
authored andcommitted
Fix error of the Powerfox integration in combination with the new Powerfox FLOW adapter (home-assistant#150429)
Co-authored-by: Copilot <[email protected]>
1 parent 2ad470d commit ffbb7a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

homeassistant/components/powerfox/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import asyncio
66

7-
from powerfox import Powerfox, PowerfoxConnectionError
7+
from powerfox import DeviceType, Powerfox, PowerfoxConnectionError
88

99
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, Platform
1010
from homeassistant.core import HomeAssistant
@@ -31,7 +31,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: PowerfoxConfigEntry) ->
3131
raise ConfigEntryNotReady from err
3232

3333
coordinators: list[PowerfoxDataUpdateCoordinator] = [
34-
PowerfoxDataUpdateCoordinator(hass, entry, client, device) for device in devices
34+
PowerfoxDataUpdateCoordinator(hass, entry, client, device)
35+
for device in devices
36+
# Filter out gas meter devices (Powerfox FLOW adapters) as they are not yet supported and cause integration failures
37+
if device.type != DeviceType.GAS_METER
3538
]
3639

3740
await asyncio.gather(

0 commit comments

Comments
 (0)