Skip to content

Commit

Permalink
clear data before update
Browse files Browse the repository at this point in the history
  • Loading branch information
Uber committed Apr 1, 2023
1 parent 83cf0fa commit 8bd8e99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ def nearest_holiday(self):
def _update(self):
_LOGGER.info('update ...')
self.attributes = {} #重置attributes
self.localizedAttributes = {}
self._lunar = lunar.CalendarToday()#重新赋值

self._state = self._holiday.is_holiday_today()
Expand Down

0 comments on commit 8bd8e99

Please sign in to comment.