Skip to content

Commit

Permalink
Fix merge breakages & lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gdgib committed Jan 6, 2025
1 parent b79a69a commit 1953e88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion custom_components/vesync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ async def async_update_data():
hass.data[DOMAIN][config_entry.entry_id]["coordinator"] = coordinator

device_dict = await async_process_devices(hass, manager)
platforms_list: list = []

for p, vs_p in PLATFORMS.items():
hass.data[DOMAIN][config_entry.entry_id][vs_p] = []
Expand Down Expand Up @@ -117,7 +118,10 @@ async def _add_new_devices(platform: str) -> None:
_add_new_devices(k)

if platforms_to_setup:
await hass.config_entries.async_forward_entry_setups(config_entry, platforms_to_setup)
await hass.config_entries.async_forward_entry_setups(
config_entry, platforms_to_setup
)


hass.services.async_register(
DOMAIN, SERVICE_UPDATE_DEVS, async_new_device_discovery
Expand Down
9 changes: 7 additions & 2 deletions custom_components/vesync/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@ def __init__(self, fan, coordinator) -> None:
def supported_features(self):
"""Flag supported features."""
return (
FanEntityFeature.TURN_ON | FanEntityFeature.TURN_OFF | FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
| FanEntityFeature.SET_SPEED
| FanEntityFeature.PRESET_MODE
if self.speed_count > 1
else FanEntityFeature.TURN_ON | FanEntityFeature.TURN_OFF | FanEntityFeature.SET_SPEED
else FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
| FanEntityFeature.SET_SPEED
)

@property
Expand Down

0 comments on commit 1953e88

Please sign in to comment.