mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 09:34:28 +05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9544f562ba | ||
|
|
c2422cac9c | ||
|
|
0adba7fc0f |
@@ -61,6 +61,10 @@ class MegaView(HomeAssistantView):
|
|||||||
make_ints(data)
|
make_ints(data)
|
||||||
port = data.get('pt')
|
port = data.get('pt')
|
||||||
data = data.copy()
|
data = data.copy()
|
||||||
|
update_all = True
|
||||||
|
if 'v' in data:
|
||||||
|
update_all = False
|
||||||
|
data['value'] = data.pop('v')
|
||||||
data['mega_id'] = hub.id
|
data['mega_id'] = hub.id
|
||||||
ret = 'd'
|
ret = 'd'
|
||||||
if port is not None:
|
if port is not None:
|
||||||
@@ -68,7 +72,7 @@ class MegaView(HomeAssistantView):
|
|||||||
for cb in self.callbacks[hub.id][port]:
|
for cb in self.callbacks[hub.id][port]:
|
||||||
cb(data)
|
cb(data)
|
||||||
template: Template = self.templates.get(hub.id, {}).get(port)
|
template: Template = self.templates.get(hub.id, {}).get(port)
|
||||||
if hub.update_all:
|
if hub.update_all and update_all:
|
||||||
asyncio.create_task(self.later_update(hub))
|
asyncio.create_task(self.later_update(hub))
|
||||||
if template is not None:
|
if template is not None:
|
||||||
template.hass = hass
|
template.hass = hass
|
||||||
|
|||||||
@@ -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": "v0.3.17"
|
"version": "v0.3.19"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user