{
    "key": "bh1750",
    "kind": "sensor",
    "model": {
        "aliases": [
            "bh1750"
        ]
    },
    "driver": {
        "runtime": {
            "init": {
                "args": {
                    "i2c": "board.I2C()",
                    "address": "{i2c_address}"
                },
                "class": "adafruit_bh1750.BH1750"
            },
            "apt_packages": [],
            "pip_packages": [
                "adafruit-circuitpython-bh1750"
            ],
            "python_module": "drivers.bh1750"
        },
        "targets": [
            "raspberrypi"
        ],
        "verified": {
            "by": null,
            "os": null,
            "date": null,
            "board": null,
            "reviewed_by": null,
            "evidence_url": null
        },
        "interface": "i2c",
        "connection": {
            "pins": [
                {
                    "role": "sda",
                    "notes": null,
                    "required": true
                },
                {
                    "role": "scl",
                    "notes": null,
                    "required": true
                }
            ],
            "i2c_addresses": [
                "0x23",
                "0x5C"
            ],
            "supply_voltage": "3.3V",
            "level_shift_required": null
        },
        "constraints": {
            "warmup_seconds": null,
            "read_timeout_seconds": 2,
            "min_read_interval_seconds": 1
        },
        "failure_modes": [
            "Address is 0x23 with ADDR low and 0x5C with ADDR high. A floating ADDR pin gives an unstable address.",
            "High resolution mode needs roughly 120ms per conversion. Reading sooner returns the previous sample.",
            "Saturates in direct sunlight. Readings at the top of the range are not trustworthy without an attenuating window."
        ]
    },
    "source": "platform-seed",
    "status": "draft",
    "platform": {
        "name": "BH1750 Ambient Light Sensor",
        "protocol": "i2c",
        "readings": [
            {
                "slug": "illuminance",
                "unit": "lux",
                "label": "Illuminance",
                "data_type": "float",
                "range_max": 65535,
                "range_min": 0,
                "unit_symbol": "lx",
                "device_class": "illuminance",
                "decimal_places": 0,
                "threshold_crit_low": 10,
                "threshold_warn_low": 100,
                "threshold_crit_high": 50000,
                "threshold_warn_high": 10000
            }
        ],
        "description": "Digital 16-bit ambient light sensor over I2C. Used for automatic lighting control and daylight harvesting.",
        "sensor_type": "optical",
        "manufacturer": "ROHM Semiconductor",
        "model_number": "BH1750",
        "datasheet_url": "https://www.mouser.com/datasheet/2/348/bh1750fvi-e-186247.pdf",
        "read_interval_seconds": 60
    },
    "revision": 1
}