diff --git a/assets/icons/detection_distance_icon.svg b/assets/icons/detection_distance_icon.svg
new file mode 100644
index 0000000..9b0faa1
--- /dev/null
+++ b/assets/icons/detection_distance_icon.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/icons/disappe_delay_icon.svg b/assets/icons/disappe_delay_icon.svg
new file mode 100644
index 0000000..c65fc5a
--- /dev/null
+++ b/assets/icons/disappe_delay_icon.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/icons/indent_level_icon.svg b/assets/icons/indent_level_icon.svg
new file mode 100644
index 0000000..837cdac
--- /dev/null
+++ b/assets/icons/indent_level_icon.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/target_confirm_time_icon.svg b/assets/icons/target_confirm_time_icon.svg
new file mode 100644
index 0000000..6114165
--- /dev/null
+++ b/assets/icons/target_confirm_time_icon.svg
@@ -0,0 +1,21 @@
+
diff --git a/assets/icons/trigger_level_icon.svg b/assets/icons/trigger_level_icon.svg
new file mode 100644
index 0000000..56e343e
--- /dev/null
+++ b/assets/icons/trigger_level_icon.svg
@@ -0,0 +1,23 @@
+
diff --git a/lib/features/devices/bloc/flush_sensor_bloc/flush_sensor_bloc.dart b/lib/features/devices/bloc/flush_sensor_bloc/flush_sensor_bloc.dart
new file mode 100644
index 0000000..28fafce
--- /dev/null
+++ b/lib/features/devices/bloc/flush_sensor_bloc/flush_sensor_bloc.dart
@@ -0,0 +1,129 @@
+import 'dart:async';
+import 'dart:developer';
+import 'package:firebase_database/firebase_database.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart';
+import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_state.dart';
+import 'package:syncrow_app/features/devices/model/device_control_model.dart';
+import 'package:syncrow_app/features/devices/model/device_model.dart';
+import 'package:syncrow_app/features/devices/model/flush_sensor_model.dart';
+import 'package:syncrow_app/features/devices/model/status_model.dart';
+import 'package:syncrow_app/services/api/devices_api.dart';
+
+class FlushSensorBloc extends Bloc {
+ final String deviceId;
+ late DeviceModel deviceModel;
+ late FlushSensorModel deviceStatus;
+
+ FlushSensorBloc({required this.deviceId}) : super(InitialState()) {
+ on(_fetchFlushSensorStatus);
+ on(_changeIndicator);
+ on(_changeValue);
+ on(_flushSensorUpdated);
+ on(_getDeviceReports);
+ }
+
+ void _fetchFlushSensorStatus(
+ InitialEvent event, Emitter emit) async {
+ emit(LoadingInitialState());
+ try {
+ var response = await DevicesAPI.getDeviceStatus(deviceId);
+ List statusModelList = [];
+ for (var status in response['status']) {
+ statusModelList.add(StatusModel.fromJson(status));
+ }
+ deviceStatus = FlushSensorModel.fromJson(statusModelList);
+ emit(UpdateState(flushSensorModel: deviceStatus));
+ _listenToChanges();
+ } catch (e) {
+ emit(FailedState(error: e.toString()));
+ return;
+ }
+ }
+
+ StreamSubscription? _streamSubscription;
+
+ void _listenToChanges() {
+ try {
+ _streamSubscription?.cancel();
+ DatabaseReference ref =
+ FirebaseDatabase.instance.ref('device-status/$deviceId');
+ Stream stream = ref.onValue;
+
+ _streamSubscription = stream.listen((DatabaseEvent event) async {
+ Map usersMap =
+ event.snapshot.value as Map;
+ List statusList = [];
+ usersMap['status'].forEach((element) {
+ statusList
+ .add(StatusModel(code: element['code'], value: element['value']));
+ });
+ deviceStatus = FlushSensorModel.fromJson(statusList);
+ if (!isClosed) {
+ add(WallSensorUpdatedEvent());
+ }
+ });
+ } catch (_) {
+ log(
+ 'Error listening to changes',
+ name: 'FlushMountedPresenceSensorBloc._listenToChanges',
+ );
+ }
+ }
+
+ @override
+ Future close() async {
+ _streamSubscription?.cancel();
+ _streamSubscription = null;
+ return super.close();
+ }
+
+ _flushSensorUpdated(
+ WallSensorUpdatedEvent event, Emitter emit) {
+ emit(UpdateState(flushSensorModel: deviceStatus));
+ }
+
+ void _changeIndicator(
+ ChangeIndicatorEvent event, Emitter emit) async {
+ emit(LoadingNewSate(flushSensorModel: deviceStatus));
+ try {
+ final response = await DevicesAPI.controlDevice(
+ DeviceControlModel(
+ deviceId: deviceId, code: 'indicator', value: !event.value),
+ deviceId);
+
+ } catch (e) {
+ emit(FailedState(error: e.toString()));
+ return;
+ }
+ emit(UpdateState(flushSensorModel: deviceStatus));
+ }
+
+ void _changeValue(
+ ChangeValueEvent event, Emitter emit) async {
+ emit(LoadingNewSate(flushSensorModel: deviceStatus));
+ try {
+ final response = await DevicesAPI.controlDevice(
+ DeviceControlModel(
+ deviceId: deviceId, code: event.code, value: event.value),
+ deviceId);
+ } catch (e) {
+ emit(FailedState(error: e.toString()));
+ return;
+ }
+ emit(UpdateState(flushSensorModel: deviceStatus));
+ }
+
+ void _getDeviceReports(
+ GetDeviceReportsEvent event, Emitter emit) async {
+ emit(LoadingInitialState());
+ try {
+ await DevicesAPI.getDeviceReports(deviceId, event.code).then((value) {
+ emit(DeviceReportsState(deviceReport: value, code: event.code));
+ });
+ } catch (e) {
+ emit(FailedState(error: e.toString()));
+ return;
+ }
+ }
+}
diff --git a/lib/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart b/lib/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart
new file mode 100644
index 0000000..99c5aa5
--- /dev/null
+++ b/lib/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart
@@ -0,0 +1,43 @@
+import 'package:equatable/equatable.dart';
+
+abstract class FlushSensorEvent extends Equatable {
+ const FlushSensorEvent();
+
+ @override
+ List