From 96071fb9b5d2e95cc454eaf0b1203238628872b8 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Mon, 1 Jul 2013 02:43:03 -0500 Subject: [PATCH] Added high_tarif reading --- app/helpers/InSyncState.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/InSyncState.rb b/app/helpers/InSyncState.rb index d1291f1..1298750 100644 --- a/app/helpers/InSyncState.rb +++ b/app/helpers/InSyncState.rb @@ -67,7 +67,9 @@ class InSyncState < StatePattern::State end if line.match(/1-0:2.7.0/) # Actueel terug reading.current_kw_produced = line.split(/1-0:2.7.0\(|\*kW\)/).join.to_f - # p "Current kW produced #{current_kw_produced}." + end + if line.match(/0-0:96.3.10/) # Hoog/laag tarief + reading.high_tarif = line.split(/0-0:96.3.10\(|\)/).join.eql?("1") end if next_is_gas && line.match(/\(/) next_is_gas = false