Skip to content

Commit

Permalink
Update service domain for mill from 'climate' to 'mill' (#29132)
Browse files Browse the repository at this point in the history
  • Loading branch information
raman325 authored and frenck committed Nov 27, 2019
1 parent a08df53 commit 5993900
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 25 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Expand Up @@ -412,6 +412,7 @@ omit =
homeassistant/components/miflora/sensor.py
homeassistant/components/mikrotik/*
homeassistant/components/mill/climate.py
homeassistant/components/mill/const.py
homeassistant/components/minio/*
homeassistant/components/mitemp_bt/sensor.py
homeassistant/components/mjpeg/camera.py
Expand Down
16 changes: 0 additions & 16 deletions homeassistant/components/climate/services.yaml
Expand Up @@ -72,22 +72,6 @@ set_swing_mode:
swing_mode:
description: New value of swing mode.

mill_set_room_temperature:
description: Set Mill room temperatures.
fields:
room_name:
description: Name of room to change.
example: 'kitchen'
away_temp:
description: Away temp.
example: 12
comfort_temp:
description: Comfort temp.
example: 22
sleep_temp:
description: Sleep temp.
example: 17

nuheat_resume_program:
description: Resume the programmed schedule.
fields:
Expand Down
20 changes: 11 additions & 9 deletions homeassistant/components/mill/climate.py
Expand Up @@ -6,7 +6,6 @@

from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
from homeassistant.components.climate.const import (
DOMAIN,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
SUPPORT_FAN_MODE,
Expand All @@ -22,15 +21,18 @@
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession

_LOGGER = logging.getLogger(__name__)
from .const import (
ATTR_AWAY_TEMP,
ATTR_COMFORT_TEMP,
ATTR_ROOM_NAME,
ATTR_SLEEP_TEMP,
DOMAIN,
MAX_TEMP,
MIN_TEMP,
SERVICE_SET_ROOM_TEMP,
)

ATTR_AWAY_TEMP = "away_temp"
ATTR_COMFORT_TEMP = "comfort_temp"
ATTR_ROOM_NAME = "room_name"
ATTR_SLEEP_TEMP = "sleep_temp"
MAX_TEMP = 35
MIN_TEMP = 5
SERVICE_SET_ROOM_TEMP = "mill_set_room_temperature"
_LOGGER = logging.getLogger(__name__)

SUPPORT_FLAGS = SUPPORT_TARGET_TEMPERATURE | SUPPORT_FAN_MODE

Expand Down
10 changes: 10 additions & 0 deletions homeassistant/components/mill/const.py
@@ -0,0 +1,10 @@
"""Constants for the Mill heater component."""

ATTR_AWAY_TEMP = "away_temp"
ATTR_COMFORT_TEMP = "comfort_temp"
ATTR_ROOM_NAME = "room_name"
ATTR_SLEEP_TEMP = "sleep_temp"
MAX_TEMP = 35
MIN_TEMP = 5
DOMAIN = "mill"
SERVICE_SET_ROOM_TEMP = "set_room_temperature"
15 changes: 15 additions & 0 deletions homeassistant/components/mill/services.yaml
@@ -0,0 +1,15 @@
set_room_temperature:
description: Set Mill room temperatures.
fields:
room_name:
description: Name of room to change.
example: 'kitchen'
away_temp:
description: Away temp.
example: 12
comfort_temp:
description: Comfort temp.
example: 22
sleep_temp:
description: Sleep temp.
example: 17

0 comments on commit 5993900

Please sign in to comment.