Add battery status in owntracks (#27686)

* Add battery status in owntracks

* Remove trailing whitespaces
This commit is contained in:
Luca Angemi 2019-10-15 14:26:39 +02:00 committed by Fabian Affolter
parent b22eb22358
commit 3e26b49cc2

View file

@ -79,6 +79,8 @@ def _parse_see_args(message, subscribe_topic):
kwargs["attributes"]["address"] = message["addr"]
if "cog" in message:
kwargs["attributes"]["course"] = message["cog"]
if "bs" in message:
kwargs["attributes"]["battery_status"] = message["bs"]
if "t" in message:
if message["t"] in ("c", "u"):
kwargs["source_type"] = SOURCE_TYPE_GPS