Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5151 with 5100 sensors incorrectly converting a Fahrenheit number as though it was Celsius into Fahrenheit resulting in readings like 166F #247

Closed
cgoudie opened this issue Jul 22, 2024 · 10 comments · Fixed by #256

Comments

@cgoudie
Copy link

cgoudie commented Jul 22, 2024

Govee Device SKU

H5100

Govee2MQTT Version

2024.07.13-82ddc6e9

Describe the issue

Just installed and configured the Govee to MQTT integration. The humidity is showing correctly, but the temperature is wildly off. The app is showing 75.0 °F but the integration is showing 166.71 °F

All three of the Govee sensors I have are showing this.

Startup Diagnostics

[2024-07-22T09:31:11 INFO govee::commands::serve] Starting service. version 2024.07.13-82ddc6e9
[2024-07-22T09:31:11 INFO govee::commands::serve] Querying platform API for device list
[2024-07-22T09:31:12 INFO govee::commands::serve] Querying undocumented API for device + room list
[2024-07-22T09:31:13 INFO govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-07-22T09:31:13 INFO govee::commands::serve] Starting LAN discovery
[2024-07-22T09:31:13 INFO govee::commands::serve] Waiting 10 seconds for LAN API discovery
[2024-07-22T09:31:13 INFO govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-07-22T09:31:23 INFO govee::commands::serve] Devices returned from Govee's APIs
[2024-07-22T09:31:23 INFO govee::commands::serve] Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100)
[2024-07-22T09:31:23 INFO govee::commands::serve] Platform API: devices.types.thermometer. supports_rgb=false supports_brightness=false
[2024-07-22T09:31:23 INFO govee::commands::serve] color_temp=None segment_rgb=None
[2024-07-22T09:31:23 INFO govee::commands::serve] Undoc: room=None supports_iot=false ble_only=true
[2024-07-22T09:31:23 INFO govee::commands::serve]
[2024-07-22T09:31:23 INFO govee::commands::serve] Master Bathroom Sensor (2E:2C:35:38:30:CB:AF:F4 H5100)
[2024-07-22T09:31:23 INFO govee::commands::serve] Platform API: devices.types.thermometer. supports_rgb=false supports_brightness=false
[2024-07-22T09:31:23 INFO govee::commands::serve] color_temp=None segment_rgb=None
[2024-07-22T09:31:23 INFO govee::commands::serve] Undoc: room=None supports_iot=false ble_only=true
[2024-07-22T09:31:23 INFO govee::commands::serve]
[2024-07-22T09:31:23 INFO govee::commands::serve] Cyan Bathroom Sensor (39:67:35:38:30:CB:D7:2A H5100)
[2024-07-22T09:31:23 INFO govee::commands::serve] Platform API: devices.types.thermometer. supports_rgb=false supports_brightness=false
[2024-07-22T09:31:23 INFO govee::commands::serve] color_temp=None segment_rgb=None
[2024-07-22T09:31:23 INFO govee::commands::serve] Undoc: room=None supports_iot=false ble_only=true
[2024-07-22T09:31:23 INFO govee::commands::serve]
[2024-07-22T09:31:23 INFO govee::service::http] http server addr is 0.0.0.0:8056
[2024-07-22T09:31:43 INFO govee::service::state] requesting update via Platform API Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100) None
[2024-07-22T09:31:43 INFO govee::service::state] requesting update via Platform API Master Bathroom Sensor (2E:2C:35:38:30:CB:AF:F4 H5100) None
[2024-07-22T09:31:43 INFO govee::service::state] requesting update via Platform API Cyan Bathroom Sensor (39:67:35:38:30:CB:D7:2A H5100) None
[2024-07-22T09:31:44 INFO govee::service::hass] Wait 140ms for hass to settle on 14 entity configs
[2024-07-22T09:31:44 INFO govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-07-22T09:46:44 INFO govee::service::state] requesting update via Platform API Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T15:31:43.503675254Z })
[2024-07-22T09:46:44 INFO govee::service::state] requesting update via Platform API Master Bathroom Sensor (2E:2C:35:38:30:CB:AF:F4 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T15:31:43.777480087Z })
[2024-07-22T09:46:44 INFO govee::service::state] requesting update via Platform API Cyan Bathroom Sensor (39:67:35:38:30:CB:D7:2A H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T15:31:44.048547869Z })
[2024-07-22T10:01:44 INFO govee::service::state] requesting update via Platform API Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T15:46:44.362326331Z })
[2024-07-22T10:01:45 INFO govee::service::state] requesting update via Platform API Master Bathroom Sensor (2E:2C:35:38:30:CB:AF:F4 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T15:46:44.643363410Z })
[2024-07-22T10:01:45 INFO govee::service::state] requesting update via Platform API Cyan Bathroom Sensor (39:67:35:38:30:CB:D7:2A H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T15:46:44.953299935Z })
[2024-07-22T10:16:45 INFO govee::service::state] requesting update via Platform API Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T16:01:45.276172085Z })
[2024-07-22T10:16:46 INFO govee::service::state] requesting update via Platform API Master Bathroom Sensor (2E:2C:35:38:30:CB:AF:F4 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T16:01:45.574550623Z })
[2024-07-22T10:16:46 INFO govee::service::state] requesting update via Platform API Cyan Bathroom Sensor (39:67:35:38:30:CB:D7:2A H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T16:01:45.846399338Z })

