Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Lazy.2 #258

Merged
merged 41 commits into from
Feb 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0006c0f
remove strict recorder dependency
krahabb Feb 8, 2023
2faca51
fix with timeout() deprecation
krahabb Feb 9, 2023
f7d79f4
remove unused platform callbacks
krahabb Feb 9, 2023
7dd5079
streamline mqtt calls to be more pytest friendly
krahabb Feb 9, 2023
cd94b39
improve environment settings to support testing
krahabb Feb 9, 2023
188bc1f
support enable-disable debug log from HA UI
krahabb Feb 9, 2023
742a07d
refactor to support testing
krahabb Feb 9, 2023
1aff549
implement a working basic suite of tests
krahabb Feb 9, 2023
b7a43e7
upate git workflows to python 3.10
krahabb Feb 9, 2023
e086dbe
upload traces to repository to allow testing
krahabb Feb 9, 2023
0a05430
add missing dependency for recorder as optional
krahabb Feb 9, 2023
410d259
update github actions
krahabb Feb 10, 2023
21068ef
add missing import annotations
krahabb Feb 10, 2023
4ffc17a
remove aiohttp.web dependency from Emulator class
krahabb Feb 10, 2023
4410c1b
update emulator calls interface
krahabb Feb 10, 2023
b797bff
minor typing
krahabb Feb 12, 2023
01d0504
fix mqtt discovery flow unique_id
krahabb Feb 12, 2023
9adfa88
refactor to ease code coverage in tests
krahabb Feb 12, 2023
8107163
tz safety check (for testing with freezetime)
krahabb Feb 12, 2023
9f6a570
more testing traces
krahabb Feb 12, 2023
8ee436d
add comment to clarify coding choice
krahabb Feb 12, 2023
bc4594b
fix relative imports
krahabb Feb 12, 2023
392fc28
prevent linter complaints
krahabb Feb 12, 2023
c52f27d
parametrize tracing abilities delay
krahabb Feb 12, 2023
b0d9cbe
more tests on config_flow, diagnostics, other
krahabb Feb 12, 2023
c185a17
set justMyCode to false in test debugging
krahabb Feb 12, 2023
b4dbee6
add missing dependencies for CI host
krahabb Feb 12, 2023
6c224d6
add missing dependencies for CI host
krahabb Feb 12, 2023
8e76a55
add service response as a persistent_notification
krahabb Feb 12, 2023
f9b458a
add more context to http error logging
krahabb Feb 12, 2023
9f2b228
fix missing refresh after reconnection (#257)
krahabb Feb 12, 2023
705ee3f
try prevent md5 failure (#256)
krahabb Feb 12, 2023
b5cbe50
move mqtt requests to async
krahabb Feb 12, 2023
8e3d36e
add service response test
krahabb Feb 12, 2023
a66ed35
refine async migration for tests
krahabb Feb 12, 2023
df3b7d8
add missing error key for OptionFlow
krahabb Feb 16, 2023
aa73ece
relax callback typing
krahabb Feb 16, 2023
d3afa9b
manage garage open/close timeouts (#82)
krahabb Feb 16, 2023
68822ac
improve msg100 emulation
krahabb Feb 16, 2023
8b66cf3
add msg100 trace
krahabb Feb 16, 2023
67b2294
update readme for 3.0.2
krahabb Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor typing
  • Loading branch information
krahabb committed Feb 12, 2023
commit b797bffb621cc4fb692e872541e3dc6462d68eeb
8 changes: 4 additions & 4 deletions custom_components/meross_lan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ async def async_mqtt_receive(self, msg):
LOGGER.debug("MerossApi: MQTT RECV device_id:(%s) method:(%s) namespace:(%s)", device_id, header[mc.KEY_METHOD], header[mc.KEY_NAMESPACE])
if (device := self.devices.get(device_id)) is None:
# lookout for any disabled/ignored entry
mqtt_entry_present = False
hub_entry_present = False
for domain_entry in self.hass.config_entries.async_entries(DOMAIN):
if (domain_entry.unique_id == device_id):
# entry already present...
Expand All @@ -281,16 +281,16 @@ async def async_mqtt_receive(self, msg):
else "unknown"
LOGGER_trap(INFO, 14400, "Ignoring discovery for device_id: %s (ConfigEntry is %s)", device_id, msg_reason)
return
mqtt_entry_present |= domain_entry.unique_id == DOMAIN
hub_entry_present |= domain_entry.unique_id == DOMAIN
#also skip discovered integrations waiting in HA queue
for flow in self.hass.config_entries.flow.async_progress_by_handler(DOMAIN):
flow_unique_id = flow.get("context", {}).get("unique_id")
if (flow_unique_id == device_id):
LOGGER_trap(INFO, 14400, "Ignoring discovery for device_id: %s (ConfigEntry is in progress)", device_id)
return
mqtt_entry_present |= flow_unique_id == DOMAIN
hub_entry_present |= flow_unique_id == DOMAIN

if (not mqtt_entry_present):
if not hub_entry_present:
await self.hass.config_entries.flow.async_init(
DOMAIN,
context={ "source": "hub" },
Expand Down