Skip to content

Commit eb93744

Browse files
committed
sync_decorator type hint fix
1 parent 6272e08 commit eb93744

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

appdaemon/plugins/hass/hassapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ def get_service_info(self, service: str) -> dict | None:
462462
else:
463463
self.logger.warning("Service info not found for domain '%s", domain)
464464

465+
@utils.sync_decorator
465466
async def call_service(
466467
self,
467468
service: str,
@@ -1215,7 +1216,7 @@ def get_calendar_events(
12151216
entity_id=entity_id,
12161217
duration=duration,
12171218
)
1218-
if res['success']:
1219+
if isinstance(res, dict) and res['success']:
12191220
return [
12201221
{
12211222
k: datetime.fromisoformat(v) if k in ('start', 'end') else v

0 commit comments

Comments
 (0)