Additional Logs

[2024-07-22T10:31:14 INFO govee::service::state] Polling Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100) to get latest state after control
[2024-07-22T10:31:14 INFO govee::service::state] requesting update via Platform API Main Floor Bathroom (37:2D:34:30:38:CE:08:86 H5100) Some(DeviceState { on: false, light_on: None, online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 0, scene: None, source: "PLATFORM API", updated: 2024-07-22T16:31:09.116528797Z })

Home Assistant Logs

No response

Anything else?

No response

@d4rkchild
Copy link

d4rkchild commented Jul 23, 2024

Hi there, slightly different issue here. I am not sure if this will be fixed in the next release (beginner here and I can't figure out how to update govee2mqtt manually - Current version: 2024.07.13-82ddc6e9). My issue is the 3 5100s that are going through a H5151 gateway are showing C temperature in Farenheit. Server room temperature is a H5179 and is fine.
Screenshot 2024-07-23 202701
I am running HAOS in a VM on proxmox. If anyone knows how to fix or manually update to the latest version before it is officially rolled.

@cgoudie
Copy link
Author

cgoudie commented Jul 23, 2024

Heh, I'm pretty sure it's the same problem. @d4rkchild I think the code is expecting a reading in C not in F, and then converting a value already in F from C to F.

@cgoudie
Copy link
Author

cgoudie commented Jul 24, 2024

75c = ~167f, which lines up with the problem I'm describing

@cgoudie cgoudie changed the title 5100 reporting wild temperatures over 166 °F :) 5100 incorrectly converting a Fahrenheit number as though it was Celsius into Fahrenheit resulting in readings like 166F Jul 24, 2024
@cgoudie cgoudie changed the title 5100 incorrectly converting a Fahrenheit number as though it was Celsius into Fahrenheit resulting in readings like 166F H5151 with 5100 sensors incorrectly converting a Fahrenheit number as though it was Celsius into Fahrenheit resulting in readings like 166F Jul 24, 2024
@sjafferali
Copy link
Contributor

Have a PR to fix this: #256

@fffloopo
Copy link

I have got the same issue.

there is a workaround with a template:

template:

  • sensor:
    • name: Govee_TemperatureH5100
      unique_id: "GoveeTemp"
      unit_of_measurement: "C"
      state: >-
      {{ ((float(states('sensor.bath_temperature'))-32) *5/9) }}

@d4rkchild
Copy link

Hi fffloopo

Regarding the below, apologies I am still learning HA. Is there a step by step guide or something that can give me an idea of how to implement the below. I think i can add templates via the helper section in HA but just wanted to double check.

Thanks

I have got the same issue.

there is a workaround with a template:

template:

  • sensor:

    • name: Govee_TemperatureH5100
      unique_id: "GoveeTemp"
      unit_of_measurement: "C"
      state: >-
      {{ ((float(states('sensor.bath_temperature'))-32) *5/9) }}

@fffloopo
Copy link

Hi fffloopo

Regarding the below, apologies I am still learning HA. Is there a step by step guide or something that can give me an idea of how to implement the below. I think i can add templates via the helper section in HA but just wanted to double check.

Thanks

I have got the same issue.
there is a workaround with a template:
template:

  • sensor:

    • name: Govee_TemperatureH5100
      unique_id: "GoveeTemp"
      unit_of_measurement: "C"
      state: >-
      {{ ((float(states('sensor.bath_temperature'))-32) *5/9) }}

I just added this lines in my configuration.yaml. Simply replace the unique_id: "GoveeTemp" with the name of your sensor entity.

@stromdriver
Copy link

ok after multiple attempts finally have the bridge working and have the page with all my govee devices, including the 5100's coming thru the 'hub' but i can't find the temp sensors anywhere in HA to add cards with them?
Screenshot 2024-10-29 at 09-36-55 Govee Controller

@ekalp
Copy link

ekalp commented Dec 9, 2024

Also seeing this issue. Pretty sure my crawl space isn't 150F.

image

@lgonline43
Copy link

Add on : Mosquitto broker
Add on: Govee to MQTT Bridge
How to create a template for a sensor: https://www.home-assistant.io/integrations/template/
Only this: {{ ((float(states('sensor.bath_temperature'))-32) *5/9) }}

Temperature is diplayed in °C

@wez wez closed this as completed in #256 Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants