Commit Graph

22 Commits

Author SHA1 Message Date
gitea_admin cf8c9434c8 Clear the residual Qodana findings
- Drop the leftover unused using, parameter and date-time attribute reader
- Merge the remaining enum guard into its pattern
- Make the NordPool price DTO init-only
- Replace the four non-serializable theory matrices with single tests that
  iterate the same rows, so xUnit can still report them
- Replace Array.Empty with collection expressions and drop unused locals,
  redundant default arguments and duplicated tuple names
- Throw from the unreachable shower default instead of an empty section
- Cover the configurable PowerMonitor option overrides in a test so the
  init setters have a caller
2026-11-29 21:49:21 +02:00
gitea_admin 17774b40b8 Convert test data sources to typed TheoryData
Replace untyped MemberData sources with TheoryData<...>, use collection
expressions for array and list literals, drop redundant casts and null
suppressions, and give log-assertion helpers an IsEnabled setup so guarded
log calls stay verifiable.
2026-11-29 21:42:41 +02:00
gitea_admin ada3c77778 Fix culture-sensitive parsing, log swallowing and closure capture
- DateTimeTypeConverter parses with the invariant culture instead of the
  ambient one (NordPool timestamps arrive as ISO-8601)
- Shower last-shower-time state is formatted with the invariant culture
- PresenceServiceTests no longer captures the loop variable in a Moq setup
- CheapestIntervalsFinderTests compare prices with a tolerance instead of
  floating-point equality
- MqttRecreateApp logs the unit_of_measurement read failure instead of
  silently swallowing every exception
- LightMonitorOptions moves to LightMonitor.Models so the namespace matches
  the project and file location
2026-11-29 21:31:45 +02:00
gitea_admin 5777e641f6 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
2026-11-29 21:30:13 +02:00
gitea_admin f176a1b8fc Add manual MQTT recreation and NordPool price fetch buttons 2026-07-08 16:56:32 +03:00
gitea_admin 2706a6b188 Refactor services to use DI for IHaContext and TimeProvider 2026-07-03 12:15:44 +03:00
gitea_admin e6bf8258bb Update 2026-06-28 13:58:35 +03:00
Marius 6e4d684359 feat: add BatteryMonitor implementation with discovery, notification, and scheduling services 2026-04-01 10:55:33 +03:00
Marius 11c2574235 feat: migrate boiler control implementation to BoilerMonitor namespace and add budget handling logic 2026-03-24 15:29:59 +02:00
Marius 4a8eb30304 fix: handle Local and Unspecified DateTimeKind in CompactNordPoolDayPrice conversion
Made-with: Cursor
2026-03-19 16:38:10 +02:00
Marius cd5f9d0352 fix: derive test constants from NordPoolConsts to prevent stale values
Made-with: Cursor
2026-03-19 16:32:32 +02:00
Marius 411611215a test: add compact format verification and size limit tests for NordPool entity attributes
Made-with: Cursor
2026-03-19 16:27:37 +02:00
Marius 638c1ef6d1 test: add size regression guard for compact NordPool price serialization
Made-with: Cursor
2026-03-19 16:21:49 +02:00
Marius b926a8325e fix: replace magic numbers with NordPoolConsts.MinutesPerInterval in compact price tests
Made-with: Cursor
2026-03-19 16:17:47 +02:00
Marius 3e5afa42c6 feat: add ToCompact extension for NordPoolDayPrice collections
Made-with: Cursor
2026-03-19 16:15:39 +02:00
Marius b4e465573f fix: add input validation and error-path tests for CompactNordPoolDayPrice
Made-with: Cursor
2026-03-19 14:38:41 +02:00
Marius 5a4a4ed001 feat: add CompactNordPoolDayPrice with array-format JSON serialization
Made-with: Cursor
2026-03-19 13:09:49 +02:00
Marius 28eddc5dc0 Add cancellation token support across NordPool services and update constants for reuse
- Introduced `CancellationToken` to service methods for improved task cancellation handling.
- Centralized reusable constants (`MinutesPerInterval`, `WaterReadyPowerThresholdWatts`) in `NordPoolConsts`.
- Refactored `ConfigureAwait` usage and improved logging within `NordPoolEntityService`.
- Adjusted tests to accommodate cancellation token changes.
2026-03-16 12:13:19 +02:00
Marius 17a2e67078 Refactor boiler control and price logic: Introduce PriceConsts, improve BoilerAction handling with switch, and update namespaces for better structure. 2026-03-16 12:08:14 +02:00
Marius 42b1fe3b18 Refactor UpdateCheapestIntervals logic to return a result object and improve code readability. Introduce CheapestIntervalsUpdateResult model for encapsulating update details and simplify inline tuples. 2026-03-16 12:00:23 +02:00
Marius 53eb53539a Add input_boolean for water heater preparation logic
Refreshed logic to allow users to toggle hot water preparation. Introduced new `input_boolean.boiler_prepare_hot_water` and updated config, services, and tests to ensure water readiness only when required.
2026-03-16 11:42:49 +02:00
Marius 861c344832 Init 2026-03-08 19:10:16 +02:00