Added high_tarif reading

This commit is contained in:
Aart van Halteren
2013-07-01 02:43:03 -05:00
parent 1b04175394
commit 96071fb9b5

View File

@@ -67,7 +67,9 @@ class InSyncState < StatePattern::State
end end
if line.match(/1-0:2.7.0/) # Actueel terug 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 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 end
if next_is_gas && line.match(/\(/) if next_is_gas && line.match(/\(/)
next_is_gas = false next_is_gas = false