Convert "on"/"off" values into 1 and 0

Hi all,

I am grabbing data from an xml url and a few variables are not displayed in a number format but as “on” “off” (or “Aus” / “Ein” in German). is there a way to directly read the data in as 0 and 1?

Many thanks!


  urls = ["http://192.168.XX.XX:8086"]

  ## Token for authentication.
  token = "XXX"

  ## Organization is the name of the organization you wish to write to; must exist.
  organization = "XX"

  ## Destination bucket to write into.
  bucket = "BAYROL"

  tagexclude =["tag2"]
	tag2 = ["BAYROL"]

  urls = ["http://192.168.XX.XX/cgi-bin/webgui.fcgi?xmlitem=35.6028"]
  data_format = "xml"

  ## Multiple parsing sections are allowed

    metric_selection = "/pm5"

      id = "id/@name"

      type = "number(/item/@type)"
      label = "string(/item/@label)"
      unit = "string(/item/@unit)"
      value = "number(/item/@value)"
	tag2 = "BAYROL"

processor enum should do the trick