mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 01:24:29 +05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3737bf91a3 | ||
|
|
747b8e6c36 | ||
|
|
fec5cef05c | ||
|
|
1ec581b08b | ||
|
|
c62a5a2d92 | ||
|
|
b6349eece8 |
21
.bumpversion.cfg
Normal file
21
.bumpversion.cfg
Normal file
@@ -0,0 +1,21 @@
|
||||
[bumpversion]
|
||||
current_version = 1.0.10b0
|
||||
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}"
|
||||
@@ -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:02}e{idx:02}'
|
||||
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 # имитация поведения обычного входа, чтобы события обрабатывались аналогично
|
||||
|
||||
@@ -538,7 +538,7 @@ class MegaD:
|
||||
for n in range(len(values)):
|
||||
ext_page = await self.request(pt=port, ext=n)
|
||||
ext_cfg = parse_config(ext_page)
|
||||
pt = f'{port}e{n}' if not self.new_naming else f'{port:02}e{n:02}'
|
||||
pt = f'{port}e{n}' if not self.new_naming else f'{port:02d}e{n:02d}'
|
||||
if ext_cfg.ety == '1':
|
||||
ret['light'][pt].append({})
|
||||
elif ext_cfg.ety == '0':
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
"@andvikt"
|
||||
],
|
||||
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
|
||||
"version": "v1.0.9b1"
|
||||
"version": "v1.0.1"
|
||||
}
|
||||
Reference in New Issue
Block a user