Custom integration that listens to MQTT join/uplink topics, auto-discovers Milesight devices (model-aware) and exposes telemetry as entities. WT101 is supported out of the box; more models can be added via the SensorDecoders submodule (decoders/encoders are loaded from there).
- Configurable MQTT topics for join/uplink/downlink (via config flow)
- Uplink payload decoding using official Milesight JS decoders (via
js2py) - Dynamic device/entity creation based on the model (WT101 included)
- No built-in panel; use HA entities/services directly
- Topic pattern:
milesight/{model}/{dev_eui}/uplink(defaults to wildcardsmilesight/+/+/uplink, same for join/downlink). - Join topic: JSON containing
dev_eui(e.g.{"dev_eui": "A1B2C3D4E5F6A7B8", "name": "Living Room"}) or the DevEUI as plain text. DevEUI and model are also parsed from the topic path. - Uplink topic: JSON with
dev_euiplus one ofdata(base64),payload_hex/payload(hex string),payload_raw/bytes(array). Plain hex/base64 payloads without JSON are accepted if the DevEUI is in the topic.
- Service:
milesight.send_command - Data:
dev_eui(required)model(optional, defaults towt101)payload(required dict), e.g.{"target_temperature": 22}for WT101
- The integration encodes the payload with the model’s JS encoder from the
SensorDecoderssubmodule and publishes it to the downlink topic (defaultmilesight/{model}/{dev_eui}/downlink; respects your configured template, replacing+or{model}/{dev_eui}).
- Integration domain:
milesight - Frontend assets:
custom_components/milesight/www/index.html - API endpoint backing the panel:
GET /api/milesight/devices
- Add this repository as a custom integration in HACS.
- Install and restart Home Assistant.
- Add the integration from Settings → Devices & Services → Add Integration → Milesight and set your MQTT topics.