EEBus meter: fix nil entity panic on device removal (#31042)
This commit is contained in:
parent
63b7d96e0f
commit
e071d7ee7e
1 changed files with 5 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue