Apply code formatting cleanup across monitor projects

- Reindent appsettings.json and the MSBuild project files
- Collapse single-statement guard blocks and tidy using and member order
- Normalize XML doc indentation and file endings
- Reorder BatteryMonitor test-data helpers and move the exclusion tests into
  their own region
- Carry the same formatting through the boiler config, control, entity and
  test files
This commit is contained in:
2026-11-30 11:52:06 +02:00
parent cf8c9434c8
commit 24729ee267
165 changed files with 2513 additions and 2470 deletions
+9 -9
View File
@@ -1,21 +1,22 @@
using System.Reactive.Concurrency;
using BatteryMonitor.Models;
using BatteryMonitorManager.Interface;
using BatteryMonitorManager.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using NetDaemon.AppModel;
using NetDaemon.Extensions.Scheduler;
using BatteryMonitorManager.Interface;
using BatteryMonitorManager.Models;
namespace BatteryMonitorManager;
[NetDaemonApp]
public sealed class BatteryMonitorInit
{
private readonly ILogger<BatteryMonitorInit> _logger;
private readonly IScheduler _scheduler;
private readonly IBatterySensorDiscoveryService _discoveryService;
private readonly ILogger<BatteryMonitorInit> _logger;
private readonly IBatteryNotificationService _notificationService;
private readonly BatteryMonitorOptions _options;
private readonly IScheduler _scheduler;
public BatteryMonitorInit(
ILogger<BatteryMonitorInit> logger,
@@ -55,9 +56,8 @@ public sealed class BatteryMonitorInit
CheckAndNotify();
if (_logger.IsEnabled(LogLevel.Information))
{
_logger.LogInformation("BatteryMonitor initialized with threshold {Threshold}%", _options.BatteryThresholdPercent);
}
_logger.LogInformation("BatteryMonitor initialized with threshold {Threshold}%",
_options.BatteryThresholdPercent);
}
catch (Exception ex)
{
@@ -68,7 +68,7 @@ public sealed class BatteryMonitorInit
private void ScheduleDailyCheck()
{
_scheduler.ScheduleCron(BatteryMonitor.Models.BatteryMonitorConsts.DailyCheckCron, () =>
_scheduler.ScheduleCron(BatteryMonitorConsts.DailyCheckCron, () =>
{
try
{
@@ -98,4 +98,4 @@ public sealed class BatteryMonitorInit
_logger.LogDebug("No low battery devices found");
}
}
}
}