mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 09:34:28 +05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9322f9cae1 | ||
|
|
52ace90600 | ||
|
|
8738a936fe | ||
|
|
2490e09748 | ||
|
|
e134a874fa | ||
|
|
1ec581b08b | ||
|
|
c62a5a2d92 |
21
.bumpversion.cfg
Normal file
21
.bumpversion.cfg
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[bumpversion]
|
||||||
|
current_version = 1.0.10b2
|
||||||
|
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}"
|
||||||
@@ -63,7 +63,7 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
"""Handle a config flow for mega."""
|
"""Handle a config flow for mega."""
|
||||||
|
|
||||||
VERSION = 24
|
VERSION = 25
|
||||||
CONNECTION_CLASS = config_entries.CONN_CLASS_ASSUMED
|
CONNECTION_CLASS = config_entries.CONN_CLASS_ASSUMED
|
||||||
|
|
||||||
async def async_step_user(self, user_input=None):
|
async def async_step_user(self, user_input=None):
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class MegaView(HomeAssistantView):
|
|||||||
_data = data.copy()
|
_data = data.copy()
|
||||||
if e.startswith('ext'):
|
if e.startswith('ext'):
|
||||||
idx = e[3:]
|
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['pt_orig'] = pt_orig
|
||||||
_data['value'] = 'ON' if v == '1' else 'OFF'
|
_data['value'] = 'ON' if v == '1' else 'OFF'
|
||||||
_data['m'] = 1 if _data[e] == '0' else 0 # имитация поведения обычного входа, чтобы события обрабатывались аналогично
|
_data['m'] = 1 if _data[e] == '0' else 0 # имитация поведения обычного входа, чтобы события обрабатывались аналогично
|
||||||
|
|||||||
@@ -566,6 +566,9 @@ class MegaD:
|
|||||||
elif cfg.pty == '4' and cfg.m == '2':
|
elif cfg.pty == '4' and cfg.m == '2':
|
||||||
# scl исключаем из сканирования
|
# scl исключаем из сканирования
|
||||||
continue
|
continue
|
||||||
|
elif cfg.pty is None and nports < 30:
|
||||||
|
# вроде как это ADC на 328 меге
|
||||||
|
ret['sensor'][port].append(dict())
|
||||||
elif cfg.pty in ('3', '2', '4'):
|
elif cfg.pty in ('3', '2', '4'):
|
||||||
http_cmd = 'get'
|
http_cmd = 'get'
|
||||||
if cfg.d == '5' and cfg.pty == '3':
|
if cfg.d == '5' and cfg.pty == '3':
|
||||||
|
|||||||
@@ -15,5 +15,5 @@
|
|||||||
"@andvikt"
|
"@andvikt"
|
||||||
],
|
],
|
||||||
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
|
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
|
||||||
"version": "v1.0.9b2"
|
"version": "v1.0.10b2"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user