mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-03 18:27:06 +00:00
Fixed price save
This commit is contained in:
@@ -431,6 +431,8 @@ PricesContainer* PriceService::fetchPrices(time_t t) {
|
||||
tm.Day,
|
||||
config->currency
|
||||
);
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf_P(PSTR("(PriceService) Fetching prices for %02d.%02d.%04d\n"), tm.Day, tm.Month, tm.Year+1970);
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("(PriceService) url: %s\n"), buf);
|
||||
#if defined(ESP8266)
|
||||
WiFiClient client;
|
||||
client.setTimeout(5000);
|
||||
|
||||
@@ -321,7 +321,7 @@ void setup() {
|
||||
hw.ledBlink(LED_BLUE, 1);
|
||||
|
||||
PriceServiceConfig price;
|
||||
if(config.getPriceServiceConfig(price) && price.enabled && strlen(price.area) > 0) {
|
||||
if(config.getPriceServiceConfig(price)) {
|
||||
ps = new PriceService(&Debug);
|
||||
ps->setup(price);
|
||||
ws.setPriceService(ps);
|
||||
|
||||
Reference in New Issue
Block a user