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

Vesync constant cleanup #104842

Merged
merged 2 commits into from Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions homeassistant/components/vesync/const.py
Expand Up @@ -18,9 +18,21 @@
"ESWL01": "switch",
"ESWL03": "switch",
"ESO15-TB": "outlet",
"LV-PUR131S": "fan",
"Core200S": "fan",
"Core300S": "fan",
"Core400S": "fan",
"Core600S": "fan",
"Vital200S": "fan",
"Vital100S": "fan",
"ESD16": "walldimmer",
"ESWD16": "walldimmer",
"ESL100": "bulb-dimmable",
"ESL100CW": "bulb-tunable-white",
}

SKU_TO_BASE_DEVICE = {
# Air Purifiers
"LV-PUR131S": "LV-PUR131S",
"LV-RH131S": "LV-PUR131S", # Alt ID Model LV-PUR131S
"Core200S": "Core200S",
Expand Down
12 changes: 1 addition & 11 deletions homeassistant/components/vesync/fan.py
Expand Up @@ -17,20 +17,10 @@
)

from .common import VeSyncDevice
from .const import DOMAIN, SKU_TO_BASE_DEVICE, VS_DISCOVERY, VS_FANS
from .const import DEV_TYPE_TO_HA, DOMAIN, SKU_TO_BASE_DEVICE, VS_DISCOVERY, VS_FANS

_LOGGER = logging.getLogger(__name__)

DEV_TYPE_TO_HA = {
"LV-PUR131S": "fan",
"Core200S": "fan",
"Core300S": "fan",
"Core400S": "fan",
"Core600S": "fan",
"Vital200S": "fan",
"Vital100S": "fan",
}

FAN_MODE_AUTO = "auto"
FAN_MODE_SLEEP = "sleep"
FAN_MODE_PET = "pet"
Expand Down
9 changes: 1 addition & 8 deletions homeassistant/components/vesync/light.py
Expand Up @@ -14,17 +14,10 @@
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from .common import VeSyncDevice
from .const import DOMAIN, VS_DISCOVERY, VS_LIGHTS
from .const import DEV_TYPE_TO_HA, DOMAIN, VS_DISCOVERY, VS_LIGHTS

_LOGGER = logging.getLogger(__name__)

DEV_TYPE_TO_HA = {
"ESD16": "walldimmer",
"ESWD16": "walldimmer",
"ESL100": "bulb-dimmable",
"ESL100CW": "bulb-tunable-white",
}


async def async_setup_entry(
hass: HomeAssistant,
Expand Down