Skip to content
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

fix: Compatibility with HA 2024.1 - import consts from core #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions custom_components/tuya_ble/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
import json
from typing import Any, Iterable

from homeassistant.const import CONF_ADDRESS, CONF_DEVICE_ID
from homeassistant.const import (
CONF_ADDRESS,
CONF_COUNTRY_CODE,
CONF_DEVICE_ID,
CONF_PASSWORD,
CONF_USERNAME,
)
from homeassistant.core import HomeAssistant
from homeassistant.components.tuya.const import (
CONF_ACCESS_ID,
CONF_ACCESS_SECRET,
CONF_APP_TYPE,
CONF_AUTH_TYPE,
CONF_COUNTRY_CODE,
CONF_ENDPOINT,
CONF_PASSWORD,
CONF_USERNAME,
DOMAIN as TUYA_DOMAIN,
TUYA_RESPONSE_RESULT,
TUYA_RESPONSE_SUCCESS,
Expand Down
10 changes: 6 additions & 4 deletions custom_components/tuya_ble/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
BluetoothServiceInfoBleak,
async_discovered_service_info,
)
from homeassistant.const import CONF_ADDRESS
from homeassistant.const import (
CONF_ADDRESS,
CONF_COUNTRY_CODE,
CONF_PASSWORD,
CONF_USERNAME,
)
from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowHandler, FlowResult

Expand All @@ -27,10 +32,7 @@
CONF_ACCESS_SECRET,
CONF_APP_TYPE,
CONF_AUTH_TYPE,
CONF_COUNTRY_CODE,
CONF_ENDPOINT,
CONF_PASSWORD,
CONF_USERNAME,
SMARTLIFE_APP,
TUYA_COUNTRIES,
TUYA_RESPONSE_CODE,
Expand Down