-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added fallback in case shortcut fails - Fixed some tests
- Loading branch information
1 parent
1bbd980
commit 58979a7
Showing
8 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.1.0' | ||
__version__ = '1.2.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import asyncio | ||
import logging | ||
|
||
from smllib.reader import SmlFrame | ||
|
||
from sml2mqtt import CONFIG | ||
from sml2mqtt.config.device import SmlDeviceConfig | ||
from sml2mqtt.device import Device | ||
|
||
|
||
async def test_frame_no_shortcut(device: Device, no_serial, caplog, sml_frame_2: SmlFrame, monkeypatch, no_mqtt): | ||
caplog.set_level(logging.DEBUG) | ||
|
||
monkeypatch.setitem(CONFIG.devices, 'device_url', SmlDeviceConfig( | ||
mqtt={'topic': 'xxxx'} | ||
)) | ||
|
||
await device.process_frame(sml_frame_2) | ||
await asyncio.sleep(0.01) | ||
|
||
assert no_mqtt == [ | ||
('testing/xxxx/010060320101', 'LGZ', 0, False), | ||
('testing/xxxx/0100600100ff', '0a014c475a0003403b49', 0, False), | ||
('testing/xxxx/0100010800ff', 5171.9237, 0, False), | ||
('testing/xxxx/0100100700ff', 251, 0, False), | ||
('testing/xxxx/status', 'OK', 0, False) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters