create_sensor

lsst.ts.ess.common.sensor.create_sensor(device_configuration: dict[str, Any], log: Logger) BaseSensor

Create the sensor to connect to by using the specified configuration.

Parameters
device_configurationdict

A dict representing the device to connect to. The format of the dict is described in the devices part of lsst.ts.ess.common.CONFIG_SCHEMA.

loglogging.Logger

The logger to pass on to the sensor.

Returns
sensorBaseSensor

The sensor to connect to.

Raises
KeyError

In case the device configuration doesn’t have the sensor type key or the sensor type is not present in the sensor registry.