Traceback:
File "hueMotion.py", line 27, in
bridgeDestination.set_sensor_state(5, 'presence', bridgeSource.get_sensor(6, 'state')['presence'])
File "build/bdist.linux-armv7l/egg/phue.py", line 991, in set_sensor_state
File "build/bdist.linux-armv7l/egg/phue.py", line 1015, in set_sensor_content
KeyError: 'lastupdated'
Source code:
del data["lastupdated"]
should be replace by:
if "lastupdated" in data:
del data["lastupdated"]
Reproduction scenario: bridgeDestination.set_sensor_state(5, 'presence', bridgeSource.get_sensor(6, 'state')['presence'])
Traceback: File "hueMotion.py", line 27, in
bridgeDestination.set_sensor_state(5, 'presence', bridgeSource.get_sensor(6, 'state')['presence'])
File "build/bdist.linux-armv7l/egg/phue.py", line 991, in set_sensor_state
File "build/bdist.linux-armv7l/egg/phue.py", line 1015, in set_sensor_content
KeyError: 'lastupdated'
Source code: del data["lastupdated"]
should be replace by: if "lastupdated" in data: del data["lastupdated"]