From d84a15bc47ae8bd6af2439147df5f20cfab7105a Mon Sep 17 00:00:00 2001 From: lolouk44 Date: Thu, 26 Nov 2020 10:45:35 +0000 Subject: [PATCH] 0.1.16 --- mi-scale/CHANGELOG.md | 4 ++++ mi-scale/Dockerfile | 2 +- mi-scale/config.json | 2 +- mi-scale/src/Xiaomi_Scale.py | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mi-scale/CHANGELOG.md b/mi-scale/CHANGELOG.md index e856ee1..78ff428 100644 --- a/mi-scale/CHANGELOG.md +++ b/mi-scale/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.1.16] - 2020-11-26 +### Changed +- Fixed MQTT Discovery Message + ## [0.1.15] - 2020-11-26 ### Changed - Fixed MQTT Discovery Message diff --git a/mi-scale/Dockerfile b/mi-scale/Dockerfile index f827036..72f5f7f 100644 --- a/mi-scale/Dockerfile +++ b/mi-scale/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.8-slim -LABEL io.hass.version="0.1.15" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64" +LABEL io.hass.version="0.1.16" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64" WORKDIR /opt/miscale COPY src /opt/miscale diff --git a/mi-scale/config.json b/mi-scale/config.json index 7952d0b..c38420f 100644 --- a/mi-scale/config.json +++ b/mi-scale/config.json @@ -1,6 +1,6 @@ { "name": "Xiaomi Mi Scale", - "version": "0.1.15", + "version": "0.1.16", "slug": "xiaomi_mi_scale", "description": "Read weight measurements from Xiamomi scale via BLE", "url": "https://github.com/lolouk44/xiaomi_mi_scale_ha_add_on", diff --git a/mi-scale/src/Xiaomi_Scale.py b/mi-scale/src/Xiaomi_Scale.py index 398e512..58cf233 100644 --- a/mi-scale/src/Xiaomi_Scale.py +++ b/mi-scale/src/Xiaomi_Scale.py @@ -193,7 +193,7 @@ OLD_MEASURE = '' def discovery(): for MQTTUser in (USER1_NAME,USER2_NAME,USER3_NAME): message = '{"name": "' + MQTTUser + ' Weight",' - message+= '"state_topic": "' + MQTT_PREFIX + '/' + MQTTUser + '/weight","value_template": "{{ value_json['weight'] }}",' + message+= '"state_topic": "' + MQTT_PREFIX + '/' + MQTTUser + '/weight","value_template": "{{ value_json.weight }}",' message+= '"json_attributes_topic": "' + MQTT_PREFIX + '/' + MQTTUser + '/weight","icon": "mdi:scale-bathroom"}' publish.single( MQTT_DISCOVERY_PREFIX + '/sensor/' + MQTT_PREFIX + '/' + MQTTUser + '/config',