EEBus meter: fix nil entity panic on device removal (#31042)

This commit is contained in:
andig 2026-06-19 20:50:49 +02:00 • committed by GitHub
parent 63b7d96e0f
commit e071d7ee7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,6 +34,11 @@ func (c *EEBus) Connect(connected bool) {
// UseCaseEvent implements the eebus.Device interface
func (c *EEBus) UseCaseEvent(_ spineapi.DeviceRemoteInterface, entity spineapi.EntityRemoteInterface, event eebusapi.EventType) {
// deviceremoval fires support-update events with a nil entity
if entity == nil {
return
}
switch event {
// Monitoring Appliance
case mpc.UseCaseSupportUpdate, mgcp.UseCaseSupportUpdate: