Skip to content

Commit

Permalink
0.1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
lolouk44 committed Nov 26, 2020
1 parent 8aec9d6 commit 840c224
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions mi-scale/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.1.15] - 2020-11-26
### Changed
- Fixed MQTT Discovery Message

## [0.1.14] - 2020-11-24
### Changed
- 2nd attempt to fix executable files (fixes https://github.com/lolouk44/hassio-addons/issues/23)
Expand Down
4 changes: 2 additions & 2 deletions mi-scale/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3.8-slim
LABEL io.hass.version="0.1.14" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64"
LABEL io.hass.version="0.1.15" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64"
WORKDIR /opt/miscale
COPY src /opt/miscale

RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install no-install-recommends -y \
bluez \
python-pip \
libglib2.0-dev && \
Expand Down
2 changes: 1 addition & 1 deletion mi-scale/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Xiaomi Mi Scale",
"version": "0.1.14",
"version": "0.1.15",
"slug": "xiaomi_mi_scale",
"description": "Read weight measurements from Xiamomi scale via BLE",
"url": "https://github.com/lolouk44/xiaomi_mi_scale_ha_add_on",
Expand Down
4 changes: 2 additions & 2 deletions mi-scale/src/Xiaomi_Scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@
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+= '"json_attributes_topic": "miscale/' + MQTTUser + '/weight","icon": "mdi:scale-bathroom"}'
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',
message,
Expand Down

0 comments on commit 840c224

Please sign in to comment.