Skip to content

Commit

Permalink
uzsu plugin: bump version to 1.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
onkelandy committed Sep 12, 2023
1 parent cb06e20 commit 7f9e5d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions uzsu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class UZSU(SmartPlugin):

ALLOW_MULTIINSTANCE = False

PLUGIN_VERSION = "1.6.5" # item buffer for all uzsu enabled items
PLUGIN_VERSION = "1.6.6" # item buffer for all uzsu enabled items

def __init__(self, smarthome):
"""
Expand Down Expand Up @@ -356,7 +356,7 @@ def _logics_planned(self, item=None):
if self._planned.get(item) not in [None, {}, 'notinit'] and self._items[item].get('active') is True:
self.logger.info("Item '{}' is going to be set to {} at {}".format(
item, self._planned[item]['value'], self._planned[item]['next']))
self._webdata['items'][item.id()].update({'planned': {'value': self._planned[item]['value'],
self._webdata['items'][item.id()].update({'planned': {'value': self._planned[item]['value'],
'time': self._planned[item]['next']}})
return self._planned[item]
elif self._planned.get(item) == 'notinit' and self._items[item].get('active') is True:
Expand Down Expand Up @@ -792,8 +792,8 @@ def _get_time(self, entry, timescan, item=None, entryindex=None, caller=None):
entry['rrule'], time))
if 'sun' in time:
rrule = rrulestr(entry['rrule'], dtstart=datetime.combine(
weekbefore, self._sun(datetime.combine(weekbefore.date(),
datetime.min.time()).replace(tzinfo=self._timezone),
weekbefore, self._sun(datetime.combine(weekbefore.date(),
datetime.min.time()).replace(tzinfo=self._timezone),
time, timescan).time()))
self.logger.debug("Looking for {} sun-related time. Found rrule: {}".format(
timescan, str(rrule).replace('\n', ';')))
Expand All @@ -808,8 +808,8 @@ def _get_time(self, entry, timescan, item=None, entryindex=None, caller=None):
return None, None
if 'sun' in time:
sleep(0.01)
next = self._sun(datetime.combine(dt.date(),
datetime.min.time()).replace(tzinfo=self._timezone),
next = self._sun(datetime.combine(dt.date(),
datetime.min.time()).replace(tzinfo=self._timezone),
time, timescan)
self.logger.debug("Result parsing time (rrule) {}: {}".format(time, next))
if entryindex is not None and timescan == 'next':
Expand Down Expand Up @@ -855,7 +855,7 @@ def _get_time(self, entry, timescan, item=None, entryindex=None, caller=None):
self._itpl[item][next.timestamp() * 1000.0] = value
self.logger.debug("Looking for {} series-related time. Found rrule: {} with start-time . {}".format(
timescan, entry['rrule'].replace('\n', ';'), entry['series']['timeSeriesMin']))

cond_today = False if next is None else next.date() == today.date()
cond_yesterday = False if next is None else next.date() - timedelta(days=1) == yesterday.date()
cond_tomorrow = False if next is None else next.date() == tomorrow.date()
Expand Down
2 changes: 1 addition & 1 deletion uzsu/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ plugin:
keywords: scheduler uzsu trigger series
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1364692-supportthread-für-uzsu-plugin

version: 1.6.5 # Plugin version
version: 1.6.6 # Plugin version
sh_minversion: 1.6 # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
multi_instance: False # plugin supports multi instance
Expand Down

0 comments on commit 7f9e5d1

Please sign in to comment.