<s> """<STR_LIT>""" <EOL> import functools <EOL> from homeassistant . helpers import event <EOL> HASS = None <EOL> def track_state_change ( entity_ids , from_state = None , to_state = None ) : <EOL> """<STR_LIT>""" <EOL> def track_state_change_decorator ( action ) : <EOL> """<STR_LIT>""" <EOL> event . track_state_change ( HASS , entity_ids , <EOL> functools . partial ( action , HASS ) , <EOL> from_state , to_state ) <EOL> return action <EOL> return track_state_change_decorator <EOL> def track_sunrise ( offset = None ) : <EOL> """<STR_LIT>""" <EOL> def track_sunrise_decorator ( action ) : <EOL> """<STR_LIT>""" <EOL> event . track_sunrise ( HASS , <EOL> functools . partial ( action , HASS ) , <EOL> offset ) <EOL> return action <EOL> return track_sunrise_decorator <EOL> def track_sunset ( offset = None ) : <EOL> """<STR_LIT>""" <EOL> def track_sunset_decorator ( action ) : <EOL> """<STR_LIT>""" <EOL> event . track_sunset ( HASS , <EOL> functools . partial ( action , HASS ) , <EOL> offset ) <EOL> return action <EOL> return track_sunset_decorator <EOL> def track_time_change ( year = None , month = None , day = None , hour = None , minute = None , <EOL> second = None ) : <EOL> """<STR_LIT>""" <EOL> def track_time_change_decorator ( action ) : <EOL> """<STR_LIT>""" <EOL> event . track_time_change ( HASS , <EOL> functools . partial ( action , HASS ) , <EOL> year , month , day , hour , minute , second ) <EOL> return action <EOL> return track_time_change_decorator <EOL> def track_utc_time_change ( year = None , month = None , day = None , hour = None , <EOL> minute = None , second = None ) : <EOL> """<STR_LIT>""" <EOL> def track_utc_time_change_decorator ( action ) : <EOL> """<STR_LIT>""" <EOL> event . track_utc_time_change ( HASS , <EOL> functools . partial ( action , HASS ) , <EOL> year , month , day , hour , minute , second ) <EOL> return action <EOL> return track_utc_time_change_decorator </s>
