// Copyright (C) 2026 Fredrik Öhrström (gpl-3.0-or-later)
driver {
    name           = gwfgas
    meter_type     = GasMeter
    default_fields = name,id,total_m3,target_m3,timestamp
    detect {
        mvt = GWF,3c,03
    }
    library {
        use = total_m3
        use = target_m3
        use = target_date
        use = actuality_duration_s
    }
    fields {
        field {
            name       = status
            quantity   = Text
            attributes = STATUS,INCLUDE_TPL_STATUS
        }
    }
    tests {
        test {
            args     = 'mygas1 gwfgas 23115250 NOKEY'
            telegram = 3644E61E32616600020E7250521123E61E3C031B0020652F2F_03745E00000413FE8D0100441300000000426C000002FD74B10F0F0100A8
            json     = '{"_": "telegram","status":"OK","actuality_duration_s": 94,"id": "23115250","media": "gas","meter": "gwfgas","name": "mygas1","target_date": "1999-11-30","target_m3": 0,"timestamp": "1111-11-11T11:11:11Z","total_m3": 101.886}'
            fields   = 'mygas1;23115250;101.886;0;1111-11-11 11:11.11'
        }
    }
}