Repository: spacemanspiff2007/HABApp

Issue:
Unkown event FirmwareStatusInfoEvent
I recently have seen a couple of those error messages when starting openhab.

Openhab: 2.5.9
HABApp: 1.6.1-dev 

I found the following information regarding the firmware status event:
https://next.openhab.org/javadoc/latest/org/openhab/core/thing/firmware/firmwarestatusinfoevent


```
2020-10-30 21:31:39,581] [                   HABApp]    ERROR | Error Unknown Event: FirmwareStatusInfoEvent for {'topic': 'smarthome/things/zigbee:device:01382BDE:00158d0002b5b788/firmware/status', 'payload': '{"thingUID":{"segments":["zigbee","device","01382BDE","00158d0002b5b788"]},"firmwareStatus":"UNKNOWN"}', 'type': 'FirmwareStatusInfoEvent'} in on_sse_event:
[2020-10-30 21:31:39,582] [                   HABApp]    ERROR | File "/usr/src/app/HABApp/openhab/map_events.py", line 38, in get_event
[2020-10-30 21:31:39,583] [                   HABApp]    ERROR |     26   def get_event(_in_dict: dict) -> OpenhabEvent:
[2020-10-30 21:31:39,584] [                   HABApp]    ERROR |  (...)
[2020-10-30 21:31:39,585] [                   HABApp]    ERROR |     34       payload = load_json(p_str)
[2020-10-30 21:31:39,585] [                   HABApp]    ERROR |     35   
[2020-10-30 21:31:39,586] [                   HABApp]    ERROR |     36       # Find event from implemented events
[2020-10-30 21:31:39,587] [                   HABApp]    ERROR |     37       try:
[2020-10-30 21:31:39,588] [                   HABApp]    ERROR | --> 38           return __event_lookup[event_type].from_dict(topic, payload)
[2020-10-30 21:31:39,588] [                   HABApp]    ERROR |     39       except KeyError:
[2020-10-30 21:31:39,589] [                   HABApp]    ERROR |     ..................................................
[2020-10-30 21:31:39,590] [                   HABApp]    ERROR |      _in_dict = {'topic': 'smarthome/things/zigbee:device:01382BDE:00158d0002b5b788/firmware/status',
[2020-10-30 21:31:39,590] [                   HABApp]    ERROR |                  'payload': '{"thingUID":{"segments":["zigbee","device","01382BDE","00158d0002b5b788"]},"firmwareStatus":"UNKNOWN"}',
[2020-10-30 21:31:39,591] [                   HABApp]    ERROR |                  'type': 'FirmwareStatusInfoEvent'}
[2020-10-30 21:31:39,591] [                   HABApp]    ERROR |      OpenhabEvent = <class 'HABApp.openhab.events.base_event.OpenhabEvent'>
[2020-10-30 21:31:39,592] [                   HABApp]    ERROR |      payload = {'thingUID': {'segments': [...]},
[2020-10-30 21:31:39,592] [                   HABApp]    ERROR |                 'firmwareStatus': 'UNKNOWN'}
[2020-10-30 21:31:39,593] [                   HABApp]    ERROR |      p_str = '{"thingUID":{"segments":["zigbee","device","01382BDE","00158d0002b5b788"]},"firmwareStatus":"UNKNOWN"}'
[2020-10-30 21:31:39,593] [                   HABApp]    ERROR |      __event_lookup = {'ItemStateEvent': <class 'HABApp.openhab.events.item_events.ItemStateEvent'>,
[2020-10-30 21:31:39,594] [                   HABApp]    ERROR |                        'ItemStateChangedEvent': <class 'HABApp.openhab.events.item_events.ItemStateChangedEvent'>,
[2020-10-30 21:31:39,595] [                   HABApp]    ERROR |                        'ItemCommandEvent': <class 'HABApp.openhab.events.item_events.ItemCommandEvent'>,
[2020-10-30 21:31:39,595] [                   HABApp]    ERROR |                        'ItemAddedEvent': <class 'HABApp.openhab.events.item_events.ItemAddedEvent'>,
[2020-10-30 21:31:39,596] [                   HABApp]    ERROR |                        'ItemUpdatedEvent': <class 'HABApp.openhab.events.item_events.ItemUpdatedEvent'>,
[2020-10-30 21:31:39,596] [                   HABApp]    ERROR |                        'ItemRemovedEvent': <class 'HABApp.openhab.events.item_events.ItemRemovedEvent'>,
[2020-10-30 21:31:39,597] [                   HABApp]    ERROR |                        'ItemStatePredictedEvent': <class 'HABApp.openhab.events.item_events.ItemStatePredictedEvent'>,
[2020-10-30 21:31:39,597] [                   HABApp]    ERROR |                        'GroupItemStateChangedEvent': <class 'HABApp.openhab.events.item_events.GroupItemStateChangedEvent'>,
[2020-10-30 21:31:39,599] [                   HABApp]    ERROR |                        'ChannelTriggeredEvent': <class 'HABApp.openhab.events.channel_events.ChannelTriggeredEvent'>,
[2020-10-30 21:31:39,599] [                   HABApp]    ERROR |                        'ThingStatusInfoEvent': <class 'HABApp.openhab.events.thing_events.ThingStatusInfoEvent'>,
[2020-10-30 21:31:39,601] [                   HABApp]    ERROR |                        'ThingStatusInfoChangedEv...: <class 'HABApp.openhab.events.thing_events.ThingStatusInfoChangedEvent'>,
[2020-10-30 21:31:39,601] [                   HABApp]    ERROR |                        'ConfigStatusInfoEvent': <class 'HABApp.openhab.events.thing_events.ThingConfigStatusInfoEvent'>}
[2020-10-30 21:31:39,602] [                   HABApp]    ERROR |      event_type = 'FirmwareStatusInfoEvent'
[2020-10-30 21:31:39,603] [                   HABApp]    ERROR |      topic = 'smarthome/things/zigbee:device:01382BDE:00158d0002b5b788/firmware/status'
[2020-10-30 21:31:39,603] [                   HABApp]    ERROR |     ..................................................
[2020-10-30 21:31:39,604] [                   HABApp]    ERROR | 
[2020-10-30 21:31:39,604] [                   HABApp]    ERROR | KeyError: 'FirmwareStatusInfoEvent'
[2020-10-30 21:31:39,605] [                   HABApp]    ERROR | 
[2020-10-30 21:31:39,605] [                   HABApp]    ERROR | While handling the above exception, another exception occurred:
[2020-10-30 21:31:39,606] [                   HABApp]    ERROR | 
[2020-10-30 21:31:39,607] [                   HABApp]    ERROR | File "/usr/src/app/HABApp/core/wrapper.py", line 130, in f
[2020-10-30 21:31:39,607] [                   HABApp]    ERROR |     return func(*args, **kwargs)
[2020-10-30 21:31:39,607] [                   HABApp]    ERROR | File "/usr/src/app/HABApp/openhab/connection_logic/connection.py", line 41, in on_sse_event
[2020-10-30 21:31:39,608] [                   HABApp]    ERROR |     37   @ignore_exception
[2020-10-30 21:31:39,609] [                   HABApp]    ERROR |     38   def on_sse_event(event_dict: dict):
[2020-10-30 21:31:39,609] [                   HABApp]    ERROR |     39   
[2020-10-30 21:31:39,610] [                   HABApp]    ERROR |     40       # Lookup corresponding OpenHAB event
[2020-10-30 21:31:39,610] [                   HABApp]    ERROR | --> 41       event = get_event(event_dict)
[2020-10-30 21:31:39,611] [                   HABApp]    ERROR |     42   
[2020-10-30 21:31:39,611] [                   HABApp]    ERROR |     ..................................................
[2020-10-30 21:31:39,612] [                   HABApp]    ERROR |      event_dict = {'topic': 'smarthome/things/zigbee:device:01382BDE:00158d0002b5b788/firmware/status',
[2020-10-30 21:31:39,613] [                   HABApp]    ERROR |                    'payload': '{"thingUID":{"segments":["zigbee","device","01382BDE","00158d0002b5b788"]},"firmwareStatus":"UNKNOWN"}',
[2020-10-30 21:31:39,613] [                   HABApp]    ERROR |                    'type': 'FirmwareStatusInfoEvent'}
[2020-10-30 21:31:39,614] [                   HABApp]    ERROR |     ..................................................
[2020-10-30 21:31:39,614] [                   HABApp]    ERROR | 
[2020-10-30 21:31:39,615] [                   HABApp]    ERROR | File "/usr/src/app/HABApp/openhab/map_events.py", line 40, in get_event
[2020-10-30 21:31:39,615] [                   HABApp]    ERROR |     26   def get_event(_in_dict: dict) -> OpenhabEvent:
[2020-10-30 21:31:39,616] [                   HABApp]    ERROR |  (...)
[2020-10-30 21:31:39,617] [                   HABApp]    ERROR |     36       # Find event from implemented events
[2020-10-30 21:31:39,617] [                   HABApp]    ERROR |     37       try:
[2020-10-30 21:31:39,618] [                   HABApp]    ERROR |     38           return __event_lookup[event_type].from_dict(topic, payload)
[2020-10-30 21:31:39,619] [                   HABApp]    ERROR |     39       except KeyError:
[2020-10-30 21:31:39,619] [                   HABApp]    ERROR | --> 40           raise ValueError(f'Unknown Event: {event_type:s} for {_in_dict}')
[2020-10-30 21:31:39,620] [                   HABApp]    ERROR |     ..................................................
[2020-10-30 21:31:39,620] [                   HABApp]    ERROR |      _in_dict = {'topic': 'smarthome/things/zigbee:device:01382BDE:00158d0002b5b788/firmware/status',
[2020-10-30 21:31:39,621] [                   HABApp]    ERROR |                  'payload': '{"thingUID":{"segments":["zigbee","device","01382BDE","00158d0002b5b788"]},"firmwareStatus":"UNKNOWN"}',
[2020-10-30 21:31:39,621] [                   HABApp]    ERROR |                  'type': 'FirmwareStatusInfoEvent'}
[2020-10-30 21:31:39,622] [                   HABApp]    ERROR |      OpenhabEvent = <class 'HABApp.openhab.events.base_event.OpenhabEvent'>
[2020-10-30 21:31:39,623] [                   HABApp]    ERROR |      __event_lookup = {'ItemStateEvent': <class 'HABApp.openhab.events.item_events.ItemStateEvent'>,
[2020-10-30 21:31:39,623] [                   HABApp]    ERROR |                        'ItemStateChangedEvent': <class 'HABApp.openhab.events.item_events.ItemStateChangedEvent'>,
[2020-10-30 21:31:39,624] [                   HABApp]    ERROR |                        'ItemCommandEvent': <class 'HABApp.openhab.events.item_events.ItemCommandEvent'>,
[2020-10-30 21:31:39,624] [                   HABApp]    ERROR |                        'ItemAddedEvent': <class 'HABApp.openhab.events.item_events.ItemAddedEvent'>,
[2020-10-30 21:31:39,625] [                   HABApp]    ERROR |                        'ItemUpdatedEvent': <class 'HABApp.openhab.events.item_events.ItemUpdatedEvent'>,
[2020-10-30 21:31:39,626] [                   HABApp]    ERROR |                        'ItemRemovedEvent': <class 'HABApp.openhab.events.item_events.ItemRemovedEvent'>,
[2020-10-30 21:31:39,626] [                   HABApp]    ERROR |                        'ItemStatePredictedEvent': <class 'HABApp.openhab.events.item_events.ItemStatePredictedEvent'>,
[2020-10-30 21:31:39,627] [                   HABApp]    ERROR |                        'GroupItemStateChangedEvent': <class 'HABApp.openhab.events.item_events.GroupItemStateChangedEvent'>,
[2020-10-30 21:31:39,627] [                   HABApp]    ERROR |                        'ChannelTriggeredEvent': <class 'HABApp.openhab.events.channel_events.ChannelTriggeredEvent'>,
[2020-10-30 21:31:39,628] [                   HABApp]    ERROR |                        'ThingStatusInfoEvent': <class 'HABApp.openhab.events.thing_events.ThingStatusInfoEvent'>,
[2020-10-30 21:31:39,629] [                   HABApp]    ERROR |                        'ThingStatusInfoChangedEv...: <class 'HABApp.openhab.events.thing_events.ThingStatusInfoChangedEvent'>,
[2020-10-30 21:31:39,629] [                   HABApp]    ERROR |                        'ConfigStatusInfoEvent': <class 'HABApp.openhab.events.thing_events.ThingConfigStatusInfoEvent'>}
[2020-10-30 21:31:39,630] [                   HABApp]    ERROR |      event_type = 'FirmwareStatusInfoEvent'
[2020-10-30 21:31:39,630] [                   HABApp]    ERROR |      topic = 'smarthome/things/zigbee:device:01382BDE:00158d0002b5b788/firmware/status'
[2020-10-30 21:31:39,631] [                   HABApp]    ERROR |      payload = {'thingUID': {'segments': [...]},
[2020-10-30 21:31:39,631] [                   HABApp]    ERROR |                 'firmwareStatus': 'UNKNOWN'}
[2020-10-30 21:31:39,632] [                   HABApp]    ERROR |     ..................................................
[2020-10-30 21:31:39,633] [                   HABApp]    ERROR | 
```

