mathoudebine / mathoudebine/turing-smart-screen-python
[Feature Request] Adding custom UNIT for custom sensors in themes
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 2.3k
- Forks
- 412
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 7
Description
Is your feature request related to a problem? If so, please describe the problem.
Nope, it's a feature request for custom sensors only
Describe the feature / solution to your problem you'd like
Adding custom unit to text value
Describe alternatives you've considered / and or tested
None, because using special characters in value (°C is displayed as °ÂC for example) is breaking text
Screenshots / photos & mockups of the Turing screen
I'm adding GPU Hotspot temperature instead GPU Temperature:
With °C unit in value: https://i.imgur.com/BdpDvTq.png
With custom unit: https://i.imgur.com/2ER0iSN.png
Environment:
- Revision of this project: 3.9.1 Release
- OS with version: Win11 64 pro
- Python version: 3.12
- Hardware: 5800X3D, 6750XT
Additional context
I just added this line in "./library/stats.py" at line 100: unit = theme_data.get("UNIT", unit)
To allow custom sensors in theme to use specific unit for a value.
And of course, adding a "UNIT" in custom sensor in my theme ("UNIT: °C" for me)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in library/stats.py, especially the custom sensor handling around the reported unit lookup. Review how custom sensor values and theme data are parsed, then verify that a UNIT value such as °C is applied to the rendered sensor without encoding corruption. Done means custom sensors can define their own displayed unit while existing sensors remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100