Add shared test data builders and Qodana configuration

- Extract per-monitor *TestData helper classes and rework tests to use them
- Add boiler run-time tracker abstraction (implementation pending)
- Drop unused NordPool init/update-result types and stale PLAN.md
- Add qodana.yaml with the inspection set to keep the analysis focused
This commit is contained in:
2026-11-29 21:30:13 +02:00
parent 1152462765
commit 5777e641f6
79 changed files with 7162 additions and 3196 deletions
@@ -37,14 +37,14 @@
</Target>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="16.1.1" />
<PackageReference Include="NetDaemon.AppModel" Version="26.11.0" />
<PackageReference Include="NetDaemon.Runtime" Version="26.11.0" />
<PackageReference Include="NetDaemon.HassModel" Version="26.11.0" />
<PackageReference Include="NetDaemon.Client" Version="26.11.0" />
<PackageReference Include="NetDaemon.Extensions.Scheduling" Version="26.11.0" />
<PackageReference Include="NetDaemon.Extensions.Logging" Version="26.11.0" />
<PackageReference Include="NetDaemon.Extensions.Tts" Version="26.11.0" />
<PackageReference Include="AutoMapper" Version="17.0.0" />
<PackageReference Include="NetDaemon.AppModel" Version="26.43.1" />
<PackageReference Include="NetDaemon.Runtime" Version="26.43.1" />
<PackageReference Include="NetDaemon.HassModel" Version="26.43.1" />
<PackageReference Include="NetDaemon.Client" Version="26.43.1" />
<PackageReference Include="NetDaemon.Extensions.Scheduling" Version="26.43.1" />
<PackageReference Include="NetDaemon.Extensions.Logging" Version="26.43.1" />
<PackageReference Include="NetDaemon.Extensions.Tts" Version="26.43.1" />
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -181,7 +181,7 @@ public sealed class MqttRecreateApp
try
{
_logger.LogInformation("Recreating PowerMonitor MQTT entities");
await entityService.CleanupEntitiesAsync().ConfigureAwait(false);
await entityService.RemoveSystemEntitiesAsync().ConfigureAwait(false);
await Task.Delay(TimeSpan.FromSeconds(1));
await entityService.CreateSystemEntitiesAsync().ConfigureAwait(false);
await entityService.ResetEntitiesAsync().ConfigureAwait(false);
+4 -14
View File
@@ -1,17 +1,7 @@
{
"Serilog": {
"MinimumLevel": {
"Default": "Warning",
"Override": {
"System.Net.Http.HttpClient": "Warning",
"NordPoolManager": "Information",
"PowerMonitorManager": "Information",
"BoilerMonitorManager": "Information",
"ShowerMonitorManager": "Information",
"LightMonitorManager": "Information",
"BatteryMonitorManager": "Information",
"LeakMonitorManager": "Information"
}
"Default": "Warning"
},
"WriteTo": [
{
@@ -41,7 +31,7 @@
"MainHomeHumidityEntityId": "sensor.main_home_humidity",
"BathroomTemperatureEntityId": "sensor.bathroom_temperature",
"ExhaustFanEntityId": "switch.exhaust_fan",
"PollIntervalSeconds": 30,
"PollIntervalSeconds": 5,
"SpikeRateThreshold": 4.0,
"MinDifferentialHumidity": 8.0,
"PeakHumidityThreshold": 58.0,
@@ -70,13 +60,13 @@
"NotificationCooldownMinutes": 5
},
"PowerMonitor": {
"Enabled": true,
"Enabled": false,
"MainMeterEntityId": "sensor.sonoff_100267d63f_power",
"PollIntervalSeconds": 1,
"SmoothingWindowSize": 10,
"AnomalyThresholdWatts": 500,
"HighPowerThresholdWatts": 6000,
"EnforceLimitEnabled": true,
"EnforceLimitEnabled": false,
"PowerLimitWatts": 5500,
"RecoverySeconds": 600,
"LimitCooldownSeconds": 30,
+1 -1
View File
@@ -45,7 +45,7 @@ try
.AddAutoMapper(config =>
{
config.LicenseKey =
"eyJhbGciOiJSUzI1NiIsImtpZCI6Ikx1Y2t5UGVubnlTb2Z0d2FyZUxpY2Vuc2VLZXkvYmJiMTNhY2I1OTkwNGQ4OWI0Y2IxYzg1ZjA4OGNjZjkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2x1Y2t5cGVubnlzb2Z0d2FyZS5jb20iLCJhdWQiOiJMdWNreVBlbm55U29mdHdhcmUiLCJleHAiOiIxNzk1NDc4NDAwIiwiaWF0IjoiMTc2NDAwNTE3OSIsImFjY291bnRfaWQiOiIwMTlhYjZlNjFjZWM3ZjhhYWQzMjE4ZmQ0ODdkYTgwNiIsImN1c3RvbWVyX2lkIjoiY3RtXzAxa2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