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

Fix: GPU temperature and load sensor fix #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amadeo-alex
Copy link

@amadeo-alex amadeo-alex commented Jun 30, 2023

The current implementation of GPU temperature and load sensor does not adhere to the HA MQTT standard and can return string "NotSupported" or "Unknown" values which causes HA to produce an error/warning log - value of the state topic should always be a "convertible to number" value.

This PR does three things:

  • allows sensors to return "null" value from "GetState()" and "GetAttributes()" functions
  • in case "null" is returned for state, no update is sent (if attributes are "null" while state is not, only state is sent)
  • changes the "GpuTemperatureSensor" and "GpuLoadSensor" to return null if information cannot be obtained

Should remediate LAB02-Research/HASS.Agent#320 and partially remediate LAB02-Research/HASS.Agent#310 .

@amadeo-alex amadeo-alex changed the title GPU temperature and load sensor fix Fix: GPU temperature and load sensor fix Jul 16, 2023
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 this pull request may close these issues.

1 participant