Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
msinn committed May 8, 2022
2 parents ec22433 + 2de0c17 commit 7853ac1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test_dispatch_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "SmartHomeNG Unittest Workflow"
on:
push:
branches:
- develop
pull_request:
types: [opened]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04 #latest
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Dispatch to Unit Tests
run: |
curl -XPOST \
-H "Authorization: Bearer ${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.v3+json" \
-H "Content-Type:application/json" https://api.github.com/repos/smarthomeNG/tests/actions/workflows/unittests.yml/dispatches \
--data '{"ref": "main", "inputs": { "branch":"${{steps.extract_branch.outputs.branch}}" }}'
2 changes: 1 addition & 1 deletion casambi/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parameters:
item_attributes:
# Definition of item attributes defined by this plugin (enter 'item_attributes: NONE', if section should be empty)
casambi_id:
type: num
type: int
valid_min: 0
description:
de: 'Casambi Geraete ID'
Expand Down
7 changes: 7 additions & 0 deletions nut/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ class NUT(SmartPlugin):
ALLOW_MULTIINSTANCE = True

def __init__(self, sh, ups, cycle = 60, host = 'localhost', port = 3493, timeout = 5):
"""
Initalizes the plugin.
"""

# Call init code of parent class (SmartPlugin)
super().__init__()

self._sh = sh
self._cycle = int(cycle)
self._host = host
Expand Down
5 changes: 2 additions & 3 deletions resol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ def parse_item(self, item):
self.logger.error(f"resol_offset found in item {item} but no bitsize given, specify bitsize in item with resol_bitsize = ")

def update_item(self, item, caller=None, source=None, dest=None):
if caller != self.get_shortname():
#logger.debug(f"Update item {item.id()} with value {int(item())}")
value = str(int(item()))
# do nothing if items are changed from outside the plugin
pass

def sock(self):
if not self.alive:
Expand Down
2 changes: 1 addition & 1 deletion telegram/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python-telegram-bot>=12.8.0
python-telegram-bot>=12.8.0, <14.0
requests

0 comments on commit 7853ac1

Please sign in to comment.