def remove_device_service(call):
    'Service to remove a sub-device from the gateway.'
    device_id = call.data.get(ATTR_DEVICE_ID)
    gateway = call.data.get(ATTR_GW_MAC)
    gateway.write_to_hub(gateway.sid, remove_device=device_id)
Service to remove a sub-device from the gateway.
def remove_device_service(call):
    
    device_id = call.data.get(ATTR_DEVICE_ID)
    gateway = call.data.get(ATTR_GW_MAC)
    gateway.write_to_hub(gateway.sid, remove_device=device_id)