SolarEdgeAPI: allow smaller intervals for API queries

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22510 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
pizmus 2020-08-01 10:19:18 +00:00
parent 261bff5158
commit 136ab2c50d
2 changed files with 6 additions and 3 deletions

View File

@ -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: 70_SolarEdgeAPI: allow smaller intervals for API queries
- change: 66_EseraOneWire: switching to recommended firmware version 12029
- feature: 60_Watches: attr timeAsReading -> write displayed time to reading
currtime

View File

@ -156,12 +156,14 @@ eval "use JSON;1" or $solarEdgeAPI_missingModul .= "JSON ";
#
# 2.1.0 generate daily readings at ~23:59 instead of 22:00
#
# 2.2.0 allow smaller values for attributes intervalAtDayTime and intervalAtNightTime
#
###############################################################################
sub SolarEdgeAPI_SetVersion($)
{
my ($hash) = @_;
$hash->{VERSION} = "2.1.0";
$hash->{VERSION} = "2.2.0";
}
###############################################################################
@ -349,7 +351,7 @@ sub SolarEdgeAPI_Attr(@)
{
if ($cmd eq "set")
{
if (($attrVal eq "auto") || ($attrVal >= 120))
if (($attrVal eq "auto") || ($attrVal >= 1))
{
InternalTimer(gettimeofday() + 5, 'SolarEdgeAPI_RestartHttpRequestTimers', $hash);
Log3 $name, 3, "SolarEdgeAPI ($name) - attribute intervalAtDayTime set to $attrVal";
@ -372,7 +374,7 @@ sub SolarEdgeAPI_Attr(@)
{
if ($cmd eq "set")
{
if (($attrVal < 120) or ($attrVal > 3600))
if (($attrVal < 1) or ($attrVal > 3600))
{
my $message = "intervalAtNightTime is out of range";
Log3 $name, 3, "SolarEdgeAPI ($name) - ".$message;