Compare commits

..

2 Commits

Author SHA1 Message Date
Викторов Андрей Германович
2662b9c3bd Bump version: 1.0.10b5 → 1.0.10b6 2021-09-21 17:33:30 +03:00
Викторов Андрей Германович
8399bbd1de fix focs about i2c id 2021-09-21 17:33:22 +03:00
4 changed files with 12 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.10b5
current_version = 1.0.10b6
parse = (?P<major>\d+)(\.(?P<minor>\d+))(\.(?P<patch>\d+))(?P<release>[bf]*)(?P<build>\d*)
commit = True
tag = True

View File

@@ -15,5 +15,5 @@
"@andvikt"
],
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
"version": "v1.0.10b5"
"version": "v1.0.10b6"
}

View File

@@ -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

View File

@@ -189,10 +189,10 @@ some_led2:
# конфиг
```
#### i2c {: #i2c}
Для сенсоров i2c адресация конфига такая:
Для сенсоров i2c нужно так же указать id сенсора, который можно посмотреть в атрибутах объекта на [странице разработчика](https://my.home-assistant.io/redirect/developer_states/).
```yaml
36:
htu21d_humidity: # entity_id сенсора без приставки sensor., видно в интерфейсе HA
htu21d_humidity: # i2c_id
# конфиг
```
[Подробнее про i2c](i2c.md)