Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Commit

Permalink
use MQTT wildcard for topic
Browse files Browse the repository at this point in the history
  • Loading branch information
unlobito committed Jun 5, 2021
1 parent 367d610 commit 8ef0a46
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions custom_components/hildebrandglow/glow.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class Glow:

BASE_URL = "https://api.glowmarkt.com/api/v0-1"
HILDEBRAND_MQTT_HOST = "glowmqtt.energyhive.com"
HILDEBRAND_MQTT_TOPIC = "SMART/HILD/{hardwareId}"
HILDEBRAND_MQTT_LEGACY = "SMART/DCAD/{hardwareId}"
HILDEBRAND_MQTT_TOPIC = "SMART/+/{hardwareId}"

username: str
password: str
Expand Down Expand Up @@ -106,13 +105,7 @@ def _cb_on_connect(
) -> None:
"""Receive a CONNACK message from the server."""
client.subscribe(
[
(self.HILDEBRAND_MQTT_TOPIC.format(hardwareId=self.hardwareId), 0),
(
self.HILDEBRAND_MQTT_LEGACY.format(hardwareId=self.hardwareId),
0,
),
]
[(self.HILDEBRAND_MQTT_TOPIC.format(hardwareId=self.hardwareId), 0)]
)

self.broker_active = True
Expand Down

0 comments on commit 8ef0a46

Please sign in to comment.