chasenicholl / homebridge-weatherflow-tempest

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

Temperature not converting to Fahrenheit #9

Closed sylvan-sh closed 1 year ago

sylvan-sh commented 1 year ago

Describe The Bug:

"sensor_type": "Temperature Sensor" returns value in Celsius even with "units_temp": "f"

To Reproduce:

Read temperature from any station with "units_temp": "f"

Expected behavior:

Comment indicates that conversion should occur, but there doesn't appear to be any code currently doing so. I'm not too familiar with such, so it may be a bug in something implemented rather than something being omitted.

Logs:

[04/05/2023, 11:31:04] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[04/05/2023, 11:31:04] [HB Supervisor] Started Homebridge v1.6.1 with PID: 1590
[04/05/2023, 11:31:08] Loaded config.json with 0 accessories and 2 platforms.
[04/05/2023, 11:31:08] Loaded 3 cached accessories from cachedAccessories.
[04/05/2023, 11:31:09] ---
[04/05/2023, 11:31:09] Loaded plugin: homebridge-weatherflow-tempest@2.0.1
[04/05/2023, 11:31:09] Registering platform 'homebridge-weatherflow-tempest.WeatherFlowTempest'
[04/05/2023, 11:31:09] ---
[04/05/2023, 11:31:09] Loading 2 platforms...
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Initializing WeatherFlowTempest platform...
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Finished initializing platform: WeatherFlow Tempest Platform
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] TempestApi initialized.
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Loading accessory from cache: Outside Temperature
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Loading accessory from cache: Outside UV

Plugin Config:

{
    "bridge": {
        "name": "",
        "username": "",
        "port": 51829,
        "pin": "",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "WeatherFlow Tempest Platform",
            "token": "",
            "station_id":,
            "interval": 10,
            "sensors": [
                {
                    "name": "Outside Temperature",
                    "sensor_type": "Temperature Sensor",
                    "value_key": "feels_like"
                },
                {
                    "name": "Outside UV",
                    "sensor_type": "Light Sensor",
                    "value_key": "uv"
                }
            ],
            "platform": "WeatherFlowTempest"
        }
    ]
}

Screenshots:

Environment:

sylvan-sh commented 1 year ago

Fixed. Had the wrong universal temperature unit set in Homebridge.