Skip to content

Commit

Permalink
v2024.8.1-beta-6 fix bug that did not add max and min temp from last …
Browse files Browse the repository at this point in the history
…entry data
  • Loading branch information
jeroenterheerdt committed Aug 14, 2024
1 parent 4a68969 commit f3d0ed8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/smart_irrigation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,18 @@ async def async_continuous_update_for_mapping(self, mapping_id):
def clear_weatherdata_for_mapping(self, mapping):
data_last_entry = {}
# find the last entry for each key in the mapping
_LOGGER.debug(
f"[clear_weatherdata_for_mapping] finding last entry for each key in the sensor group."
)
if mapping.get(const.MAPPING_DATA):
for key in mapping.get(const.MAPPING_MAPPINGS):
for e in reversed(mapping.get(const.MAPPING_DATA)):
if key in e:
data_last_entry[key] = e[key]
break

_LOGGER.debug(
f"[clear_weatherdata_for_mapping] last entry for each key in the sensor group: {data_last_entry}"
)
# update the number of data points on zones that use this mapping
zones = self._get_zones_that_use_this_mapping(mapping.get(const.MAPPING_ID))
changes2 = {
Expand Down

0 comments on commit f3d0ed8

Please sign in to comment.