-
-
Notifications
You must be signed in to change notification settings - Fork 31.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 Thread integration #85002
Add Thread integration #85002
Conversation
022ab6b
to
b9b068b
Compare
async def async_get_thread_state(hass: HomeAssistant) -> ThreadState: | ||
"""Get current Thread state.""" | ||
|
||
response = await async_get_clientsession(hass).get( |
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.
Can we make a helper class for the API that has a request wrapper to handle the raise for status?
https://github.com/esphome/dashboard-api/blob/main/esphome_dashboard_api/__init__.py#L42-L54
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.
And I think that we should extract that API class into a new repository under home-assistant-libs
.
return self.async_abort(reason="single_instance_allowed") | ||
|
||
config = discovery_info.config | ||
return self.async_create_entry( |
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 now ok if we only set it up as part of multi pan. In future we should have a confirm step
* Add Thread integration * Add get/set operational dataset as TLVS * Add create operational dataset * Add set thread state * Adjust after rebase * Improve HTTP status handling * Improve test coverage * Change domains from thread to otbr * Setup otbr from a config entry * Add files * Store URL in config entry data * Make sure manifest is not sorted * Remove useless async * Call the JSON parser more * Don't raise exceptions without messages * Remove stuff which will be needed in the future * Remove more future stuff * Use API library * Bump library to 1.0.1
Proposed change
Add Thread integration which interfaces with the Open Thread Border Router's REST API
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
.To help with the load of incoming pull requests: