Switch over to miflora lib v0.3 (#31)
This commit is contained in:
parent
a7a474b196
commit
16c7bf1067
|
@ -13,6 +13,7 @@ from colorama import Fore, Back, Style
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
from unidecode import unidecode
|
from unidecode import unidecode
|
||||||
from miflora.miflora_poller import MiFloraPoller, MI_BATTERY, MI_CONDUCTIVITY, MI_LIGHT, MI_MOISTURE, MI_TEMPERATURE
|
from miflora.miflora_poller import MiFloraPoller, MI_BATTERY, MI_CONDUCTIVITY, MI_LIGHT, MI_MOISTURE, MI_TEMPERATURE
|
||||||
|
from miflora.backends.gatttool import GatttoolBackend
|
||||||
import paho.mqtt.client as mqtt
|
import paho.mqtt.client as mqtt
|
||||||
import sdnotify
|
import sdnotify
|
||||||
|
|
||||||
|
@ -205,7 +206,7 @@ for [name, mac] in config['Sensors'].items():
|
||||||
print('Name: "{}"'.format(name_pretty))
|
print('Name: "{}"'.format(name_pretty))
|
||||||
#print_line('Attempting initial connection to Mi Flora sensor "{}" ({})'.format(name_pretty, mac), console=False, sd_notify=True)
|
#print_line('Attempting initial connection to Mi Flora sensor "{}" ({})'.format(name_pretty, mac), console=False, sd_notify=True)
|
||||||
|
|
||||||
flora_poller = MiFloraPoller(mac=mac, cache_timeout=miflora_cache_timeout, retries=3, adapter=used_adapter)
|
flora_poller = MiFloraPoller(mac=mac, backend=GatttoolBackend, cache_timeout=miflora_cache_timeout, retries=3, adapter=used_adapter)
|
||||||
flora['poller'] = flora_poller
|
flora['poller'] = flora_poller
|
||||||
flora['name_pretty'] = name_pretty
|
flora['name_pretty'] = name_pretty
|
||||||
flora['mac'] = flora_poller._mac
|
flora['mac'] = flora_poller._mac
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#git+https://github.com/open-homeautomation/miflora.git#egg=miflora
|
#git+https://github.com/open-homeautomation/miflora.git#egg=miflora
|
||||||
miflora==0.1.16
|
miflora==0.3
|
||||||
paho-mqtt==1.3.0
|
paho-mqtt==1.3.0
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
sdnotify==0.3.1
|
sdnotify==0.3.1
|
||||||
|
|
Loading…
Reference in New Issue