Zitat von: heinzfo am 14 Dezember 2025, 20:33:51welchen state gibt das holiday Modul z.B. am 25.12. zurück?
Feiertag oder 1. Weihnachtstag
get by 12-25{
my $oilprice = ReadingsNum($name,'Heizoelpreis',0);
my $lastcheck = ReadingsTimestamp($name,'Heizoelpreis','');
my $zip = AttrNum($name,'replacement01Value',0);
my $amount = AttrNum($name,'replacement02Value',0);
my $stations = AttrNum($name,'replacement03Value',0);
my $price = $amount*$oilprice/100;
my $link = qq(https://www.heizoel24.de/heizoel/angebotsliste?zipCode=$zip&amount=$amount&stations=$stations&product=1);
return sprintf(
q(<div style="text-align: left;">%s: <a href="%s" rel="noopener noreferrer" target="_blank" style="font-weight:bold">%.2f€</a>/100l (%sL = %.2f€)</div>),$lastcheck,$link,$oilprice,$amount,$price);
}