Browse Source

Update switchbot_mqtt/__init__.py

Co-authored-by: Fabian Peter Hammerle <fabian@hammerle.me>
Philipp Basler 1 năm trước cách đây
mục cha
commit
0855bdbc60
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      switchbot_mqtt/__init__.py

+ 3 - 1
switchbot_mqtt/__init__.py

@@ -28,7 +28,9 @@ from switchbot_mqtt._actors.base import _MQTTCallbackUserdata
 _LOGGER = logging.getLogger(__name__)
 
 _MQTT_AVAILABILITY_TOPIC="switchbot_mqtt/availability"
-BirthMessage="online"
+# "online" and "offline" to match home assistant's default settings
+# https://www.home-assistant.io/integrations/switch.mqtt/#payload_available
+_MQTT_BIRTH_PAYLOAD="online"
 LWT="offline"