{
  "schemaVersion": 1,
  "slug": "lumens-to-watts-converter",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "f75c852d0b9d92c52105cacc022f07ebfb3169ec6a84469cc516c5b81eee4001",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/lumens-to-watts-converter.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "watts = lumens ÷ efficacy; kWh/year = watts ÷ 1000 × hours/day × 365; cost = kWh × electricityRate",
    "vars": [
      [
        "lumens",
        "light output (lm)"
      ],
      [
        "W",
        "equivalent power (W)"
      ],
      [
        "h",
        "daily use (hours)"
      ],
      [
        "r",
        "electricity rate per kWh"
      ],
      [
        "kWh",
        "annual energy use"
      ],
      [
        "efficacy",
        "user-entered luminous efficacy (lm/W)"
      ]
    ],
    "note": "Efficacy is user-entered in lm/W from product data; watts = lumens ÷ efficacy. Annual use assumes entered hours/day for 365 days."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "if(!Number.isFinite(lumens)||lumens<=0||!Number.isFinite(efficacy)||efficacy<=0)return{watts:null,yearlyKwh:null,yearlyCost:null,__error:'inputError'};const watts=lumens/efficacy,yearlyKwh=watts/1000*hoursPerDay*365;return{watts,yearlyKwh,yearlyCost:yearlyKwh*rate};",
    "inputs": [
      {
        "name": "lumens",
        "type": "number",
        "default": 800,
        "min": 1,
        "max": 100000,
        "step": 10
      },
      {
        "name": "efficacy",
        "type": "number",
        "default": 100,
        "min": 1,
        "max": 250,
        "step": 1,
        "slider": true
      },
      {
        "name": "hoursPerDay",
        "type": "number",
        "default": 5,
        "min": 0,
        "max": 24,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "rate",
        "type": "number",
        "default": 0.17,
        "min": 0,
        "max": 5,
        "step": 0.001,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "watts",
        "precision": 1,
        "unit": "W"
      },
      {
        "name": "yearlyKwh",
        "precision": 2,
        "unit": "kWh"
      },
      {
        "name": "yearlyCost",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
