From 64ee7e3e59a0be5ede9f483b762ec342ed1bfa1a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 12 Jun 2018 20:30:19 +0200 Subject: [PATCH] Fixed the way the FE widget parses the sensor changes after the structural change to SensorDataChangeEvent --- .../backend/http/static/js/widgets/date-time-weather.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/backend/http/static/js/widgets/date-time-weather.js b/platypush/backend/http/static/js/widgets/date-time-weather.js index 92b8dd516..6541206c7 100644 --- a/platypush/backend/http/static/js/widgets/date-time-weather.js +++ b/platypush/backend/http/static/js/widgets/date-time-weather.js @@ -11,12 +11,12 @@ $(document).ready(function() { if (event.args.type == 'platypush.message.event.weather.NewWeatherConditionEvent') { updateTemperature(event.args.temperature); } else if (event.args.type == 'platypush.message.event.sensor.SensorDataChangeEvent') { - if ('temperature' in event.args) { - updateSensorTemperature(event.args.temperature); + if ('temperature' in event.args.data) { + updateSensorTemperature(event.args.data.temperature); } if ('humidity' in event.args) { - updateSensorHumidity(event.args.humidity); + updateSensorHumidity(event.args.data.humidity); } } };