Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
Updated query to use property_id rather than property_number - in line with BCC change to dataset
  • Loading branch information
mark1foley authored Dec 16, 2024
1 parent 7462328 commit d321096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/bne_wc/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
self.info = collection

0 comments on commit d321096

Please sign in to comment.