Prevent zwave from firing event at shutdown (#3987)

pull/4059/head
John Arild Berentsen 2016-10-22 14:08:24 +02:00 committed by GitHub
parent 57777ef79a
commit 02afc98668
1 changed files with 2 additions and 1 deletions

View File

@ -430,7 +430,8 @@ def setup(hass, config):
"""Stop Z-Wave network."""
_LOGGER.info("Stopping ZWave network.")
NETWORK.stop()
hass.bus.fire(const.EVENT_NETWORK_STOP)
if hass.state == 'RUNNING':
hass.bus.fire(const.EVENT_NETWORK_STOP)
def rename_node(service):
"""Rename a node."""