mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 00:54:28 +05:00
fix focs about i2c id
This commit is contained in:
@@ -165,6 +165,14 @@ class MegaI2C(FilterBadValues):
|
||||
def customize(self):
|
||||
return super().customize.get(self.id_suffix, {}) or {}
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
attrs = super().extra_state_attributes or {}
|
||||
attrs.update({
|
||||
'i2c_id': self.id_suffix,
|
||||
})
|
||||
return attrs
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
return self._device_class
|
||||
|
||||
Reference in New Issue
Block a user