Discussion:

Patch:
diff --git a/.github/workflows/publish-dockerhub.yml b/.github/workflows/publish-dockerhub.yml
new file mode 100644
index 0000000..ba0e368
--- /dev/null
+++ b/.github/workflows/publish-dockerhub.yml
@@ -0,0 +1,51 @@
+name: Publish HABApp distributions to dockerhub
+on:
+  release:
+    types: [published]
+
+jobs:
+  buildx:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          ref: master
+
+      - name: Get Latest Release
+        id: latest_version
+        uses: abatilo/release-info-action@v1.3.0
+        with:
+          owner: spacemanspiff2007
+          repo: HABApp
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+        with:
+          platforms: all
+
+      - name: Set up Docker Buildx
+        id: buildx
+        uses: docker/setup-buildx-action@v1
+        with:
+          version: latest
+
+      - name: Available platforms
+        run: echo ${{ steps.buildx.outputs.platforms }}
+
+      - name: Login to DockerHub
+        uses: docker/login-action@v1 
+        with:
+          username: ${{ secrets.DOCKER_HUB_USER }}
+          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
+          
+      - name: Build and push
+        id: docker_build
+        uses: docker/build-push-action@v2
+        with:
+          push: true
+          tags: |
+            spacemanspiff2007/habapp:latest
+            spacemanspiff2007/habapp:${{ steps.latest_version.outputs.latest_tag }}
+
+      - name: Image digest
+        run: echo ${{ steps.docker_build.outputs.digest }}
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
new file mode 100644
index 0000000..e2b905f
--- /dev/null
+++ b/.github/workflows/publish-pypi.yml
@@ -0,0 +1,33 @@
+name: Publish Python distributions to PyPI
+on:
+  release:
+    types: [published]
+    
+jobs:
+  build-n-publish:
+    name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
+    runs-on: ubuntu-latest
+    
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        ref: master
+    - name: Set up Python 3.8
+      uses: actions/setup-python@v2
+      with:
+        python-version: 3.8
+
+    - name: Install setuptools
+      run: |
+        python -m pip install --upgrade pip 
+        python -m pip install --upgrade setuptools wheel twine
+
+    - name: Build a binary wheel and a source tarball
+      run: |
+        python setup.py sdist bdist_wheel
+
+    - name: Publish distribution to PyPI
+      uses: pypa/gh-action-pypi-publish@master
+      with:
+        user: __token__
+        password: ${{ secrets.pypi_password }}
diff --git a/HABApp/__version__.py b/HABApp/__version__.py
index 90fdbaa..b0615a6 100644
--- a/HABApp/__version__.py
+++ b/HABApp/__version__.py
@@ -1,1 +1,1 @@
-__version__ = '0.16.0'
+__version__ = '0.16.1'
diff --git a/HABApp/openhab/events/__init__.py b/HABApp/openhab/events/__init__.py
index 6012587..216e0f5 100644
--- a/HABApp/openhab/events/__init__.py
+++ b/HABApp/openhab/events/__init__.py
@@ -2,4 +2,5 @@ from .base_event import OpenhabEvent
 from .item_events import ItemStateEvent, ItemStateChangedEvent, ItemCommandEvent, ItemAddedEvent,\
     ItemUpdatedEvent, ItemRemovedEvent, ItemStatePredictedEvent, GroupItemStateChangedEvent
 from .channel_events import ChannelTriggeredEvent
