From 66f9f7aa7c49daf1341a02c38fcfde305d6a513d Mon Sep 17 00:00:00 2001 From: arthurdent75 <60071192+arthurdent75@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:26:46 +0100 Subject: [PATCH] Version 2.2.1 Fix #142 --- CHANGELOG.md | 3 +++ config.yaml | 2 +- rootfs/simplescheduler/main.py | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ffc703..2b2706e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +**Version 2.2.1** +- Fix "Simple Scheduler no longer switching on lamps with brightness" (#142) + **Version 2.2** - New feature: add parameters for RGB/CT lights (#138) - New feature: support humidifiers (#135) diff --git a/config.yaml b/config.yaml index 3307086..154f298 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ --- -version: "2.2" +version: "2.2.1" name: Simple Scheduler description: Simple timer on weekly base slug: simplescheduler diff --git a/rootfs/simplescheduler/main.py b/rootfs/simplescheduler/main.py index 02b3d4b..bd72bdd 100644 --- a/rootfs/simplescheduler/main.py +++ b/rootfs/simplescheduler/main.py @@ -630,7 +630,10 @@ def call_ha(eid_list, action, passedvalue, friendly_name): if domain[0] == "light" and value != "": pieces = value.split("|") part_one = pieces[0] - part_two = pieces[1] + if len(pieces) > 1: + part_two = pieces[1] + else: + part_two = '' if part_one[0] == "A": v = int(part_one[1:])