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_configuration
dict 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.- log
logging.Logger The logger to pass on to the sensor.
- device_configuration
- Returns:
- sensor
BaseSensor The sensor to connect to.
- sensor
- Raises:
KeyErrorIn case the device configuration doesn’t have the sensor type key or the sensor type is not present in the sensor registry.