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:
@@ -1,9 +1,9 @@
|
||||
using LightMonitor.Models;
|
||||
using LightMonitorManager.Interface;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NetDaemon.HassModel;
|
||||
using NetDaemon.HassModel.Entities;
|
||||
using LightMonitor.Models;
|
||||
using LightMonitorManager.Interface;
|
||||
|
||||
namespace LightMonitorManager;
|
||||
|
||||
@@ -22,9 +22,7 @@ public sealed class LightControlService(
|
||||
if (!string.Equals(sunState, LightMonitorConsts.SunBelowHorizon, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (logger.IsEnabled(LogLevel.Debug))
|
||||
{
|
||||
logger.LogDebug("Sun is not below horizon (state={SunState}), skipping light turn on", sunState);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -34,9 +32,7 @@ public sealed class LightControlService(
|
||||
if (string.Equals(lightState, LightMonitorConsts.LightOnState, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (logger.IsEnabled(LogLevel.Debug))
|
||||
{
|
||||
logger.LogDebug("Light {EntityId} is already on, skipping", _options.LightEntityId);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -44,8 +40,6 @@ public sealed class LightControlService(
|
||||
haContext.CallService("light", "turn_on", ServiceTarget.FromEntity(_options.LightEntityId));
|
||||
|
||||
if (logger.IsEnabled(LogLevel.Information))
|
||||
{
|
||||
logger.LogInformation("Light {EntityId} turned ON (dark outside + person home)", _options.LightEntityId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user