chasenicholl / homebridge-weatherflow-tempest

WeatherFlow Tempest Homebridge Plugin
Apache License 2.0
15 stars 2 forks source link

TypeError: Cannot read properties of undefined (reading 'value_key') #13

Closed garyhooper closed 1 year ago

garyhooper commented 1 year ago

Describe The Bug: I am now seeing TypeError: Cannot read properties of undefined (reading 'value_key').

To Reproduce: Always.

Expected behavior: Error should not occur.

This was working under previous version of Homebridge and/or this plug-in.

Logs:

[5/28/2023, 3:32:32 PM] [WeatherFlow Tempest Platform] Executed didFinishLaunching callback
[5/28/2023, 3:32:32 PM] [WeatherFlow Tempest Platform] TypeError: Cannot read properties of undefined (reading 'value_key')
    at WeatherFlowTempestPlatform.initAccessory (/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:223:50)
    at WeatherFlowTempestPlatform.discoverDevices (/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:210:14)
    at /homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:95:16
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Plugin Config:

{
    "name": "WeatherFlow Tempest Platform",
    "token": "5bAAAAAA-XXXX-ZZZZ-QQQQ-AAAAAAAAAAAA22",
    "station_id": XXXXXX,
    "interval": 10,
    "units": "Standard",
    "sensors": [
        {
            "name": "Backyard Temperature",
            "sensor_type": "Temperature Sensor",
            "temperature_properties": {
                "value_key": "air_temperature"
            }
        },
        {
            "name": "Backyard Feels Like",
            "sensor_type": "Temperature Sensor",
            "temperature_properties": {
                "value_key": "feels_like"
            }
        }
    ],
    "platform": "WeatherFlowTempest"
}

Environment:

DMBlakeley commented 1 year ago

Did you uninstall the previous version and restart Homebridge prior to installing the new version?

garyhooper commented 1 year ago

That was the issue. Thanks.