From 9492eb0d064d6eb8949b5479ea6c67adeebe43d1 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Sat, 28 Dec 2019 11:05:52 +0000 Subject: [PATCH] 73_AutoShuttersControl: little Bugfix, add devStateIcon Fn git-svn-id: https://svn.fhem.de/fhem/trunk@20840 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/73_AutoShuttersControl.pm | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index a9db5e73f..16b285fd0 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: 73_AutoShuttersControl: little Bugfix, add devStateIcon Fn - change: 93_DbLog: avoid FHEM from crash if SVG requests a wrong date/time format, Forum: #101005 - feature 14_SD_UT: new model remote control with 4 buttons for dieselheating diff --git a/fhem/FHEM/73_AutoShuttersControl.pm b/fhem/FHEM/73_AutoShuttersControl.pm index 55a878f54..e88fbb8b6 100644 --- a/fhem/FHEM/73_AutoShuttersControl.pm +++ b/fhem/FHEM/73_AutoShuttersControl.pm @@ -443,6 +443,12 @@ sub Notify($$) { if ( $ascDev->getAutoShuttersControlShading eq 'none' ); readingsSingleUpdate( $hash, 'ascEnable', 'on', 0 ) if ( $ascDev->getASCenable eq 'none' ); + CommandAttr(undef,$name . ' devStateIcon { AutoShuttersControl_DevStateIcon($name) }') + unless( AttrVal($name,'devStateIcon','{ AutoShuttersControl_DevStateIcon($name) }') eq '{ AutoShuttersControl_DevStateIcon($name) }' ); + CommandDeleteAttr(undef,$name . ' event-on-change-reading') + unless( AttrVal($name,'event-on-change-reading','none') eq 'none' ); + CommandDeleteAttr(undef,$name . ' event-on-update-reading') + unless( AttrVal($name,'event-on-update-reading','none') eq 'none' ); # Ist der Event ein globaler und passt zum Rest der Abfrage oben wird nach neuen Rolläden Devices gescannt und eine Liste im Rolladenmodul sortiert nach Raum generiert ShuttersDeviceScan($hash) @@ -4266,7 +4272,7 @@ sub DevStateIcon($) { elsif ( ReadingsVal( $name, 'state', undef ) =~ /.*asleep$/ ) { return '.*:scene_sleeping'; } - elsif ( ReadingsVal( $name, 'state', undef ) =~ /^roommate.(awoken|home)$/ ) + elsif ( ReadingsVal( $name, 'state', undef ) =~ /^roommate(.come)?.(awoken|home)$/ ) { return '.*:user_available'; } @@ -7897,7 +7903,7 @@ sub getblockAscDrivesAfterManual { ], "release_status": "under develop", "license": "GPL_2", - "version": "v0.8.7", + "version": "v0.8.8", "author": [ "Marko Oldenburg " ],