diff --git a/README.md b/README.md index 6b8aa15..2c9727d 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ Home Assistant integration for wireless SensorPush temperature and humidity/hygrometer sensors. -[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://buymeacoffee.com/DYks67r) - ## Hardware Supported | Model | Temp | Humidity | Presure | Dewpoint | VPD | Waterproof | Battery Life | Range | diff --git a/custom_components/sensorpush/__init__.py b/custom_components/sensorpush/__init__.py index 888693f..4e68c11 100644 --- a/custom_components/sensorpush/__init__.py +++ b/custom_components/sensorpush/__init__.py @@ -71,10 +71,9 @@ def setup(hass, config): # return False # FIXME: log warning if no sensors found? - hass.data[SENSORPUSH_SAMPLES] = sensorpush_service.samples + hass.data[SENSORPUSH_SAMPLES] = sensorpush_service.samples() # FIXME: trigger automatic setup of sensors - except (ConnectTimeout, HTTPError) as ex: LOG.error("Unable to connect to SensorPush: %s", str(ex)) @@ -92,7 +91,7 @@ def refresh_sensorpush_data(event_time): #hass.data[SENSORPUSH_SERVICE].update(update_devices=True) # retrieve the latest samples from the SensorPush cloud service - latest_samples = hass.data[SENSORPUSH_SERVICE].samples + latest_samples = hass.data[SENSORPUSH_SERVICE].samples() if latest_samples: hass.data[SENSORPUSH_SAMPLES] = latest_samples @@ -146,7 +145,7 @@ def extra_state_attributes(self): @callback def _update_callback(self): samples = self.hass.data[SENSORPUSH_SAMPLES] - sensor_results = samples['sensors'] + sensor_results = samples.get('sensors') sensor_data = sensor_results[self._device_id] latest_result = sensor_data[0] diff --git a/custom_components/sensorpush/manifest.json b/custom_components/sensorpush/manifest.json index 51c5f63..f88a4c9 100644 --- a/custom_components/sensorpush/manifest.json +++ b/custom_components/sensorpush/manifest.json @@ -3,8 +3,8 @@ "name": "SensorPush", "documentation": "https://github.com/rsnodgrass/hass-sensorpush/", "issue_tracker": "https://github.com/rsnodgrass/hass-sensorpush/issues", - "requirements": ["pysensorpush>=0.1.6"], - "version": "0.1.0", + "requirements": ["pysensorpush>=0.1.7"], + "version": "0.1.1", "dependencies": [], "codeowners": ["@rsnodgrass"], "iot_class": "cloud_polling"