From 72cf203925834e311af619933dbbe3b612631b52 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Fri, 23 Apr 2021 08:24:36 +0200 Subject: [PATCH] change modul package name and directory structure --- FHEM/46_TeslaPowerwall2AC.pm | 20 ++++++++++---------- controls_TeslaPowerwall2AC.txt | 2 +- lib/FHEM/Devices/Tesla/Powerwall.pm | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/FHEM/46_TeslaPowerwall2AC.pm b/FHEM/46_TeslaPowerwall2AC.pm index 28bfb69..17a4ea2 100644 --- a/FHEM/46_TeslaPowerwall2AC.pm +++ b/FHEM/46_TeslaPowerwall2AC.pm @@ -59,7 +59,7 @@ use warnings; use FHEM::Meta; use GPUtils qw(GP_Export); -require FHEM::Tesla::Powerwall; +require FHEM::Devices::Tesla::Powerwall; #-- Run before package compilation BEGIN { @@ -67,8 +67,8 @@ BEGIN { #-- Export to main context with different name GP_Export( qw( - Initialize - ) + Initialize + ) ); } @@ -76,14 +76,14 @@ sub Initialize { my $hash = shift; - $hash->{GetFn} = \&FHEM::Tesla::Powerwall::Get; - $hash->{SetFn} = \&FHEM::Tesla::Powerwall::Set; - $hash->{DefFn} = \&FHEM::Tesla::Powerwall::Define; - $hash->{UndefFn} = \&FHEM::Tesla::Powerwall::Undef; - $hash->{NotifyFn} = \&FHEM::Tesla::Powerwall::Notify; - $hash->{RenameFn} = \&FHEM::Tesla::Powerwall::Rename; + $hash->{GetFn} = \&FHEM::Devices::Tesla::Powerwall::Get; + $hash->{SetFn} = \&FHEM::Devices::Tesla::Powerwall::Set; + $hash->{DefFn} = \&FHEM::Devices::Tesla::Powerwall::Define; + $hash->{UndefFn} = \&FHEM::Devices::Tesla::Powerwall::Undef; + $hash->{NotifyFn} = \&FHEM::Devices::Tesla::Powerwall::Notify; + $hash->{RenameFn} = \&FHEM::Devices::Tesla::Powerwall::Rename; - $hash->{AttrFn} = \&FHEM::Tesla::Powerwall::Attr; + $hash->{AttrFn} = \&FHEM::Devices::Tesla::Powerwall::Attr; $hash->{AttrList} = 'interval ' . 'disable:1 ' diff --git a/controls_TeslaPowerwall2AC.txt b/controls_TeslaPowerwall2AC.txt index 3ce5091..d9ec3b4 100644 --- a/controls_TeslaPowerwall2AC.txt +++ b/controls_TeslaPowerwall2AC.txt @@ -1 +1 @@ -UPD 2021-04-23_08:18:27 6866 FHEM/46_TeslaPowerwall2AC.pm +UPD 2021-04-23_08:24:15 6944 FHEM/46_TeslaPowerwall2AC.pm diff --git a/lib/FHEM/Devices/Tesla/Powerwall.pm b/lib/FHEM/Devices/Tesla/Powerwall.pm index 0aea94f..61bf135 100644 --- a/lib/FHEM/Devices/Tesla/Powerwall.pm +++ b/lib/FHEM/Devices/Tesla/Powerwall.pm @@ -52,7 +52,7 @@ ## ## -package FHEM::Tesla::Powerwall; +package FHEM::Devices::Tesla::Powerwall; use strict; use warnings; @@ -464,7 +464,7 @@ sub Timer_GetData { } ::InternalTimer( ::gettimeofday() + $hash->{INTERVAL}, - \&FHEM::Tesla::Powerwall::Timer_GetData, $hash ); + \&FHEM::Devices::Tesla::Powerwall::Timer_GetData, $hash ); ::Log3($name, 4, qq(TeslaPowerwall2AC ($name) - Call ::InternalTimer Timer_GetData)); } @@ -573,7 +573,7 @@ sub ErrorHandling { } #### End Error Handling - ::InternalTimer( ::gettimeofday() + 3, \&FHEM::Tesla::Powerwall::Write, $hash ) + ::InternalTimer( ::gettimeofday() + 3, \&FHEM::Devices::Tesla::Powerwall::Write, $hash ) if ( defined( $hash->{actionQueue} ) && scalar( @{ $hash->{actionQueue} } ) > 0 );