This commit is contained in:
lolouk44 2020-09-09 10:29:55 +01:00
parent efaa8c5ed4
commit 22c87e3ad5
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## [0.1.10] - 2020-09-09
### Changed
- Fixed issue with detection of boolean in MQTT_DISCOVERY (https://github.com/lolouk44/hassio-addons/issues/16 and https://github.com/lolouk44/xiaomi_mi_scale/issues/31)
## [0.1.9] - 2020-09-08 ## [0.1.9] - 2020-09-08
### Changed ### Changed
- Fixed typo in MQTT message following the **breaking change** to snake_case attributes in 0.1.8 - Fixed typo in MQTT message following the **breaking change** to snake_case attributes in 0.1.8

View File

@ -1,6 +1,6 @@
{ {
"name": "Xiaomi Mi Scale", "name": "Xiaomi Mi Scale",
"version": "0.1.9", "version": "0.1.10",
"slug": "xiaomi_mi_scale", "slug": "xiaomi_mi_scale",
"description": "Read weight measurements from Xiamomi scale via BLE", "description": "Read weight measurements from Xiamomi scale via BLE",
"url": "https://github.com/lolouk44/xiaomi_mi_scale_ha_add_on", "url": "https://github.com/lolouk44/xiaomi_mi_scale_ha_add_on",

View File

@ -162,6 +162,10 @@ except FileNotFoundError:
MQTT_PREFIX = os.getenv('MQTT_PREFIX', 'miscale') MQTT_PREFIX = os.getenv('MQTT_PREFIX', 'miscale')
TIME_INTERVAL = int(os.getenv('TIME_INTERVAL', 30)) TIME_INTERVAL = int(os.getenv('TIME_INTERVAL', 30))
MQTT_DISCOVERY = os.getenv('MQTT_DISCOVERY',True) MQTT_DISCOVERY = os.getenv('MQTT_DISCOVERY',True)
if MQTT_DISCOVERY.lower() in ['true', '1', 'y', 'yes']:
MQTT_DISCOVERY = True
else:
MQTT_DISCOVERY = False
MQTT_DISCOVERY_PREFIX = os.getenv('MQTT_DISCOVERY_PREFIX','homeassistant') MQTT_DISCOVERY_PREFIX = os.getenv('MQTT_DISCOVERY_PREFIX','homeassistant')
HCI_DEV = os.getenv('HCI_DEV', 'hci0')[-1] HCI_DEV = os.getenv('HCI_DEV', 'hci0')[-1]
@ -309,7 +313,7 @@ class ScanProcessor():
raise raise
def main(): def main():
if MQTT_DISCOVERY.lower() in ['true', '1', 'y', 'yes']: if MQTT_DISCOVERY:
discovery() discovery()
BluetoothFailCounter = 0 BluetoothFailCounter = 0
while True: while True: