From d3210964781945dacbb471be279c063b19cd3a46 Mon Sep 17 00:00:00 2001 From: mark1foley <50077728+mark1foley@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:53:09 +1000 Subject: [PATCH] Update sensor.py Updated query to use property_id rather than property_number - in line with BCC change to dataset --- custom_components/bne_wc/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/bne_wc/sensor.py b/custom_components/bne_wc/sensor.py index e153f85..6732e5f 100644 --- a/custom_components/bne_wc/sensor.py +++ b/custom_components/bne_wc/sensor.py @@ -240,7 +240,7 @@ def _get_collection_details(self): collection[ATTR_PROPERTY_NUMBER] = self._property_number full_url = self._base_url.format(**{ 'dataset_id': self._days_table, - 'query': quote_plus("property_number = {0}".format(int(self._property_number))) + 'query': quote_plus("property_id = {0}".format(int(self._property_number))) }) _LOGGER.info("...Day query: {0}".format(full_url)) response = requests.get(full_url) @@ -318,4 +318,4 @@ def _get_extra_bin(self, collection): except requests.exceptions.RequestException as e: _LOGGER.error("updating collection week got {}.".format(requests.exceptions.RequestException)) - self.info = collection \ No newline at end of file + self.info = collection