File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -293,13 +293,16 @@ void stopwatchCounter() {
293293 Blynk.virtualWrite (vPIN_ENERGY_TIME, days + hours_o + hours + mins_o + mins + secs_o + secs);
294294}
295295
296- # ifdef FIXED_ENERGY_PRICE
296+
297297// This section is for setting the kWh price from your electric company.
298298// I use a SPOT rate which means I need to update it all the time.
299299// If you know your set price per kWh (in cents), then enter the price in settings: FIXED_ENERGY_PRICE
300300void getPrice () {
301+ #ifdef FIXED_ENERGY_PRICE
301302 Blynk.virtualWrite (vPIN_ENERGY_API, ENERGY_API); // local API Server to get current power price per mWh
303+ #endif
302304}
305+ #ifdef FIXED_ENERGY_PRICE
303306BLYNK_WRITE (vPIN_ENERGY_API) {
304307 energyPrice = param.asFloat ();
305308 Blynk.virtualWrite (vPIN_ENERGY_PRICE, String (energyPrice, 4 ) + String (' c' ) );
You can’t perform that action at this time.
0 commit comments