[fix] - update event handled

This commit is contained in:
Sebastian 2022-08-02 14:58:59 +02:00
parent 4b998d19ab
commit 11c5e6650d
3 changed files with 4 additions and 9 deletions

View File

@ -1 +1 @@
[log] - removed valve_names log line
[fix] - remove _valve_ in non valve devices fpr schedules

View File

@ -793,7 +793,7 @@ sub WriteReadings {
my $sub_state = 0; my $sub_value = 0;
while ( my ( $r, $v ) = each %{ $propertie->{value} } ) {
if ( ref( $v ) ne "HASH" ) {
readingsBulkUpdate(
readingsBulkUpdateIfChanged(
$hash,
$decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} . '_'
@ -802,7 +802,7 @@ sub WriteReadings {
);
} else {
while ( my ( $i_r, $i_v ) = each %{ $v } ) {
readingsBulkUpdate(
readingsBulkUpdateIfChanged(
$hash,
$decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} . '_'
@ -1109,11 +1109,6 @@ sub setState {
if ( ReadingsVal( $name, 'device_info-category', 'unknown' ) eq
'sensor' );
# if ( $online_state eq 'offline') {
# readingsBulkUpdate( $hash, 'humidity-humidity', '-1' );
# readingsBulkUpdate( $hash, 'ambient_temperature-temperature', '-1' ) if (ReadingsVal($name, 'device_info-category', 'unknown') eq 'sensor');
# readingsBulkUpdate( $hash, 'light-light', '-1' ) if (ReadingsVal($name, 'device_info-category', 'unknown') eq 'sensor');
# }
#online state sensor I II
readingsBulkUpdate( $hash, 'state',
$online_state eq 'online' ? RigReadingsValue( $hash, $state_string) : RigReadingsValue( $hash, 'offline') );

View File

@ -1,2 +1,2 @@
UPD 2022-07-21_19:43:48 49634 FHEM/73_GardenaSmartBridge.pm
UPD 2022-08-02_14:51:12 79067 FHEM/74_GardenaSmartDevice.pm
UPD 2022-08-02_14:58:44 78714 FHEM/74_GardenaSmartDevice.pm