From b303331581b29494a05deb28ea25f0f990e10cc5 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Thu, 17 Jul 2025 12:32:28 +0200 Subject: [PATCH] bug fix --- app/helpers/InSyncState.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/InSyncState.rb b/app/helpers/InSyncState.rb index 9e2fb25..7881ab6 100644 --- a/app/helpers/InSyncState.rb +++ b/app/helpers/InSyncState.rb @@ -80,9 +80,9 @@ class InSyncState < StatePattern::State if line.match(/0-0:96.14.0/) # Hoog/laag tarief reading.high_tarif = line.split(/0-0:96.14.0\(|\)/).join.eql?("0002") end - if match = line.match(/0-1:24.3.0/) # Gas verbruik (1x per uur een nieuwe stand) - p "Gas reading: #{match[1]} (#{match[2]})" - reading.total_m3_gas_consumed = match[3].to_f + if match = line.match(gas_pattern) # Gas verbruik (1x per uur een nieuwe stand) + p "Gas reading: #{match[1]} (#{match[2]})" + reading.total_m3_gas_consumed = match[3].to_f end }