HEMS: redesign dim and curtail api as tristate (#30116)

This commit is contained in:
andig 2026-05-23 11:42:29 +02:00 • committed by GitHub
parent 3d59da473b
commit 8dc0edd8d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 67 additions and 54 deletions

View file

@ -280,11 +280,11 @@ type Circuit interface {
// EnWG §14a - reduce demand/consumption
Dim(bool)
Dimmed() bool
Dimmed() *bool
// EEG §9 - reduce feed-in to the grid
Curtail(bool)
Curtailed() bool
Curtailed() *bool
}
// Redactor is an interface to redact sensitive data

View file

@ -869,10 +869,10 @@ func (mr *MockCircuitMockRecorder) Curtail(arg0 any) *gomock.Call {
}
// Curtailed mocks base method.
func (m *MockCircuit) Curtailed() bool {
func (m *MockCircuit) Curtailed() *bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Curtailed")
ret0, _ := ret[0].(bool)
ret0, _ := ret[0].(*bool)
return ret0
}
@ -895,10 +895,10 @@ func (mr *MockCircuitMockRecorder) Dim(arg0 any) *gomock.Call {
}
// Dimmed mocks base method.
func (m *MockCircuit) Dimmed() bool {
func (m *MockCircuit) Dimmed() *bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Dimmed")
ret0, _ := ret[0].(bool)
ret0, _ := ret[0].(*bool)
return ret0
}