mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Removed service decorator from event decorators
This commit is contained in:
@@ -12,18 +12,6 @@ def _callback(action, *args, **kwargs):
|
|||||||
action(HASS, *args, **kwargs)
|
action(HASS, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def service(domain, service_name):
|
|
||||||
""" Decorator factory to register a service """
|
|
||||||
|
|
||||||
def register_service_decorator(action):
|
|
||||||
""" Decorator to register a service """
|
|
||||||
HASS.services.register(domain, service_name,
|
|
||||||
functools.partial(_callback, action))
|
|
||||||
return action
|
|
||||||
|
|
||||||
return register_service_decorator
|
|
||||||
|
|
||||||
|
|
||||||
def track_state_change(entity_ids, from_state=None, to_state=None):
|
def track_state_change(entity_ids, from_state=None, to_state=None):
|
||||||
""" Decorator factory to track state changes for entity id """
|
""" Decorator factory to track state changes for entity id """
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user