Migrate HomematicIP Cloud services to admin services#32107
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #32107 +/- ##
==========================================
+ Coverage 94.72% 94.74% +0.01%
==========================================
Files 767 767
Lines 55486 55499 +13
==========================================
+ Hits 52559 52582 +23
+ Misses 2927 2917 -10
Continue to review full report at Codecov.
|
|
This might be a breaking change for users. Please add a breaking change section to your OP. |
|
Hi @frenck i added a breaking change paragraph to this PR. |
|
Thanks @frenck. I found the breaking change: When the service is called by a switch then a user might get an unauthorized exception. |
|
The service can be used in the Lovelace UI as a button click for example... |
| async_register_admin_service( | ||
| hass=hass, | ||
| domain=HMIPC_DOMAIN, | ||
| service=SERVICE_SET_ACTIVE_CLIMATE_PROFILE, |
There was a problem hiding this comment.
(note: I'm not familiar with homematic)
Isn't this something like a climate preset ? Should this be an admin service or should it use the service helper verify_domain_control where they can call this service if they can control any homematic device?
There was a problem hiding this comment.
Good point. I'll add verify_domain_control and make this service user accessible.
Breaking change
The user needs to be in the administrator role to execute these HomematicIP Cloud services:
Proposed change
Migrate HomematicIP Cloud services to admin services
Type of change
Additional information
Checklist
black --fast 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.The integration reached or maintains the following Integration Quality Scale: