mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-10 16:44:28 +05:00
do not update all if "v" parametr
This commit is contained in:
@@ -61,7 +61,9 @@ class MegaView(HomeAssistantView):
|
||||
make_ints(data)
|
||||
port = data.get('pt')
|
||||
data = data.copy()
|
||||
update_all = True
|
||||
if 'v' in data:
|
||||
update_all = False
|
||||
data['value'] = data.pop('v')
|
||||
data['mega_id'] = hub.id
|
||||
ret = 'd'
|
||||
@@ -70,7 +72,7 @@ class MegaView(HomeAssistantView):
|
||||
for cb in self.callbacks[hub.id][port]:
|
||||
cb(data)
|
||||
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))
|
||||
if template is not None:
|
||||
template.hass = hass
|
||||
|
||||
Reference in New Issue
Block a user