Use PyDispatcher instead of Louie

This commit is contained in:
Paulus Schoutsen 2015-02-28 22:49:27 -08:00
parent 8bd803601f
commit 67161d686b
3 changed files with 6 additions and 10 deletions

View File

@ -63,7 +63,7 @@ def setup(hass, config):
# pylint: disable=global-statement, import-error
global NETWORK
from louie import connect
from pydispatch import dispatcher
from openzwave.option import ZWaveOption
from openzwave.network import ZWaveNetwork
@ -89,7 +89,7 @@ def setup(hass, config):
pprint(_obj_to_dict(value))
print("")
connect(log_all, weak=False)
dispatcher.connect(log_all, weak=False)
def value_added(node, value):
""" Called when a value is added to a node on the network. """
@ -108,7 +108,7 @@ def setup(hass, config):
}
})
connect(
dispatcher.connect(
value_added, ZWaveNetwork.SIGNAL_VALUE_ADDED, weak=False)
def stop_zwave(event):

View File

@ -30,5 +30,8 @@ pushbullet.py>=0.7.1
# thermostat.nest
python-nest>=2.1
# z-wave
pydispatcher>=2.0.5
# pyyaml
pyyaml

View File

@ -11,13 +11,6 @@ fi
mkdir build
cd build
# We need to install louie here or else python-openzwave install
# will download louie from PIP and that one is not compatible with Python 3
git clone https://github.com/balloob/louie.git
cd louie
python3 setup.py install
cd ..
hg clone https://code.google.com/r/balloob-python-openzwave/
cd balloob-python-openzwave
./update.sh