custom_components/broadlinkcover/cover.py
def devices_from_config(domain_config):
    """Parse configuration and add cover devices."""
    devices = []
    for device_id, config in domain_config[CONF_DEVICES].items():
        name = config.pop(CONF_NAME)
        travel_time_down = config.pop(CONF_TRAVELLING_TIME_DOWN)
        travel_time_up = config.pop(CONF_TRAVELLING_TIME_UP)
        open_script_entity_id = config.pop(CONF_OPEN_SCRIPT_ENTITY_ID)
        close_script_entity_id = config.pop(CONF_CLOSE_SCRIPT_ENTITY_ID)
        stop_script_entity_id = config.pop(CONF_STOP_SCRIPT_ENTITY_ID)
        send_stop_at_ends = config.pop(CONF_SEND_STOP_AT_ENDS)
        device = CoverTimeBased(device_id, name, travel_time_down, travel_time_up, open_script_entity_id, close_script_entity_id, stop_script_entity_id, send_stop_at_ends)
        devices.append(device)
    return devices
Parse configuration and add cover devices.
Parse configuration and add cover devices.
Parse configuration and add cover devices .
def devices_from_config(domain_config):
    devices = []
    for device_id, config in domain_config[CONF_DEVICES].items():
        name = config.pop(CONF_NAME)
        travel_time_down = config.pop(CONF_TRAVELLING_TIME_DOWN)
        travel_time_up = config.pop(CONF_TRAVELLING_TIME_UP)
        open_script_entity_id = config.pop(CONF_OPEN_SCRIPT_ENTITY_ID)
        close_script_entity_id = config.pop(CONF_CLOSE_SCRIPT_ENTITY_ID)
        stop_script_entity_id = config.pop(CONF_STOP_SCRIPT_ENTITY_ID)
        send_stop_at_ends = config.pop(CONF_SEND_STOP_AT_ENDS)
        device = CoverTimeBased(device_id, name, travel_time_down, travel_time_up, open_script_entity_id, close_script_entity_id, stop_script_entity_id, send_stop_at_ends)
        devices.append(device)
    return devices
def devices_from_config ( domain_config ) : devices = [ ] for device_id , config in domain_config [ CONF_DEVICES ] . items ( ) : name = config . pop ( CONF_NAME ) travel_time_down = config . pop ( CONF_TRAVELLING_TIME_DOWN ) travel_time_up = config . pop ( CONF_TRAVELLING_TIME_UP ) open_script_entity_id = config . pop ( CONF_OPEN_SCRIPT_ENTITY_ID ) close_script_entity_id = config . pop ( CONF_CLOSE_SCRIPT_ENTITY_ID ) stop_script_entity_id = config . pop ( CONF_STOP_SCRIPT_ENTITY_ID ) send_stop_at_ends = config . pop ( CONF_SEND_STOP_AT_ENDS ) device = CoverTimeBased ( device_id , name , travel_time_down , travel_time_up , open_script_entity_id , close_script_entity_id , stop_script_entity_id , send_stop_at_ends ) devices . append ( device ) return devices
Parse configuration and add cover devices.
Parse configuration and add cover devices .
"""Parse configuration and add cover devices."""
domain_config