Add 'auto mode' button to the air alarm ui (#17874)
Signed-off-by: c4llv07e <kseandi@gmail.com>
This commit is contained in:
@@ -33,6 +33,7 @@ public sealed class AirAlarmBoundUserInterface : BoundUserInterface
|
||||
_window.AtmosDeviceDataChanged += OnDeviceDataChanged;
|
||||
_window.AtmosAlarmThresholdChanged += OnThresholdChanged;
|
||||
_window.AirAlarmModeChanged += OnAirAlarmModeChanged;
|
||||
_window.AutoModeChanged += OnAutoModeChanged;
|
||||
_window.ResyncAllRequested += ResyncAllDevices;
|
||||
_window.AirAlarmTabChange += OnTabChanged;
|
||||
}
|
||||
@@ -52,6 +53,11 @@ public sealed class AirAlarmBoundUserInterface : BoundUserInterface
|
||||
SendMessage(new AirAlarmUpdateAlarmModeMessage(mode));
|
||||
}
|
||||
|
||||
private void OnAutoModeChanged(bool enabled)
|
||||
{
|
||||
SendMessage(new AirAlarmUpdateAutoModeMessage(enabled));
|
||||
}
|
||||
|
||||
private void OnThresholdChanged(string address, AtmosMonitorThresholdType type, AtmosAlarmThreshold threshold, Gas? gas = null)
|
||||
{
|
||||
SendMessage(new AirAlarmUpdateAlarmThresholdMessage(address, type, threshold, gas));
|
||||
|
||||
Reference in New Issue
Block a user