Skip to content

Commit

Permalink
feat: add mqtt connectivity sensor (#224)
Browse files Browse the repository at this point in the history
* feat: add mqtt connectivity sensor

* formatting

* update tox command
  • Loading branch information
firstof9 authored Jun 16, 2023
1 parent 32df4fe commit b462083
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions custom_components/openevse/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@
device_class=BinarySensorDeviceClass.POWER,
entity_registry_enabled_default=False,
),
"mqtt_connected": BinarySensorEntityDescription(
name="MQTT Connected",
key="mqtt_connected",
device_class=BinarySensorDeviceClass.CONNECTIVITY,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
}

BUTTON_TYPES: Final[dict[str, ButtonEntityDescription]] = {
Expand Down
2 changes: 1 addition & 1 deletion custom_components/openevse/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"documentation": "https://github.com/firstof9/openevse/",
"iot_class": "local_push",
"issue_tracker": "https://github.com/firstof9/openevse/issues",
"requirements": ["python-openevse-http==0.1.51"],
"requirements": ["python-openevse-http==0.1.52"],
"version": "0.0.0-dev",
"zeroconf": ["_openevse._tcp.local."]
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-openevse-http==0.1.51
python-openevse-http==0.1.52
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python =

[testenv]
commands =
pytest --timeout=30 --cov=custom_components/openevse --cov-report=xml {posargs}
pytest --asyncio-mode=auto --timeout=30 --cov=custom_components/openevse --cov-report=xml {posargs}
deps =
-rrequirements_test.txt

Expand Down

0 comments on commit b462083

Please sign in to comment.