-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Add sensors to Motionblinds BLE integration #114226
base: dev
Are you sure you want to change the base?
Conversation
Hey there @jerrybboy, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
"connection": { | ||
"name": "Connected", | ||
"state": { | ||
"connected": "Yes", | ||
"disconnected": "No", | ||
"connecting": "Connecting...", | ||
"disconnecting": "Disconnecting..." | ||
} | ||
}, | ||
"calibration": { | ||
"name": "Calibrated", | ||
"state": { | ||
"calibrated": "Yes", | ||
"uncalibrated": "No", | ||
"calibrating": "Calibrating..." | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these entities could be more descriptive in their value.
Name: connectivity
connected
disconnected
connecting
disconnecting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think "Connectivity: Connected" is a bit too verbose. The majority of times, currently it will say "Connected: Yes" or "Connected: No" which I think is nicer. "Connecting" and "Disconnecting" are kind of transitioning states to provide the user with a bit more information on what is happening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why I opted for "Yes"/"No", I think it's easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might look good on a dashboard, but it's horrible for automating and templating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you use the key for automation and not the translation? For the majority of users I personally think this is the best option. "Connected: Yes" in my opinion is much easier to process (and not to mention translate to other languages) than something like "Connectivity: Connected"
"state": {
"connected": "Yes",
"disconnected": "No",
"connecting": "Connecting...",
"disconnecting": "Disconnecting..."
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one I'm looking to the connectivity device class, which is used in the binary sensors and looks like connectivity - connected - disconnected. Even tho this provides own translations I still think they should be in line with the translations other integrations use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about:
"connection": {
"name": "Connection",
"state": {
"connected": "Connected",
"disconnected": "Disconnected",
"connecting": "Connecting",
"disconnecting": "Disconnecting"
}
},
But as you know this may result in longer translations in other languages, where in Dutch you would probably get "Verbinding: Verbonden", as opposed to "Verbonden: Ja". I still prefer the latter but if you want the former I will change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could do Connection status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it, please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope "Connection status: Disconnecting..." fits in the sensor entity?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
82bac04
to
5984401
Compare
5984401
to
4d54c56
Compare
24e30e7
to
5d070c7
Compare
8635ec5
to
2f8f3a3
Compare
2f8f3a3
to
bd0e763
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong button
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Proposed change
Add sensors to Motionblinds BLE integration (battery percentage, connection status, calibration status, signal strength).
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: