to_component

to_component(string)[source]

Convert the input string to a DeviceComponent instance.

Parameters:

string (str) – String to be converted.

Returns:

A DeviceComponent instance.

Raises:

ValueError – If input string is not a valid device component.

Return type:

DeviceComponent