Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemanspiff2007 committed Mar 25, 2024
1 parent 6811465 commit 5f264f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ Examples
======================================
.. py:currentmodule:: sml2mqtt.config.device
These are some examples for sml value configurations

Energy consumption today
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion src/sml2mqtt/mqtt/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ async def _mqtt_task():
# The last will testament only gets sent on abnormal disconnect
# Since we disconnect gracefully we have to manually sent the offline status
await client.publish(will_topic.topic, payload_offline, will_topic.qos, will_topic.retain)
shutdown = True
log.info('Disconnecting')
shutdown = True

except MqttError as e:
delay.increase()
Expand Down
4 changes: 4 additions & 0 deletions tests/test_source/test_http.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

import pytest
from aiohttp import ClientTimeout
from aioresponses import aioresponses
Expand All @@ -11,6 +13,7 @@ def source(device_mock):
return HttpSource(device_mock, 'http://localhost:39999', interval=0, auth=None, timeout=ClientTimeout(0.5))


@pytest.mark.skipif(sys.platform.lower() != "win32", reason="It's a mystery why this fails in CI")
async def test_200(sml_data_1, device_mock, source):

with aioresponses() as m:
Expand All @@ -29,6 +32,7 @@ async def test_200(sml_data_1, device_mock, source):
await close_session()


@pytest.mark.skipif(sys.platform.lower() != "win32", reason="It's a mystery why this fails in CI")
async def test_400(device_mock, source):

with aioresponses() as m:
Expand Down

0 comments on commit 5f264f1

Please sign in to comment.