-from .thing_events import ThingStatusInfoChangedEvent, ThingStatusInfoEvent, ThingConfigStatusInfoEvent
+from .thing_events import ThingStatusInfoChangedEvent, ThingStatusInfoEvent, \
+    ThingConfigStatusInfoEvent, ThingFirmwareStatusInfoEvent
diff --git a/HABApp/openhab/events/thing_events.py b/HABApp/openhab/events/thing_events.py
index 3c91a88..eb43e85 100644
--- a/HABApp/openhab/events/thing_events.py
+++ b/HABApp/openhab/events/thing_events.py
@@ -65,3 +65,18 @@ class ThingConfigStatusInfoEvent(OpenhabEvent):
 
     def __repr__(self):
         return f'<{self.__class__.__name__} name: {self.name}, messages: {self.messages}>'
+
+
+class ThingFirmwareStatusInfoEvent(OpenhabEvent):
+    def __init__(self, name: str = '', status: str = ''):
+        super().__init__()
+        self.name: str = name
+        self.status: str = status
+
+    @classmethod
+    def from_dict(cls, topic: str, payload: dict):
+        # 'smarthome/things/zwave:device:controller:my_node/firmware/status'
+        return cls(name=topic[NAME_START:-16], status=payload['firmwareStatus'])
+
+    def __repr__(self):
+        return f'<{self.__class__.__name__} status: {self.status}>'
diff --git a/HABApp/openhab/map_events.py b/HABApp/openhab/map_events.py
index e249224..c96e4fa 100644
--- a/HABApp/openhab/map_events.py
+++ b/HABApp/openhab/map_events.py
@@ -5,7 +5,7 @@ from .events import OpenhabEvent, \
     ItemStateEvent, ItemStateChangedEvent, ItemCommandEvent, ItemAddedEvent, \
     ItemUpdatedEvent, ItemRemovedEvent, ItemStatePredictedEvent, GroupItemStateChangedEvent, \
     ChannelTriggeredEvent, \
