HEMS: make Dimmed/Curtailed tri-state (once more) (#30712)

This commit is contained in:
andig 2026-06-10 22:16:58 +02:00 • committed by GitHub
parent d859ae9c7c
commit 45cab34ce9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 32 additions and 31 deletions

View file

@ -287,8 +287,8 @@ type Circuit interface {
// HEMS exposes the runtime state of the home energy management system.
type HEMS interface {
SetUpdated(func())
Dimmed() bool
Curtailed() bool
Dimmed() *bool // nil = no statement
Curtailed() *bool // nil = no statement
MaxConsumptionPower() float64 // 0 = no limit
MaxProductionPower() *float64 // nil = no limit
}

View file

@ -1173,10 +1173,10 @@ func (m *MockHEMS) EXPECT() *MockHEMSMockRecorder {
}
// Curtailed mocks base method.
func (m *MockHEMS) Curtailed() bool {
func (m *MockHEMS) Curtailed() *bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Curtailed")
ret0, _ := ret[0].(bool)
ret0, _ := ret[0].(*bool)
return ret0
}
@ -1187,10 +1187,10 @@ func (mr *MockHEMSMockRecorder) Curtailed() *gomock.Call {
}
// Dimmed mocks base method.
func (m *MockHEMS) Dimmed() bool {
func (m *MockHEMS) Dimmed() *bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Dimmed")
ret0, _ := ret[0].(bool)
ret0, _ := ret[0].(*bool)
return ret0
}