Add myUplink integration (#86522)
* First checkin for myUplink * Refactored coordinator and sensor state classe * Updated .coveragerc * Update test_config_flow * Fix test_config_flow for myuplink * Only set state class for temperature sensor * PR comment updates * Type strong dict * use asyncio.timeouts * PR updates (part 1) * Updated to myuplink 0.0.9 * Add strict typing * Fix typing * Inherit CoordinatorEntity * Clean up coordinator and sensors * Use common base entity * Improve device point sensor * Exclude entity from coverage * Set device point entity name if there's no entity description * Update homeassistant/components/myuplink/sensor.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/myuplink/entity.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/myuplink/entity.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Remvoed firmware + connstate sensors * Always add device point parameter name * Removed MyUplinkDeviceSensor * Removed unused class * key="celsius", --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
c1faafc6a0
commit
2508b55b0f
21 changed files with 480 additions and 0 deletions
25
homeassistant/components/myuplink/config_flow.py
Normal file
25
homeassistant/components/myuplink/config_flow.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
"""Config flow for myUplink."""
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
|
||||
from .const import DOMAIN, OAUTH2_SCOPES
|
||||
|
||||
|
||||
class OAuth2FlowHandler(
|
||||
config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN
|
||||
):
|
||||
"""Config flow to handle myUplink OAuth2 authentication."""
|
||||
|
||||
DOMAIN = DOMAIN
|
||||
|
||||
@property
|
||||
def logger(self) -> logging.Logger:
|
||||
"""Return logger."""
|
||||
return logging.getLogger(__name__)
|
||||
|
||||
@property
|
||||
def extra_authorize_data(self) -> dict[str, Any]:
|
||||
"""Extra data that needs to be appended to the authorize url."""
|
||||
return {"scope": " ".join(OAUTH2_SCOPES)}
|
Loading…
Add table
Add a link
Reference in a new issue