Skip to content

Commit a8ce0e7

Browse files
Simplify services
1 parent ab1e270 commit a8ce0e7

File tree

3 files changed

+174
-171
lines changed

3 files changed

+174
-171
lines changed

custom_components/battery_notes/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
)
5252
from .discovery import DiscoveryManager
5353
from .library_updater import LibraryUpdater
54-
from .services import setup_services
54+
from .services import async_setup_services
5555
from .store import (
5656
async_get_registry,
5757
)
@@ -138,7 +138,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
138138
_LOGGER.debug("Auto discovery disabled")
139139

140140
# Register custom services
141-
setup_services(hass)
141+
async_setup_services(hass)
142142

143143
return True
144144

custom_components/battery_notes/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Common functions for battery_notes."""
22

3-
import datetime
3+
from datetime import datetime
44

55
from homeassistant.helpers.device_registry import DeviceEntry
66
from homeassistant.util import dt as dt_util

0 commit comments

Comments
 (0)