startGetSensorStateLoop method

Stream<SensorConfigStateEntity> startGetSensorStateLoop()

Starts a loop to continuously retrieve the sensor state.

Returns: A Stream of SensorConfigStateEntity that emits updates regarding the sensor's state.

Note: This method may block subsequent calls until the sensor state loop is stopped. Ensure to handle the stream appropriately to avoid memory leaks.

Implementation

Stream<SensorConfigStateEntity> startGetSensorStateLoop() {
  getSensorStateLoop = true;
  writeData(_buildGetNetStateJson());
  return _sensorConfigStateStream.stream;
}