Compare commits

...

5 Commits

Author SHA1 Message Date
andvikt
8738a936fe Bump version: 1.0.10b0 → 1.0.10b1 2021-09-18 22:10:50 +03:00
andvikt
2490e09748 add adc support for 328 mega 2021-09-18 22:10:47 +03:00
andvikt
e134a874fa add adc support for 328 mega 2021-09-18 22:08:52 +03:00
Викторов Андрей Германович
1ec581b08b fix #54 2021-08-26 11:49:26 +03:00
Викторов Андрей Германович
c62a5a2d92 fix formating 2021-08-26 11:16:57 +03:00
4 changed files with 26 additions and 2 deletions

21
.bumpversion.cfg Normal file
View File

@@ -0,0 +1,21 @@
[bumpversion]
current_version = 1.0.10b1
parse = (?P<major>\d+)(\.(?P<minor>\d+))(\.(?P<patch>\d+))(?P<release>[bf]*)(?P<build>\d*)
commit = True
tag = True
serialize =
{major}.{minor}.{patch}{release}{build}
{major}.{minor}.{patch}
[bumpversion:part:release]
optional_value = f
values =
b
f
[bumpversion:part:build]
first_value = 0
[bumpversion:file:custom_components/mega/manifest.json]
search = "version": "v{current_version}"
replace = "version": "v{new_version}"

View File

@@ -117,7 +117,7 @@ class MegaView(HomeAssistantView):
_data = data.copy()
if e.startswith('ext'):
idx = e[3:]
pt = f'{pt_orig}e{idx}' if not hub.new_naming else f'{pt_orig:02d}e{idx:02d}'
pt = f'{pt_orig}e{idx}' if not hub.new_naming else f'{int(pt_orig):02d}e{int(idx):02d}'
_data['pt_orig'] = pt_orig
_data['value'] = 'ON' if v == '1' else 'OFF'
_data['m'] = 1 if _data[e] == '0' else 0 # имитация поведения обычного входа, чтобы события обрабатывались аналогично

View File

@@ -566,6 +566,9 @@ class MegaD:
elif cfg.pty == '4' and cfg.m == '2':
# scl исключаем из сканирования
continue
elif cfg.pty is None and nports < 30:
# вроде как это ADC на 328 меге
ret['sensor'][port].append(dict())
elif cfg.pty in ('3', '2', '4'):
http_cmd = 'get'
if cfg.d == '5' and cfg.pty == '3':

View File

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