Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ omit =
homeassistant/components/waze_travel_time/sensor.py
homeassistant/components/webostv/*
homeassistant/components/wemo/*
homeassistant/components/wemo/fan.py
homeassistant/components/whois/sensor.py
homeassistant/components/wink/*
homeassistant/components/wirelesstag/*
Expand Down
17 changes: 0 additions & 17 deletions homeassistant/components/fan/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,3 @@ xiaomi_miio_set_dry_off:
entity_id:
description: Name of the xiaomi miio entity.
example: 'fan.xiaomi_miio_device'

wemo_set_humidity:
description: Set the target humidity of WeMo humidifier devices.
fields:
entity_id:
description: Names of the WeMo humidifier entities (1 or more entity_ids are required).
example: 'fan.wemo_humidifier'
target_humidity:
description: Target humidity. This is a float value between 0 and 100, but will be mapped to the humidity levels that WeMo humidifiers support (45, 50, 55, 60, and 100/Max) by rounding the value down to the nearest supported value.
example: 56.5

wemo_reset_filter_life:
description: Reset the WeMo Humidifier's filter life to 100%.
fields:
entity_id:
description: Names of the WeMo humidifier entities (1 or more entity_ids are required).
example: 'fan.wemo_humidifier'
3 changes: 1 addition & 2 deletions homeassistant/components/wemo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from homeassistant.helpers import discovery

from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP

DOMAIN = "wemo"
from .const import DOMAIN

# Mapping from Wemo model_name to component.
WEMO_MODEL_DISPATCH = {
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/wemo/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Constants for the Belkin Wemo component."""
DOMAIN = "wemo"

SERVICE_SET_HUMIDITY = "set_humidity"
SERVICE_RESET_FILTER_LIFE = "reset_filter_life"
6 changes: 1 addition & 5 deletions homeassistant/components/wemo/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import homeassistant.helpers.config_validation as cv
from homeassistant.components.fan import (
DOMAIN,
SUPPORT_SET_SPEED,
FanEntity,
SPEED_OFF,
Expand All @@ -22,6 +21,7 @@
from homeassistant.const import ATTR_ENTITY_ID

from . import SUBSCRIPTION_REGISTRY
from .const import DOMAIN, SERVICE_RESET_FILTER_LIFE, SERVICE_SET_HUMIDITY

SCAN_INTERVAL = timedelta(seconds=10)
DATA_KEY = "fan.wemo"
Expand Down Expand Up @@ -79,8 +79,6 @@
if k not in [WEMO_FAN_LOW, WEMO_FAN_HIGH]
}

SERVICE_SET_HUMIDITY = "wemo_set_humidity"

SET_HUMIDITY_SCHEMA = vol.Schema(
{
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
Expand All @@ -90,8 +88,6 @@
}
)

SERVICE_RESET_FILTER_LIFE = "wemo_reset_filter_life"

RESET_FILTER_LIFE_SCHEMA = vol.Schema({vol.Required(ATTR_ENTITY_ID): cv.entity_ids})


Expand Down
16 changes: 16 additions & 0 deletions homeassistant/components/wemo/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set_humidity:
description: Set the target humidity of WeMo humidifier devices.
fields:
entity_id:
description: Names of the WeMo humidifier entities (1 or more entity_ids are required).
example: 'fan.wemo_humidifier'
target_humidity:
description: Target humidity. This is a float value between 0 and 100, but will be mapped to the humidity levels that WeMo humidifiers support (45, 50, 55, 60, and 100/Max) by rounding the value down to the nearest supported value.
example: 56.5

reset_filter_life:
description: Reset the WeMo Humidifier's filter life to 100%.
fields:
entity_id:
description: Names of the WeMo humidifier entities (1 or more entity_ids are required).
example: 'fan.wemo_humidifier'
5 changes: 3 additions & 2 deletions homeassistant/components/wemo/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from homeassistant.util import convert
from homeassistant.const import STATE_OFF, STATE_ON, STATE_STANDBY, STATE_UNKNOWN

from . import SUBSCRIPTION_REGISTRY, DOMAIN as WEMO_DOMAIN
from . import SUBSCRIPTION_REGISTRY
from .const import DOMAIN

SCAN_INTERVAL = timedelta(seconds=10)

Expand Down Expand Up @@ -96,7 +97,7 @@ def name(self):
@property
def device_info(self):
"""Return the device info."""
return {"name": self._name, "identifiers": {(WEMO_DOMAIN, self._serialnumber)}}
return {"name": self._name, "identifiers": {(DOMAIN, self._serialnumber)}}

@property
def device_state_attributes(self):
Expand Down