Skip to content

Commit

Permalink
Update entity.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SukramJ committed Sep 30, 2024
1 parent 7dcd3dc commit 4c950cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hahomematic/platforms/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ async def wrapper(*args: Any, **kwargs: Any) -> Any:
)
return return_value

setattr(func, "__service", True)
setattr(func, "ha_service", True)
return wrapper # type: ignore[return-value]

return decorator
Expand Down Expand Up @@ -874,7 +874,7 @@ async def wrapper(*args: P.args, **kwargs: P.kwargs) -> T:
)
raise

setattr(func, "__service", True)
setattr(wrapper, "ha_service", True)
return wrapper

return decorator
Expand All @@ -887,5 +887,5 @@ def get_service_calls(obj: object) -> dict[str, Callable]:
for name in dir(obj)
if not name.startswith("_")
and callable(getattr(obj, name))
and hasattr(getattr(obj, name), "__service")
and hasattr(getattr(obj, name), "ha_service")
}

0 comments on commit 4c950cf

Please sign in to comment.