From 27dceda9233c21df65253c4b40238543777f2d37 Mon Sep 17 00:00:00 2001 From: Starkstrombastler <> Date: Wed, 6 Nov 2024 13:58:48 +0000 Subject: [PATCH] 36_Shelly: add reading 'temperature' for ShellyPlusUni git-svn-id: https://svn.fhem.de/fhem/trunk@29334 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 +- fhem/FHEM/36_Shelly.pm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index eac244adf..e650b4f48 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +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 - - feature: 70_BRAVIA: add set enable / disable + - featur: 36_Shelly: reading 'temperature' for ShellyPlusUni - bugfix: 36_Shelly: bad firmware identification - bugfix: 72_XiaomiDevice: requested fix for crash - change: 76_SolarForecast: attr setupInverterDevXX: new key 'limit', diff --git a/fhem/FHEM/36_Shelly.pm b/fhem/FHEM/36_Shelly.pm index b937160bd..6ea170098 100644 --- a/fhem/FHEM/36_Shelly.pm +++ b/fhem/FHEM/36_Shelly.pm @@ -125,6 +125,8 @@ # 6.01.2 add: Shelly Plug S MTR Gen3 # 6.01.3 fix: bad firmware identification # add: reading 'firmware_ID' (Gen2) +# 6.01.4 fix: use of defined-or operator +# 6.01.5 add: reading 'temperature' for ShellyPlusUni # to do roller: get maxtime open/close from shelly gen1 # get status on stopp even when interval == 0 @@ -147,7 +149,7 @@ sub Shelly_Set ($@); sub Shelly_status(@); #-- globals on start -my $version = "6.01.3 01.11.2024"; +my $version = "6.01.5 06.11.2024"; my $defaultINTERVAL = 60; my $multiplyIntervalOnError = 1.0; # mechanism disabled if value=1 @@ -4310,6 +4312,8 @@ if( $hash->{helper}{timer}>0 ){ if( defined $percent ){ readingsBulkUpdateMonitored($hash,"input$subs",$percent.$si_units{pct}[$hash->{units}]); } + my $temperature = $jhash->{'temperature:100'}{tC}; + readingsBulkUpdateMonitored($hash,"temperature",$temperature.$si_units{tempC}[$hash->{units}] ) if( defined($temperature) ); } # set state of 'input-only' devices to OK (may have state 'error') readingsBulkUpdateMonitored($hash,"state","OK") if( $model eq "shellyplusi4" );