-    ThingStatusInfoChangedEvent, ThingStatusInfoEvent, ThingConfigStatusInfoEvent
+    ThingStatusInfoChangedEvent, ThingStatusInfoEvent, ThingConfigStatusInfoEvent, ThingFirmwareStatusInfoEvent
 
 EVENT_LIST = [
     # item events
@@ -16,11 +16,12 @@ EVENT_LIST = [
     ChannelTriggeredEvent,
 
     # thing events
-    ThingStatusInfoEvent, ThingStatusInfoChangedEvent
+    ThingStatusInfoEvent, ThingStatusInfoChangedEvent, ThingFirmwareStatusInfoEvent
 ]
 
 __event_lookup: typing.Dict[str, typing.Type[OpenhabEvent]] = {k.__name__: k for k in EVENT_LIST}
-__event_lookup['ConfigStatusInfoEvent'] = ThingConfigStatusInfoEvent    # Naming from openhab is inconsistent here
+__event_lookup['ConfigStatusInfoEvent'] = ThingConfigStatusInfoEvent        # Naming from openhab is inconsistent here
+__event_lookup['FirmwareStatusInfoEvent'] = ThingFirmwareStatusInfoEvent    # Naming from openhab is inconsistent here
 
 
 def get_event(_in_dict: dict) -> OpenhabEvent:
diff --git a/HABApp/rule/rule.py b/HABApp/rule/rule.py
index dcdfab3..63cb647 100644
--- a/HABApp/rule/rule.py
+++ b/HABApp/rule/rule.py
@@ -239,7 +239,7 @@ class Rule:
         assert isinstance(time, datetime.time), type(time)
         cb = HABApp.core.WrappedFunction(callback, name=self.__get_rule_name(callback))
         future_event = DayOfWeekScheduledCallback(cb, *args, **kwargs)
-        future_event.weekdays([1, 2, 3, 4, 5, 6, 7])
+        future_event.weekdays('all')
         future_event.time(time)
         self.__future_events.append(future_event)
         return future_event
diff --git a/HABApp/rule/scheduler/reoccurring_cb.py b/HABApp/rule/scheduler/reoccurring_cb.py
index 440934a..d19ded2 100644
--- a/HABApp/rule/scheduler/reoccurring_cb.py
+++ b/HABApp/rule/scheduler/reoccurring_cb.py
@@ -3,7 +3,7 @@ from datetime import datetime, time, timedelta
 
 from pytz import utc
 
-from .base import ScheduledCallbackBase
+from .base import ScheduledCallbackBase, local_tz
 
 
 class ReoccurringScheduledCallback(ScheduledCallbackBase):
@@ -51,6 +51,8 @@ class DayOfWeekScheduledCallback(ScheduledCallbackBase):
             weekdays = [6, 7]
         elif weekdays == 'workday':
             weekdays = [1, 2, 3, 4, 5]
+        elif weekdays == 'all':
+            weekdays = [1, 2, 3, 4, 5, 6, 7]
         for k in weekdays:
             assert 1 <= k <= 7, k
         self._weekdays = weekdays
@@ -60,12 +62,11 @@ class DayOfWeekScheduledCallback(ScheduledCallbackBase):
 
         # we have to do it like this so the dst-change works,
         # otherwise we have the wrong hour after the change
-        next_date = (self._next_base.date() + timedelta(days=1)) if add_day else self._next_base.date()
-        loc = datetime.combine(next_date, self._time)
+        next_utc = self._next_base + timedelta(days=1) if add_day else self._next_base
+        loc = datetime.combine(next_utc.astimezone(local_tz).date(), self._time)
 
         while not loc.isoweekday() in self._weekdays:
-            next_date += timedelta(days=1)
-            loc = datetime.combine(next_date, self._time)
+            loc += timedelta(days=1)
 
         self._next_base = loc.astimezone(utc)
         self._update_run_time()
diff --git a/requirements.txt b/requirements.txt
index 7daa716..8b10c4a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,7 +6,7 @@ easyco==0.2.2
 paho-mqtt==1.5.1
 pydantic==1.6.1
 pytz==2020.1
-stackprinter==0.2.4
+stackprinter==0.2.5
 tzlocal==2.1
 voluptuous==0.12.0
 watchdog==0.10.3


Test patch:
diff --git a/tests/test_openhab/test_events/test_from_dict.py b/tests/test_openhab/test_events/test_from_dict.py
index 9fc6140..cafe359 100644
--- a/tests/test_openhab/test_events/test_from_dict.py
+++ b/tests/test_openhab/test_events/test_from_dict.py
@@ -2,7 +2,7 @@ import datetime
 
 from HABApp.openhab.events import ChannelTriggeredEvent, GroupItemStateChangedEvent, ItemAddedEvent, ItemCommandEvent, \
     ItemStateChangedEvent, ItemStateEvent, ItemStatePredictedEvent, ItemUpdatedEvent, ThingConfigStatusInfoEvent, \
-    ThingStatusInfoChangedEvent, ThingStatusInfoEvent
+    ThingStatusInfoChangedEvent, ThingStatusInfoEvent, ThingFirmwareStatusInfoEvent
 from HABApp.openhab.map_events import get_event
 
 
@@ -166,3 +166,15 @@ def test_thing_ConfigStatusInfoEvent():
     assert isinstance(event, ThingConfigStatusInfoEvent)
     assert event.name == 'zwave:device:controller:my_node'
     assert event.messages == [{"parameterName": "switchall_mode", "type": "PENDING"}]
+
+
+def test_thing_FirmwareStatusEvent():
+    data = {
+        'topic': 'openhab/things/zigbee:device:12345678:9abcdefghijklmno/firmware/status',
+        'payload':
+            '{"thingUID":{"segments":["zigbee","device","12345678","9abcdefghijklmno"]},"firmwareStatus":"UNKNOWN"}',
+        'type': 'FirmwareStatusInfoEvent'
+    }
+    event = get_event(data)
+    assert isinstance(event, ThingFirmwareStatusInfoEvent)
+    assert event.status == 'UNKNOWN'
diff --git a/tests/test_openhab/test_events/test_from_dict_oh2.py b/tests/test_openhab/test_events/test_from_dict_oh2.py
index fc3f695..93fc813 100644
--- a/tests/test_openhab/test_events/test_from_dict_oh2.py
+++ b/tests/test_openhab/test_events/test_from_dict_oh2.py
@@ -4,7 +4,7 @@ import pytest
 from HABApp.openhab.connection_handler.http_connection import patch_for_oh2
 from HABApp.openhab.events import ChannelTriggeredEvent, GroupItemStateChangedEvent, ItemAddedEvent, ItemCommandEvent, \
     ItemStateChangedEvent, ItemStateEvent, ItemStatePredictedEvent, ItemUpdatedEvent, ThingConfigStatusInfoEvent, \
-    ThingStatusInfoChangedEvent, ThingStatusInfoEvent
+    ThingStatusInfoChangedEvent, ThingStatusInfoEvent, ThingFirmwareStatusInfoEvent
 from HABApp.openhab.map_events import get_event
 
 
@@ -175,3 +175,15 @@ def test_thing_ConfigStatusInfoEvent(oh2_event):
     assert isinstance(event, ThingConfigStatusInfoEvent)
     assert event.name == 'zwave:device:controller:my_node'
     assert event.messages == [{"parameterName": "switchall_mode", "type": "PENDING"}]
+
+
+def test_thing_FirmwareStatusEvent(oh2_event):
+    data = {
+        'topic': 'smarthome/things/zigbee:device:12345678:9abcdefghijklmno/firmware/status',
+        'payload':
+            '{"thingUID":{"segments":["zigbee","device","12345678","9abcdefghijklmno"]},"firmwareStatus":"UNKNOWN"}',
+        'type': 'FirmwareStatusInfoEvent'
+    }
+    event = get_event(data)
+    assert isinstance(event, ThingFirmwareStatusInfoEvent)
+    assert event.status == 'UNKNOWN'
diff --git a/tests/test_rule/test_scheduler.py b/tests/test_rule/test_scheduler.py
index 3f3166a..169e4fd 100644
--- a/tests/test_rule/test_scheduler.py
+++ b/tests/test_rule/test_scheduler.py
@@ -73,6 +73,22 @@ def test_weekend():
     assert s.get_next_call() == datetime(2001, 1, 21, 12)
 
 
+def test_every_day():
+    func.mock.reset_mock()
+    s = scheduler.DayOfWeekScheduledCallback(func)
+
+    s.weekdays('all')
+    s.time(time(hour=0, minute=0))
+
+    now = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
+
+    assert s.get_next_call() == now + timedelta(days=1)
+    s._calculate_next_call()
+    assert s.get_next_call() == now + timedelta(days=2)
+    s._calculate_next_call()
+    assert s.get_next_call() == now + timedelta(days=3)
+
+
 def test_sun():
     HABApp.CONFIG.location.latitude = 52.52437
     HABApp.CONFIG.location.longitude = 13.41053