feat: add BatteryMonitor implementation with discovery, notification, and scheduling services

This commit is contained in:
Marius
2026-04-01 10:55:33 +03:00
parent 11c2574235
commit 6e4d684359
114 changed files with 22820 additions and 527 deletions
@@ -10,8 +10,8 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerSwitchEntityId = "switch.boiler",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = 30,
HeatingPowerThresholdWatts = 5.0
};
@@ -25,7 +25,7 @@ public class BoilerMonitorConfigTests
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = null,
BoilerSwitchEntityId = "switch.boiler",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = 30,
HeatingPowerThresholdWatts = 5.0
};
@@ -38,7 +38,7 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = null,
PollIntervalSeconds = 30,
HeatingPowerThresholdWatts = 5.0
@@ -52,8 +52,8 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerSwitchEntityId = "switch.boiler",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = null,
HeatingPowerThresholdWatts = 5.0
};
@@ -66,8 +66,8 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerSwitchEntityId = "switch.boiler",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = 30,
HeatingPowerThresholdWatts = null
};
@@ -81,7 +81,7 @@ public class BoilerMonitorConfigTests
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = " ",
BoilerSwitchEntityId = "switch.boiler",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = 30,
HeatingPowerThresholdWatts = 5.0
};
@@ -94,8 +94,8 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerSwitchEntityId = "switch.boiler",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = 0,
HeatingPowerThresholdWatts = 5.0
};
@@ -108,8 +108,8 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerSwitchEntityId = "switch.boiler",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = 30,
HeatingPowerThresholdWatts = 0.0
};
@@ -122,8 +122,8 @@ public class BoilerMonitorConfigTests
{
var config = new BoilerMonitorConfig
{
BoilerPowerEntityId = "sensor.power",
BoilerSwitchEntityId = "switch.boiler",
BoilerPowerEntityId = "sensor.sonoff_1002230e32_power",
BoilerSwitchEntityId = "switch.sonoff_1002230e32",
PollIntervalSeconds = -1,
HeatingPowerThresholdWatts = 5.0
};