ATTR_SENSOR_DIRTY_LEFT = 'sensor_dirty_left' ATTR_CLEANING_COUNT = 'cleaning_count' ATTR_CLEANED_TOTAL_AREA = 'total_cleaned_area' ATTR_CLEANING_TOTAL_TIME = 'total_cleaning_time' ATTR_ERROR = 'error' ATTR_RC_DURATION = 'duration' ATTR_RC_ROTATION = 'rotation' ATTR_RC_VELOCITY = 'velocity' ATTR_STATUS = 'status' ATTR_ZONE_ARRAY = 'zone' ATTR_ZONE_REPEATER = 'repeats' SERVICE_SCHEMA_REMOTE_CONTROL = VACUUM_SERVICE_SCHEMA.extend({ vol.Optional(ATTR_RC_VELOCITY): vol.All(vol.Coerce(float), vol.Clamp(min=-0.29, max=0.29)), vol.Optional(ATTR_RC_ROTATION): vol.All(vol.Coerce(int), vol.Clamp(min=-179, max=179)), vol.Optional(ATTR_RC_DURATION): cv.positive_int, }) SERVICE_SCHEMA_CLEAN_ZONE = VACUUM_SERVICE_SCHEMA.extend({ vol.Required(ATTR_ZONE_ARRAY): vol.All(list, [vol.ExactSequence( [vol.Coerce(int), vol.Coerce(int), vol.Coerce(int), vol.Coerce(int)])]), vol.Required(ATTR_ZONE_REPEATER): vol.All(vol.Coerce(int), vol.Clamp(min=1, max=3)), }) SERVICE_SCHEMA_CLEAN_ZONE = VACUUM_SERVICE_SCHEMA.extend({ vol.Required(ATTR_ZONE_ARRAY):
ATTR_DO_NOT_DISTURB_END = 'do_not_disturb_end' ATTR_MAIN_BRUSH_LEFT = 'main_brush_left' ATTR_SIDE_BRUSH_LEFT = 'side_brush_left' ATTR_FILTER_LEFT = 'filter_left' ATTR_CLEANING_COUNT = 'cleaning_count' ATTR_CLEANED_TOTAL_AREA = 'total_cleaned_area' ATTR_CLEANING_TOTAL_TIME = 'total_cleaning_time' ATTR_ERROR = 'error' ATTR_RC_DURATION = 'duration' ATTR_RC_ROTATION = 'rotation' ATTR_RC_VELOCITY = 'velocity' SERVICE_SCHEMA_REMOTE_CONTROL = VACUUM_SERVICE_SCHEMA.extend({ vol.Optional(ATTR_RC_VELOCITY): vol.All(vol.Coerce(float), vol.Clamp(min=-0.29, max=0.29)), vol.Optional(ATTR_RC_ROTATION): vol.All(vol.Coerce(int), vol.Clamp(min=-179, max=179)), vol.Optional(ATTR_RC_DURATION): cv.positive_int, }) SERVICE_TO_METHOD = { SERVICE_START_REMOTE_CONTROL: {'method': 'async_remote_control_start'}, SERVICE_STOP_REMOTE_CONTROL: {'method': 'async_remote_control_stop'}, SERVICE_MOVE_REMOTE_CONTROL: { 'method': 'async_remote_control_move', 'schema': SERVICE_SCHEMA_REMOTE_CONTROL}, SERVICE_MOVE_REMOTE_CONTROL_STEP: { 'method': 'async_remote_control_move_step', 'schema': SERVICE_SCHEMA_REMOTE_CONTROL}, }
ATTR_DO_NOT_DISTURB = 'do_not_disturb' ATTR_MAIN_BRUSH_LEFT = 'main_brush_left' ATTR_SIDE_BRUSH_LEFT = 'side_brush_left' ATTR_FILTER_LEFT = 'filter_left' ATTR_CLEANING_COUNT = 'cleaning_count' ATTR_CLEANED_TOTAL_AREA = 'total_cleaned_area' ATTR_CLEANING_TOTAL_TIME = 'total_cleaning_time' ATTR_ERROR = 'error' ATTR_RC_DURATION = 'duration' ATTR_RC_ROTATION = 'rotation' ATTR_RC_VELOCITY = 'velocity' SERVICE_SCHEMA_REMOTE_CONTROL = VACUUM_SERVICE_SCHEMA.extend({ vol.Optional(ATTR_RC_VELOCITY): vol.All(vol.Coerce(float), vol.Clamp(min=-0.29, max=0.29)), vol.Optional(ATTR_RC_ROTATION): vol.All(vol.Coerce(int), vol.Clamp(min=-179, max=179)), vol.Optional(ATTR_RC_DURATION): cv.positive_int, }) SERVICE_TO_METHOD = { SERVICE_START_REMOTE_CONTROL: { 'method': 'async_remote_control_start' }, SERVICE_STOP_REMOTE_CONTROL: { 'method': 'async_remote_control_stop' }, SERVICE_MOVE_REMOTE_CONTROL: { 'method': 'async_remote_control_move', 'schema': SERVICE_SCHEMA_REMOTE_CONTROL },