Retrieve instance of the sensor class.
(self, config=None, poll_interval=None)
| 39 | self.sensor_service = MockSensorService(sensor_wrapper=sensor_wrapper) |
| 40 | |
| 41 | def get_sensor_instance(self, config=None, poll_interval=None): |
| 42 | """ |
| 43 | Retrieve instance of the sensor class. |
| 44 | """ |
| 45 | kwargs = {"sensor_service": self.sensor_service} |
| 46 | |
| 47 | if config: |
| 48 | kwargs["config"] = config |
| 49 | |
| 50 | if poll_interval is not None: |
| 51 | kwargs["poll_interval"] = poll_interval |
| 52 | |
| 53 | instance = self.sensor_cls(**kwargs) # pylint: disable=not-callable |
| 54 | return instance |
| 55 | |
| 56 | def get_dispatched_triggers(self): |
| 57 | return self.sensor_service.dispatched_triggers |
nothing calls this directly
no outgoing calls
no test coverage detected