-
-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Use HA constants for Rfxtrx units #40562
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b1f2189
Add more units and device classes
elupus 1c3959b
Battery level is a value beteen 0 and 9 where 9 indicate full
elupus 0f36156
Adjust tests
elupus b45deb7
Add wind direction and adjust rain rate
elupus 5ac372b
Adjust data types to be None rather than empty string
elupus 6d6d6f9
Set counter values to count unit
elupus ba685e6
Forgotten unit
elupus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,11 +18,16 @@ | |
| CONF_DEVICES, | ||
| CONF_HOST, | ||
| CONF_PORT, | ||
| ELECTRICAL_CURRENT_AMPERE, | ||
| ENERGY_KILO_WATT_HOUR, | ||
| EVENT_HOMEASSISTANT_STOP, | ||
| PERCENTAGE, | ||
| POWER_WATT, | ||
| PRESSURE_HPA, | ||
| SPEED_METERS_PER_SECOND, | ||
| TEMP_CELSIUS, | ||
| UV_INDEX, | ||
| VOLT, | ||
| ) | ||
| from homeassistant.core import callback | ||
| import homeassistant.helpers.config_validation as cv | ||
|
|
@@ -52,30 +57,28 @@ | |
| ("Temperature", TEMP_CELSIUS), | ||
| ("Temperature2", TEMP_CELSIUS), | ||
| ("Humidity", PERCENTAGE), | ||
| ("Barometer", ""), | ||
| ("Barometer", PRESSURE_HPA), | ||
| ("Wind direction", ""), | ||
| ("Rain rate", ""), | ||
| ("Rain rate", "mm/h"), | ||
| ("Energy usage", POWER_WATT), | ||
| ("Total usage", POWER_WATT), | ||
| ("Total usage", ENERGY_KILO_WATT_HOUR), | ||
| ("Sound", ""), | ||
|
elupus marked this conversation as resolved.
Outdated
|
||
| ("Sensor Status", ""), | ||
| ("Counter value", ""), | ||
| ("UV", UV_INDEX), | ||
| ("Humidity status", ""), | ||
| ("Forecast", ""), | ||
| ("Forecast numeric", ""), | ||
| ("Rain total", ""), | ||
| ("Wind average speed", ""), | ||
| ("Wind gust", ""), | ||
| ("Chill", ""), | ||
| ("Total usage", ""), | ||
| ("Rain total", "mm"), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ("Wind average speed", SPEED_METERS_PER_SECOND), | ||
| ("Wind gust", SPEED_METERS_PER_SECOND), | ||
| ("Chill", TEMP_CELSIUS), | ||
| ("Count", ""), | ||
| ("Current Ch. 1", ""), | ||
| ("Current Ch. 2", ""), | ||
| ("Current Ch. 3", ""), | ||
| ("Energy usage", ""), | ||
| ("Voltage", ""), | ||
| ("Current", ""), | ||
| ("Current Ch. 1", ELECTRICAL_CURRENT_AMPERE), | ||
| ("Current Ch. 2", ELECTRICAL_CURRENT_AMPERE), | ||
| ("Current Ch. 3", ELECTRICAL_CURRENT_AMPERE), | ||
| ("Voltage", VOLT), | ||
| ("Current", ELECTRICAL_CURRENT_AMPERE), | ||
| ("Battery numeric", PERCENTAGE), | ||
| ("Rssi numeric", "dBm"), | ||
| ] | ||
|
|
||
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.