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
@@ -15,8 +15,8 @@ public class ExhaustFanControlServiceTests
private const string FanEntityId = "switch.exhaust_fan";
private readonly ShowerMonitorOptions _defaultOptions = ShowerMonitorTestData.CreateOptions();
private readonly FakeTimeProvider _timeProvider = ShowerMonitorTestData.CreateTimeProvider();
private readonly Mock<IHaContext> _haContextMock = new();
private readonly FakeTimeProvider _timeProvider = ShowerMonitorTestData.CreateTimeProvider();
private DateTimeOffset Now => _timeProvider.GetUtcNow();
@@ -237,7 +237,7 @@ public class ExhaustFanControlServiceTests
[InlineData(null)]
public void Evaluate_WithConfiguredFanEntityId_TargetsThatExactEntity(string? entityId)
{
var service = CreateService(ShowerMonitorTestData.CreateOptions(exhaustFanEntityId: entityId!));
var service = CreateService(ShowerMonitorTestData.CreateOptions(entityId!));
service.Evaluate(ShowerState.Active, Now);
@@ -264,17 +264,17 @@ public class ExhaustFanControlServiceTests
{
var targets = _haContextMock.Invocations
.Where(invocation => invocation.Method.Name == nameof(IHaContext.CallService)
&& (string?)invocation.Arguments[0] == "switch"
&& (string?)invocation.Arguments[1] == service)
&& (string?)invocation.Arguments[0] == "switch"
&& (string?)invocation.Arguments[1] == service)
.Select(invocation => (ServiceTarget?)invocation.Arguments[2])
.ToList();
targets.Should().HaveCount(expectedCount, because);
targets.Should().OnlyContain(
target => target != null
&& target.EntityIds != null
&& target.EntityIds.Count == 1
&& target.EntityIds.Single() == expectedEntityId,
&& target.EntityIds != null
&& target.EntityIds.Count == 1
&& target.EntityIds.Single() == expectedEntityId,
because);
}
}
}