From 59939004bf332db468685fc9188969b1c1c31e1a Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 27 Nov 2019 07:47:38 -0500 Subject: [PATCH] Update service domain for mill from 'climate' to 'mill' (#29132) --- .coveragerc | 1 + .../components/climate/services.yaml | 16 --------------- homeassistant/components/mill/climate.py | 20 ++++++++++--------- homeassistant/components/mill/const.py | 10 ++++++++++ homeassistant/components/mill/services.yaml | 15 ++++++++++++++ 5 files changed, 37 insertions(+), 25 deletions(-) create mode 100644 homeassistant/components/mill/const.py diff --git a/.coveragerc b/.coveragerc index 5e8f5e04850d..81a1efec6181 100644 --- a/.coveragerc +++ b/.coveragerc @@ -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 diff --git a/homeassistant/components/climate/services.yaml b/homeassistant/components/climate/services.yaml index f10e1b4bd69d..59188bb03d1a 100644 --- a/homeassistant/components/climate/services.yaml +++ b/homeassistant/components/climate/services.yaml @@ -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: diff --git a/homeassistant/components/mill/climate.py b/homeassistant/components/mill/climate.py index 1166bd451c0c..b08015fe5480 100644 --- a/homeassistant/components/mill/climate.py +++ b/homeassistant/components/mill/climate.py @@ -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, @@ -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 diff --git a/homeassistant/components/mill/const.py b/homeassistant/components/mill/const.py new file mode 100644 index 000000000000..65c67b72b6e6 --- /dev/null +++ b/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" diff --git a/homeassistant/components/mill/services.yaml b/homeassistant/components/mill/services.yaml index e69de29bb2d1..e9e59b50170f 100644 --- a/homeassistant/components/mill/services.yaml +++ b/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 \ No newline at end of file