chore: sort signals and icons alphabetically#265
Conversation
|
There was a problem hiding this comment.
Pull request overview
This pull request reorganizes the signal definitions and icon mappings in the DIMO Home Assistant integration by sorting them alphabetically. The changes affect two main files: the icons.json configuration file and the const.py constants file.
Changes:
- Sorted sensor and binary_sensor icon definitions alphabetically in icons.json
- Sorted the SIGNALS dictionary entries alphabetically in const.py
- No functional changes to signal definitions or icon assignments
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| custom_components/dimo/icons.json | Alphabetically sorted sensor and binary_sensor icon definitions for better maintainability |
| custom_components/dimo/const.py | Alphabetically sorted SIGNALS dictionary entries (sensors, binary_sensors, and device_trackers) for better code organization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "currentlocationaltitude": { | ||
| "default": "mdi:elevation-rise" | ||
| }, | ||
| "obdfuelrate": { | ||
| "default": "mdi:fuel" | ||
| "currentlocationheading": { | ||
| "default": "mdi:compass-rose" | ||
| }, | ||
| "powertraincombustionenginespeed": { | ||
| "default": "mdi:gauge" | ||
| "dimoaftermarkethdop": { | ||
| "default": "mdi:satellite-variant" | ||
| }, | ||
| "powertraincombustionenginetps": { | ||
| "default": "mdi:gauge-low" | ||
| "dimoaftermarketnsat": { | ||
| "default": "mdi:satellite-variant" | ||
| }, |
There was a problem hiding this comment.
Several sensor signals defined in const.py are missing corresponding icon definitions. The following signals should be added to maintain consistency between const.py and icons.json:
- exteriorairtemperature
- obdbarometricpressure
- obddistancewithmil
- obdmap
- powertraincombustionengineect
- powertraintractionbatterycurrentpower
- powertraintractionbatterycurrentvoltage
- powertraintractionbatterygrosscapacity
- powertraintractionbatteryrange
- powertraintractionbatterystateofchargecurrent
- powertraintractionbatterytemperature
- powertraintractionbatterytemperatureaverage
- powertraintransmissiontemperature
- speed
These entries should be added in alphabetical order with appropriate MDI icons.
| "default": "mdi:car-key" | ||
| }, | ||
| "obdispluggedin": { | ||
| "default": "mdi:mini-sd" |
There was a problem hiding this comment.
Binary sensor signal "powertraintractionbatterychargingischarging" defined in const.py is missing from the binary_sensor section. This should be added in alphabetical order with an appropriate MDI icon (such as "mdi:battery-charging").
| "default": "mdi:mini-sd" | |
| "default": "mdi:mini-sd" | |
| }, | |
| "powertraintractionbatterychargingischarging": { | |
| "default": "mdi:battery-charging" |





No description provided.