Add 16 new device classes for specific sensor types and remote controls, update socket class description#587
Open
Add 16 new device classes for specific sensor types and remote controls, update socket class description#587
Conversation
Co-authored-by: WeeJeWel <319873+WeeJeWel@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new device classes
Add 16 new device classes for specific sensor types and remote controls
Sep 5, 2025
WeeJeWel
approved these changes
Sep 5, 2025
Contributor
|
@copilot Please also change the (drop the choose_slave mention). |
Co-authored-by: WeeJeWel <319873+WeeJeWel@users.noreply.github.com>
Author
Copilot
AI
changed the title
Add 16 new device classes for specific sensor types and remote controls
Add 16 new device classes for specific sensor types and remote controls, update socket class description
Sep 5, 2025
Contributor
|
@copilot Remove all changes to generated_locales. |
Co-authored-by: WeeJeWel <319873+WeeJeWel@users.noreply.github.com>
Author
WeeJeWel
approved these changes
Sep 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds 16 new device classes to provide more granular categorization for sensors and remote controls, making it easier for developers to choose the appropriate device class for their specific use cases.
New Sensor Classes Added
Contact & Motion Sensors:
sensor_contact- For contact sensors that detect open/close states (door/window sensors)sensor_occupancy- For occupancy and presence sensorsEnvironmental Sensors:
sensor_temperature- For temperature sensorssensor_humidity- For humidity sensorssensor_pressure- For atmospheric pressure sensorssensor_illuminance- For light/brightness sensorssensor_air_quality- For air quality sensors (VOCs, CO2, pollutants)sensor_rain- For rain and precipitation sensorsUtility Monitoring Sensors:
sensor_water_flow- For water flow rate sensorssensor_gas_flow- For gas flow rate sensorssensor_electricity- For electrical parameter sensors (voltage, current, power)Safety & Leak Detection Sensors:
sensor_gas_leak- For gas leak detectionsensor_water_leak- For water leak detectionsensor_water_freeze- For freeze protection sensorsNew Remote Control Classes
remote_switch- For remote switches and wall switches that control other devices wirelesslyremote_portable- For portable remote controls like handheld remotes, keyfobs, and mobile devicesUpdated Existing Classes
The existing
sensorclass description has been updated to clarify that it should be used when a device is composed of multiple sensors (e.g., humidity + temperature), while specific sensor types should use the new dedicatedsensor_*classes.The
socketclass description has been updated to:This removes the previous mention of the
choose_slavepair template and clarifies the class can be used for fixed switches as well.Implementation Details
This change provides better semantic categorization while maintaining full backward compatibility.
Fixes #586.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.