def track_sunrise(offset=None):
 def track_sunrise_decorator(action):
  'Decorator to track sunrise events.'
  event.track_sunrise(HASS, functools.partial(action, HASS), offset)
  return action
 return track_sunrise_decorator

def track_sunrise ( offset = None ) : def track_sunrise_decorator ( action ) : event . track_sunrise ( HASS , functools . partial ( action , HASS ) , offset ) return action return track_sunrise_decorator
decorator factory to track sunrise events .