From 88c0a92857f652efd9823618527cc4cbc0d90afe Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 5 Oct 2018 17:56:30 +0200 Subject: [PATCH 01/56] Bumped version to 0.80.0b0 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 93ab0deeba2..b10743244c4 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0.dev0' +PATCH_VERSION = '0b0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 738089c57c001d552a69a7ccd11d356eaa6f2378 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 5 Oct 2018 20:21:09 +0200 Subject: [PATCH 02/56] Fix incorrect yaml in hangouts (#17169) --- homeassistant/components/hangouts/services.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/hangouts/services.yaml b/homeassistant/components/hangouts/services.yaml index ded324d2de9..d07f1d65688 100644 --- a/homeassistant/components/hangouts/services.yaml +++ b/homeassistant/components/hangouts/services.yaml @@ -12,5 +12,4 @@ send_message: example: '[{"text":"test", "is_bold": false, "is_italic": false, "is_strikethrough": false, "is_underline": false, "parse_str": false, "link_target": "http://google.com"}, ...]' data: description: Other options ['image_file' / 'image_url'] - example: '{ "image_file": "file" }' or '{ "image_url": "url" }' - + example: '{ "image_file": "file" } or { "image_url": "url" }' From 7a22fbe96161c9aa0c8ea0d43d60805dd9b0ae38 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 5 Oct 2018 20:21:27 +0200 Subject: [PATCH 03/56] Bumped version to 0.80.0b1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index b10743244c4..db1de6bbe6b 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0b0' +PATCH_VERSION = '0b1' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 31b1b0c0449508d5ebd1271df43653c7d34b88ab Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 7 Oct 2018 23:26:23 +0200 Subject: [PATCH 04/56] Update frontend to 20181007.0 --- homeassistant/components/frontend/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 9a5e7c05a56..27904faec1a 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -24,7 +24,7 @@ from homeassistant.core import callback from homeassistant.helpers.translation import async_get_translations from homeassistant.loader import bind_hass -REQUIREMENTS = ['home-assistant-frontend==20181005.0'] +REQUIREMENTS = ['home-assistant-frontend==20181007.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log', diff --git a/requirements_all.txt b/requirements_all.txt index faadd0f5016..b4277836b47 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -458,7 +458,7 @@ hole==0.3.0 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181005.0 +home-assistant-frontend==20181007.0 # homeassistant.components.homekit_controller # homekit==0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 55b8733fff1..39eed8510e6 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -90,7 +90,7 @@ hdate==0.6.3 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181005.0 +home-assistant-frontend==20181007.0 # homeassistant.components.homematicip_cloud homematicip==0.9.8 From 4cffef7f2bd9760c109572ae3c5dcc64b553aa0b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 7 Oct 2018 23:26:46 +0200 Subject: [PATCH 05/56] Update translations --- .../components/hangouts/.translations/no.json | 2 ++ .../components/hue/.translations/no.json | 2 +- .../components/mqtt/.translations/no.json | 7 +++++ .../components/upnp/.translations/ko.json | 2 +- .../components/upnp/.translations/no.json | 29 +++++++++++++++++++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 homeassistant/components/upnp/.translations/no.json diff --git a/homeassistant/components/hangouts/.translations/no.json b/homeassistant/components/hangouts/.translations/no.json index c2cdb93c005..d75092da759 100644 --- a/homeassistant/components/hangouts/.translations/no.json +++ b/homeassistant/components/hangouts/.translations/no.json @@ -14,6 +14,7 @@ "data": { "2fa": "2FA Pin" }, + "description": "Tom", "title": "Tofaktorautentisering" }, "user": { @@ -21,6 +22,7 @@ "email": "E-postadresse", "password": "Passord" }, + "description": "Tom", "title": "Google Hangouts p\u00e5logging" } }, diff --git a/homeassistant/components/hue/.translations/no.json b/homeassistant/components/hue/.translations/no.json index 309e9f6a299..02dd6ef7128 100644 --- a/homeassistant/components/hue/.translations/no.json +++ b/homeassistant/components/hue/.translations/no.json @@ -24,6 +24,6 @@ "title": "Link Hub" } }, - "title": "Philips Hue Bridge" + "title": "Philips Hue" } } \ No newline at end of file diff --git a/homeassistant/components/mqtt/.translations/no.json b/homeassistant/components/mqtt/.translations/no.json index 412efd3e107..b3f1e4740b9 100644 --- a/homeassistant/components/mqtt/.translations/no.json +++ b/homeassistant/components/mqtt/.translations/no.json @@ -17,6 +17,13 @@ }, "description": "Vennligst oppgi tilkoblingsinformasjonen for din MQTT megler.", "title": "MQTT" + }, + "hassio_confirm": { + "data": { + "discovery": "Aktiver oppdagelse" + }, + "description": "Vil du konfigurere Home Assistant til \u00e5 koble til MQTT megler gitt av hass.io tillegget {addon}?", + "title": "MQTT megler via Hass.io tillegg" } }, "title": "MQTT" diff --git a/homeassistant/components/upnp/.translations/ko.json b/homeassistant/components/upnp/.translations/ko.json index 4da5bedb9b3..0dd7a16de0b 100644 --- a/homeassistant/components/upnp/.translations/ko.json +++ b/homeassistant/components/upnp/.translations/ko.json @@ -6,7 +6,7 @@ "no_sensors_or_port_mapping": "\ucd5c\uc18c\ud55c \uc13c\uc11c \ud639\uc740 \ud3ec\ud2b8 \ub9e4\ud551\uc744 \ud65c\uc131\ud654 \ud574\uc57c \ud569\ub2c8\ub2e4" }, "error": { - "other": "\uc5d0\ub7ec" + "other": "\ub2e4\ub978" }, "step": { "init": { diff --git a/homeassistant/components/upnp/.translations/no.json b/homeassistant/components/upnp/.translations/no.json new file mode 100644 index 00000000000..fbb1b4afc75 --- /dev/null +++ b/homeassistant/components/upnp/.translations/no.json @@ -0,0 +1,29 @@ +{ + "config": { + "abort": { + "already_configured": "UPnP / IGD er allerede konfigurert", + "no_devices_discovered": "Ingen UPnP / IGDs oppdaget" + }, + "error": { + "few": "f\u00e5", + "many": "mange", + "one": "en", + "other": "andre", + "two": "to", + "zero": "ingen" + }, + "step": { + "init": { + "title": "UPnP / IGD" + }, + "user": { + "data": { + "enable_sensors": "Legg til trafikk sensorer", + "igd": "UPnP / IGD" + }, + "title": "Konfigurasjonsalternativer for UPnP / IGD" + } + }, + "title": "UPnP / IGD" + } +} \ No newline at end of file From c7220919674f2f79f41ebdfb9a272ebdd9507cbb Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 5 Oct 2018 23:07:27 +0200 Subject: [PATCH 06/56] Fix data used for logbook (#17172) * Fix data used for logbook * Lint --- homeassistant/components/logbook.py | 7 ++++--- tests/components/test_logbook.py | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/logbook.py b/homeassistant/components/logbook.py index e282a133f1d..9e66c8d3aca 100644 --- a/homeassistant/components/logbook.py +++ b/homeassistant/components/logbook.py @@ -265,16 +265,17 @@ def humanify(hass, events): elif event.event_type == EVENT_ALEXA_SMART_HOME: data = event.data - entity_id = data.get('entity_id') + entity_id = data['request'].get('entity_id') if entity_id: state = hass.states.get(entity_id) name = state.name if state else entity_id message = "send command {}/{} for {}".format( - data['namespace'], data['name'], name) + data['request']['namespace'], + data['request']['name'], name) else: message = "send command {}/{}".format( - data['namespace'], data['name']) + data['request']['namespace'], data['request']['name']) yield { 'when': event.time_fired, diff --git a/tests/components/test_logbook.py b/tests/components/test_logbook.py index 9ccb8f58a87..8e7c2299731 100644 --- a/tests/components/test_logbook.py +++ b/tests/components/test_logbook.py @@ -565,20 +565,20 @@ async def test_humanify_alexa_event(hass): }) results = list(logbook.humanify(hass, [ - ha.Event(EVENT_ALEXA_SMART_HOME, { + ha.Event(EVENT_ALEXA_SMART_HOME, {'request': { 'namespace': 'Alexa.Discovery', 'name': 'Discover', - }), - ha.Event(EVENT_ALEXA_SMART_HOME, { + }}), + ha.Event(EVENT_ALEXA_SMART_HOME, {'request': { 'namespace': 'Alexa.PowerController', 'name': 'TurnOn', 'entity_id': 'light.kitchen' - }), - ha.Event(EVENT_ALEXA_SMART_HOME, { + }}), + ha.Event(EVENT_ALEXA_SMART_HOME, {'request': { 'namespace': 'Alexa.PowerController', 'name': 'TurnOn', 'entity_id': 'light.non_existing' - }), + }}), ])) From 7b176aa7c9a33000b87116dad717482bf2c0a97d Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Fri, 5 Oct 2018 23:09:55 +0200 Subject: [PATCH 07/56] Fix device_tracker service call & cleanup (#17173) * Bugfix group service - device_tracker * Cleanup --- homeassistant/components/alert.py | 6 ++-- .../components/device_sun_light_trigger.py | 20 ++++++----- .../components/device_tracker/__init__.py | 30 ++++++++-------- homeassistant/components/notify/telegram.py | 2 +- homeassistant/components/switch/flux.py | 36 ++++++++++--------- 5 files changed, 51 insertions(+), 43 deletions(-) diff --git a/homeassistant/components/alert.py b/homeassistant/components/alert.py index 72689b30138..e224351f9db 100644 --- a/homeassistant/components/alert.py +++ b/homeassistant/components/alert.py @@ -10,6 +10,8 @@ import logging import voluptuous as vol +from homeassistant.components.notify import ( + ATTR_MESSAGE, DOMAIN as DOMAIN_NOTIFY) from homeassistant.const import ( CONF_ENTITY_ID, STATE_IDLE, CONF_NAME, CONF_STATE, STATE_ON, STATE_OFF, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE, ATTR_ENTITY_ID) @@ -204,7 +206,7 @@ class Alert(ToggleEntity): self._send_done_message = True for target in self._notifiers: await self.hass.services.async_call( - 'notify', target, {'message': self._name}) + DOMAIN_NOTIFY, target, {ATTR_MESSAGE: self._name}) await self._schedule_notify() async def _notify_done_message(self, *args): @@ -213,7 +215,7 @@ class Alert(ToggleEntity): self._send_done_message = False for target in self._notifiers: await self.hass.services.async_call( - 'notify', target, {'message': self._done_message}) + DOMAIN_NOTIFY, target, {ATTR_MESSAGE: self._done_message}) async def async_turn_on(self, **kwargs): """Async Unacknowledge alert.""" diff --git a/homeassistant/components/device_sun_light_trigger.py b/homeassistant/components/device_sun_light_trigger.py index cd81b3a01ad..40a602056bf 100644 --- a/homeassistant/components/device_sun_light_trigger.py +++ b/homeassistant/components/device_sun_light_trigger.py @@ -11,9 +11,11 @@ import voluptuous as vol from homeassistant.core import callback import homeassistant.util.dt as dt_util +from homeassistant.components.light import ( + ATTR_PROFILE, ATTR_TRANSITION, DOMAIN as DOMAIN_LIGHT) from homeassistant.const import ( - SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_HOME, STATE_NOT_HOME) -from homeassistant.components.light import DOMAIN as DOMAIN_LIGHT + ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_HOME, + STATE_NOT_HOME) from homeassistant.helpers.event import ( async_track_point_in_utc_time, async_track_state_change) from homeassistant.helpers.sun import is_up, get_astral_event_next @@ -88,10 +90,10 @@ async def async_setup(hass, config): return hass.async_create_task( hass.services.async_call( - DOMAIN_LIGHT, SERVICE_TURN_ON, dict( - entity_id=light_id, - transition=LIGHT_TRANSITION_TIME.seconds, - profile=light_profile))) + DOMAIN_LIGHT, SERVICE_TURN_ON, { + ATTR_ENTITY_ID: light_id, + ATTR_TRANSITION: LIGHT_TRANSITION_TIME.seconds, + ATTR_PROFILE: light_profile})) def async_turn_on_factory(light_id): """Generate turn on callbacks as factory.""" @@ -144,7 +146,7 @@ async def async_setup(hass, config): hass.async_create_task( hass.services.async_call( DOMAIN_LIGHT, SERVICE_TURN_ON, - dict(entity_id=light_ids, profile=light_profile))) + {ATTR_ENTITY_ID: light_ids, ATTR_PROFILE: light_profile})) # Are we in the time span were we would turn on the lights # if someone would be home? @@ -160,7 +162,7 @@ async def async_setup(hass, config): hass.async_create_task( hass.services.async_call( DOMAIN_LIGHT, SERVICE_TURN_ON, - dict(entity_id=light_id))) + {ATTR_ENTITY_ID: light_id})) else: # If this light didn't happen to be turned on yet so @@ -184,7 +186,7 @@ async def async_setup(hass, config): "Everyone has left but there are lights on. Turning them off") hass.async_create_task( hass.services.async_call( - DOMAIN_LIGHT, SERVICE_TURN_OFF, dict(entity_id=light_ids))) + DOMAIN_LIGHT, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: light_ids})) async_track_state_change( hass, device_group, turn_off_lights_when_all_leave, diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index a9cc122a6f9..cbf32b4cd5a 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -15,7 +15,9 @@ from homeassistant.setup import async_prepare_setup_platform from homeassistant.core import callback from homeassistant.loader import bind_hass from homeassistant.components import group, zone -from homeassistant.components.group import DOMAIN as DOMAIN_GROUP, SERVICE_SET +from homeassistant.components.group import ( + ATTR_ADD_ENTITIES, ATTR_ENTITIES, ATTR_OBJECT_ID, ATTR_VISIBLE, + DOMAIN as DOMAIN_GROUP, SERVICE_SET) from homeassistant.components.zone.zone import async_active_zone from homeassistant.config import load_yaml_config_file, async_log_exception from homeassistant.exceptions import HomeAssistantError @@ -32,9 +34,9 @@ from homeassistant.util.yaml import dump from homeassistant.helpers.event import async_track_utc_time_change from homeassistant.const import ( - ATTR_GPS_ACCURACY, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_NAME, CONF_MAC, - DEVICE_DEFAULT_NAME, STATE_HOME, STATE_NOT_HOME, ATTR_ENTITY_ID, - CONF_ICON, ATTR_ICON, ATTR_NAME) + ATTR_ENTITY_ID, ATTR_GPS_ACCURACY, ATTR_ICON, ATTR_LATITUDE, + ATTR_LONGITUDE, ATTR_NAME, CONF_ICON, CONF_MAC, CONF_NAME, + DEVICE_DEFAULT_NAME, STATE_NOT_HOME, STATE_HOME) _LOGGER = logging.getLogger(__name__) @@ -317,11 +319,11 @@ class DeviceTracker: if self.group and self.track_new: self.hass.async_create_task( self.hass.async_call( - DOMAIN_GROUP, SERVICE_SET, dict( - object_id=util.slugify(GROUP_NAME_ALL_DEVICES), - visible=False, - name=GROUP_NAME_ALL_DEVICES, - add=[device.entity_id]))) + DOMAIN_GROUP, SERVICE_SET, { + ATTR_OBJECT_ID: util.slugify(GROUP_NAME_ALL_DEVICES), + ATTR_VISIBLE: False, + ATTR_NAME: GROUP_NAME_ALL_DEVICES, + ATTR_ADD_ENTITIES: [device.entity_id]})) self.hass.bus.async_fire(EVENT_NEW_DEVICE, { ATTR_ENTITY_ID: device.entity_id, @@ -356,11 +358,11 @@ class DeviceTracker: self.hass.async_create_task( self.hass.services.async_call( - DOMAIN_GROUP, SERVICE_SET, dict( - object_id=util.slugify(GROUP_NAME_ALL_DEVICES), - visible=False, - name=GROUP_NAME_ALL_DEVICES, - entities=entity_ids))) + DOMAIN_GROUP, SERVICE_SET, { + ATTR_OBJECT_ID: util.slugify(GROUP_NAME_ALL_DEVICES), + ATTR_VISIBLE: False, + ATTR_NAME: GROUP_NAME_ALL_DEVICES, + ATTR_ENTITIES: entity_ids})) @callback def async_update_stale(self, now: dt_util.dt.datetime): diff --git a/homeassistant/components/notify/telegram.py b/homeassistant/components/notify/telegram.py index b012506acd9..1dff82fa2cd 100644 --- a/homeassistant/components/notify/telegram.py +++ b/homeassistant/components/notify/telegram.py @@ -47,7 +47,7 @@ class TelegramNotificationService(BaseNotificationService): def send_message(self, message="", **kwargs): """Send a message to a user.""" - service_data = dict(target=kwargs.get(ATTR_TARGET, self._chat_id)) + service_data = {ATTR_TARGET: kwargs.get(ATTR_TARGET, self._chat_id)} if ATTR_TITLE in kwargs: service_data.update({ATTR_TITLE: kwargs.get(ATTR_TITLE)}) if message: diff --git a/homeassistant/components/switch/flux.py b/homeassistant/components/switch/flux.py index 793d6ab91d0..c541c37b5e7 100644 --- a/homeassistant/components/switch/flux.py +++ b/homeassistant/components/switch/flux.py @@ -13,10 +13,12 @@ import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.light import ( - is_on, DOMAIN as LIGHT_DOMAIN, VALID_TRANSITION, ATTR_TRANSITION) + is_on, ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_RGB_COLOR, ATTR_TRANSITION, + ATTR_WHITE_VALUE, ATTR_XY_COLOR, DOMAIN as LIGHT_DOMAIN, VALID_TRANSITION) from homeassistant.components.switch import DOMAIN, SwitchDevice from homeassistant.const import ( - CONF_NAME, CONF_PLATFORM, CONF_LIGHTS, CONF_MODE, SERVICE_TURN_ON) + ATTR_ENTITY_ID, CONF_NAME, CONF_PLATFORM, CONF_LIGHTS, CONF_MODE, + SERVICE_TURN_ON) from homeassistant.helpers.event import track_time_change from homeassistant.helpers.sun import get_astral_event_date from homeassistant.util import slugify @@ -70,12 +72,12 @@ def set_lights_xy(hass, lights, x_val, y_val, brightness, transition): for light in lights: if is_on(hass, light): hass.services.call( - LIGHT_DOMAIN, SERVICE_TURN_ON, dict( - xy_color=[x_val, y_val], - brightness=brightness, - transition=transition, - white_value=brightness, - entity_id=light)) + LIGHT_DOMAIN, SERVICE_TURN_ON, { + ATTR_XY_COLOR: [x_val, y_val], + ATTR_BRIGHTNESS: brightness, + ATTR_TRANSITION: transition, + ATTR_WHITE_VALUE: brightness, + ATTR_ENTITY_ID: light}) def set_lights_temp(hass, lights, mired, brightness, transition): @@ -83,11 +85,11 @@ def set_lights_temp(hass, lights, mired, brightness, transition): for light in lights: if is_on(hass, light): hass.services.call( - LIGHT_DOMAIN, SERVICE_TURN_ON, dict( - color_temp=int(mired), - brightness=brightness, - transition=transition, - entity_id=light)) + LIGHT_DOMAIN, SERVICE_TURN_ON, { + ATTR_COLOR_TEMP: int(mired), + ATTR_BRIGHTNESS: brightness, + ATTR_TRANSITION: transition, + ATTR_ENTITY_ID: light}) def set_lights_rgb(hass, lights, rgb, transition): @@ -95,10 +97,10 @@ def set_lights_rgb(hass, lights, rgb, transition): for light in lights: if is_on(hass, light): hass.services.call( - LIGHT_DOMAIN, SERVICE_TURN_ON, dict( - rgb_color=rgb, - transition=transition, - entity_id=light)) + LIGHT_DOMAIN, SERVICE_TURN_ON, { + ATTR_RGB_COLOR: rgb, + ATTR_TRANSITION: transition, + ATTR_ENTITY_ID: light}) def setup_platform(hass, config, add_entities, discovery_info=None): From 3338ebd4c161f3e02269b94cf79d2b53bc70d6f9 Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Sat, 6 Oct 2018 23:30:07 +0200 Subject: [PATCH 08/56] Bugfix switch flux - light service call (#17187) * Bugfix switch flux - light service call * Change x_val and y_val test --- homeassistant/components/switch/flux.py | 38 +++++++++++++++---------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/homeassistant/components/switch/flux.py b/homeassistant/components/switch/flux.py index c541c37b5e7..05e0497155a 100644 --- a/homeassistant/components/switch/flux.py +++ b/homeassistant/components/switch/flux.py @@ -71,36 +71,44 @@ def set_lights_xy(hass, lights, x_val, y_val, brightness, transition): """Set color of array of lights.""" for light in lights: if is_on(hass, light): + service_data = {ATTR_ENTITY_ID: light} + if x_val is not None and y_val is not None: + service_data[ATTR_XY_COLOR] = [x_val, y_val] + if brightness is not None: + service_data[ATTR_BRIGHTNESS] = brightness + service_data[ATTR_WHITE_VALUE] = brightness + if transition is not None: + service_data[ATTR_TRANSITION] = transition hass.services.call( - LIGHT_DOMAIN, SERVICE_TURN_ON, { - ATTR_XY_COLOR: [x_val, y_val], - ATTR_BRIGHTNESS: brightness, - ATTR_TRANSITION: transition, - ATTR_WHITE_VALUE: brightness, - ATTR_ENTITY_ID: light}) + LIGHT_DOMAIN, SERVICE_TURN_ON, service_data) def set_lights_temp(hass, lights, mired, brightness, transition): """Set color of array of lights.""" for light in lights: if is_on(hass, light): + service_data = {ATTR_ENTITY_ID: light} + if mired is not None: + service_data[ATTR_COLOR_TEMP] = int(mired) + if brightness is not None: + service_data[ATTR_BRIGHTNESS] = brightness + if transition is not None: + service_data[ATTR_TRANSITION] = transition hass.services.call( - LIGHT_DOMAIN, SERVICE_TURN_ON, { - ATTR_COLOR_TEMP: int(mired), - ATTR_BRIGHTNESS: brightness, - ATTR_TRANSITION: transition, - ATTR_ENTITY_ID: light}) + LIGHT_DOMAIN, SERVICE_TURN_ON, service_data) def set_lights_rgb(hass, lights, rgb, transition): """Set color of array of lights.""" for light in lights: if is_on(hass, light): + service_data = {ATTR_ENTITY_ID: light} + if rgb is not None: + service_data[ATTR_RGB_COLOR] = rgb + if transition is not None: + service_data[ATTR_TRANSITION] = transition hass.services.call( - LIGHT_DOMAIN, SERVICE_TURN_ON, { - ATTR_RGB_COLOR: rgb, - ATTR_TRANSITION: transition, - ATTR_ENTITY_ID: light}) + LIGHT_DOMAIN, SERVICE_TURN_ON, service_data) def setup_platform(hass, config, add_entities, discovery_info=None): From b872cb95c796feff25feef80e99f268c341aa81e Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Sat, 6 Oct 2018 14:32:54 +0200 Subject: [PATCH 09/56] Upgrade aiolifx_effects to 0.2.1 (#17188) --- homeassistant/components/light/lifx.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/lifx.py b/homeassistant/components/light/lifx.py index 17b9f104f68..9dcd2ae4cc2 100644 --- a/homeassistant/components/light/lifx.py +++ b/homeassistant/components/light/lifx.py @@ -30,7 +30,7 @@ import homeassistant.util.color as color_util _LOGGER = logging.getLogger(__name__) -REQUIREMENTS = ['aiolifx==0.6.3', 'aiolifx_effects==0.2.0'] +REQUIREMENTS = ['aiolifx==0.6.3', 'aiolifx_effects==0.2.1'] UDP_BROADCAST_PORT = 56700 diff --git a/requirements_all.txt b/requirements_all.txt index b4277836b47..8ed5109afeb 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -110,7 +110,7 @@ aioimaplib==0.7.13 aiolifx==0.6.3 # homeassistant.components.light.lifx -aiolifx_effects==0.2.0 +aiolifx_effects==0.2.1 # homeassistant.components.scene.hunterdouglas_powerview aiopvapi==1.5.4 From 7369af06391aca0e2aad28fdced3a00ea0a9dbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20Sandstr=C3=B6m?= Date: Sat, 6 Oct 2018 20:03:22 +0200 Subject: [PATCH 10/56] Verisure standard config for scan interval (#17192) * verisure configurable polling * fix indentation --- homeassistant/components/verisure.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/verisure.py b/homeassistant/components/verisure.py index 3876ff41c37..016547697b9 100644 --- a/homeassistant/components/verisure.py +++ b/homeassistant/components/verisure.py @@ -10,8 +10,8 @@ from datetime import timedelta import voluptuous as vol -from homeassistant.const import (CONF_PASSWORD, CONF_USERNAME, - EVENT_HOMEASSISTANT_STOP) +from homeassistant.const import (CONF_PASSWORD, CONF_SCAN_INTERVAL, + CONF_USERNAME, EVENT_HOMEASSISTANT_STOP) from homeassistant.helpers import discovery from homeassistant.util import Throttle import homeassistant.helpers.config_validation as cv @@ -32,10 +32,12 @@ CONF_MOUSE = 'mouse' CONF_SMARTPLUGS = 'smartplugs' CONF_THERMOMETERS = 'thermometers' CONF_SMARTCAM = 'smartcam' -CONF_POLLING_RATE = 'polling_rate' DOMAIN = 'verisure' +MIN_SCAN_INTERVAL = timedelta(minutes=1) +DEFAULT_SCAN_INTERVAL = timedelta(minutes=1) + SERVICE_CAPTURE_SMARTCAM = 'capture_smartcam' HUB = None @@ -54,8 +56,8 @@ CONFIG_SCHEMA = vol.Schema({ vol.Optional(CONF_SMARTPLUGS, default=True): cv.boolean, vol.Optional(CONF_THERMOMETERS, default=True): cv.boolean, vol.Optional(CONF_SMARTCAM, default=True): cv.boolean, - vol.Optional(CONF_POLLING_RATE, default=1): vol.All( - vol.Coerce(int), vol.Range(min=1)), + vol.Optional(CONF_SCAN_INTERVAL, default=DEFAULT_SCAN_INTERVAL): ( + vol.All(cv.time_period, vol.Clamp(min=MIN_SCAN_INTERVAL))), }), }, extra=vol.ALLOW_EXTRA) @@ -69,8 +71,8 @@ def setup(hass, config): import verisure global HUB HUB = VerisureHub(config[DOMAIN], verisure) - HUB.update_overview = Throttle(timedelta( - minutes=config[DOMAIN][CONF_POLLING_RATE]))(HUB.update_overview) + HUB.update_overview = Throttle( + config[DOMAIN][CONF_SCAN_INTERVAL])(HUB.update_overview) if not HUB.login(): return False hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, From 5fcea074c4c938e96f80fa6f6bac5836b5368ce6 Mon Sep 17 00:00:00 2001 From: Martin Berg <2682426+mbrrg@users.noreply.github.com> Date: Sun, 7 Oct 2018 23:30:09 +0200 Subject: [PATCH 11/56] Init sub-components using global var. (#17220) --- .../components/alarm_control_panel/spc.py | 12 ++-- homeassistant/components/binary_sensor/spc.py | 14 ++--- homeassistant/components/spc.py | 9 +-- .../alarm_control_panel/test_spc.py | 58 ------------------- tests/components/binary_sensor/test_spc.py | 55 ------------------ tests/components/test_spc.py | 3 +- 6 files changed, 13 insertions(+), 138 deletions(-) delete mode 100644 tests/components/alarm_control_panel/test_spc.py delete mode 100644 tests/components/binary_sensor/test_spc.py diff --git a/homeassistant/components/alarm_control_panel/spc.py b/homeassistant/components/alarm_control_panel/spc.py index 9150518022f..2345717d835 100644 --- a/homeassistant/components/alarm_control_panel/spc.py +++ b/homeassistant/components/alarm_control_panel/spc.py @@ -9,8 +9,7 @@ import logging import homeassistant.components.alarm_control_panel as alarm from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.core import callback -from homeassistant.components.spc import ( - ATTR_DISCOVER_AREAS, DATA_API, SIGNAL_UPDATE_ALARM) +from homeassistant.components.spc import (DATA_API, SIGNAL_UPDATE_ALARM) from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STATE_ALARM_DISARMED, STATE_ALARM_TRIGGERED) @@ -37,12 +36,9 @@ def _get_alarm_state(area): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the SPC alarm control panel platform.""" - if (discovery_info is None or - discovery_info[ATTR_DISCOVER_AREAS] is None): - return - - async_add_entities([SpcAlarm(area=area, api=hass.data[DATA_API]) - for area in discovery_info[ATTR_DISCOVER_AREAS]]) + api = hass.data[DATA_API] + async_add_entities([SpcAlarm(area=area, api=api) + for area in api.areas.values()]) class SpcAlarm(alarm.AlarmControlPanel): diff --git a/homeassistant/components/binary_sensor/spc.py b/homeassistant/components/binary_sensor/spc.py index c1be72db374..25baf503399 100644 --- a/homeassistant/components/binary_sensor/spc.py +++ b/homeassistant/components/binary_sensor/spc.py @@ -9,8 +9,7 @@ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.core import callback -from homeassistant.components.spc import ( - ATTR_DISCOVER_DEVICES, SIGNAL_UPDATE_SENSOR) +from homeassistant.components.spc import (DATA_API, SIGNAL_UPDATE_SENSOR) _LOGGER = logging.getLogger(__name__) @@ -27,13 +26,10 @@ def _get_device_class(zone_type): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the SPC binary sensor.""" - if (discovery_info is None or - discovery_info[ATTR_DISCOVER_DEVICES] is None): - return - - async_add_entities(SpcBinarySensor(zone) - for zone in discovery_info[ATTR_DISCOVER_DEVICES] - if _get_device_class(zone.type)) + api = hass.data[DATA_API] + async_add_entities([SpcBinarySensor(zone) + for zone in api.zones.values() + if _get_device_class(zone.type)]) class SpcBinarySensor(BinarySensorDevice): diff --git a/homeassistant/components/spc.py b/homeassistant/components/spc.py index b00a4aeed2c..0771608f88e 100644 --- a/homeassistant/components/spc.py +++ b/homeassistant/components/spc.py @@ -16,9 +16,6 @@ REQUIREMENTS = ['pyspcwebgw==0.4.0'] _LOGGER = logging.getLogger(__name__) -ATTR_DISCOVER_DEVICES = 'devices' -ATTR_DISCOVER_AREAS = 'areas' - CONF_WS_URL = 'ws_url' CONF_API_URL = 'api_url' @@ -66,13 +63,11 @@ async def async_setup(hass, config): # add sensor devices for each zone (typically motion/fire/door sensors) hass.async_create_task(discovery.async_load_platform( - hass, 'binary_sensor', DOMAIN, - {ATTR_DISCOVER_DEVICES: spc.zones.values()}, config)) + hass, 'binary_sensor', DOMAIN)) # create a separate alarm panel for each area hass.async_create_task(discovery.async_load_platform( - hass, 'alarm_control_panel', DOMAIN, - {ATTR_DISCOVER_AREAS: spc.areas.values()}, config)) + hass, 'alarm_control_panel', DOMAIN)) # start listening for incoming events over websocket spc.start() diff --git a/tests/components/alarm_control_panel/test_spc.py b/tests/components/alarm_control_panel/test_spc.py deleted file mode 100644 index b1078e1b14f..00000000000 --- a/tests/components/alarm_control_panel/test_spc.py +++ /dev/null @@ -1,58 +0,0 @@ -"""Tests for Vanderbilt SPC alarm control panel platform.""" -from homeassistant.components.alarm_control_panel import spc -from homeassistant.const import ( - STATE_ALARM_ARMED_AWAY, STATE_ALARM_DISARMED) -from homeassistant.components.spc import (DATA_API) - - -async def test_setup_platform(hass): - """Test adding areas as separate alarm control panel devices.""" - added_entities = [] - - def add_entities(entities): - nonlocal added_entities - added_entities = list(entities) - - area_defs = [{ - 'id': '1', - 'name': 'House', - 'mode': '3', - 'last_set_time': '1485759851', - 'last_set_user_id': '1', - 'last_set_user_name': 'Pelle', - 'last_unset_time': '1485800564', - 'last_unset_user_id': '1', - 'last_unset_user_name': 'Lisa', - 'last_alarm': '1478174896' - }, { - 'id': '3', - 'name': 'Garage', - 'mode': '0', - 'last_set_time': '1483705803', - 'last_set_user_id': '9998', - 'last_set_user_name': 'Pelle', - 'last_unset_time': '1483705808', - 'last_unset_user_id': '9998', - 'last_unset_user_name': 'Lisa' - }] - - from pyspcwebgw import Area - - areas = [Area(gateway=None, spc_area=a) for a in area_defs] - - hass.data[DATA_API] = None - - await spc.async_setup_platform(hass=hass, - config={}, - async_add_entities=add_entities, - discovery_info={'areas': areas}) - - assert len(added_entities) == 2 - - assert added_entities[0].name == 'House' - assert added_entities[0].state == STATE_ALARM_ARMED_AWAY - assert added_entities[0].changed_by == 'Pelle' - - assert added_entities[1].name == 'Garage' - assert added_entities[1].state == STATE_ALARM_DISARMED - assert added_entities[1].changed_by == 'Lisa' diff --git a/tests/components/binary_sensor/test_spc.py b/tests/components/binary_sensor/test_spc.py deleted file mode 100644 index ec0886aeed8..00000000000 --- a/tests/components/binary_sensor/test_spc.py +++ /dev/null @@ -1,55 +0,0 @@ -"""Tests for Vanderbilt SPC binary sensor platform.""" -from homeassistant.components.binary_sensor import spc - - -async def test_setup_platform(hass): - """Test autodiscovery of supported device types.""" - added_entities = [] - - zone_defs = [{ - 'id': '1', - 'type': '3', - 'zone_name': 'Kitchen smoke', - 'area': '1', - 'area_name': 'House', - 'input': '0', - 'status': '0', - }, { - 'id': '3', - 'type': '0', - 'zone_name': 'Hallway PIR', - 'area': '1', - 'area_name': 'House', - 'input': '0', - 'status': '0', - }, { - 'id': '5', - 'type': '1', - 'zone_name': 'Front door', - 'area': '1', - 'area_name': 'House', - 'input': '1', - 'status': '0', - }] - - def add_entities(entities): - nonlocal added_entities - added_entities = list(entities) - - from pyspcwebgw import Zone - - zones = [Zone(area=None, spc_zone=z) for z in zone_defs] - - await spc.async_setup_platform(hass=hass, - config={}, - async_add_entities=add_entities, - discovery_info={'devices': zones}) - - assert len(added_entities) == 3 - assert added_entities[0].device_class == 'smoke' - assert added_entities[0].state == 'off' - assert added_entities[1].device_class == 'motion' - assert added_entities[1].state == 'off' - assert added_entities[2].device_class == 'opening' - assert added_entities[2].state == 'on' - assert all(d.hidden for d in added_entities) diff --git a/tests/components/test_spc.py b/tests/components/test_spc.py index d4bedda4e96..bcbf970a48b 100644 --- a/tests/components/test_spc.py +++ b/tests/components/test_spc.py @@ -59,7 +59,8 @@ async def test_update_alarm_device(hass): return_value=mock_coro(True)): assert await async_setup_component(hass, 'spc', config) is True - await hass.async_block_till_done() + await hass.async_block_till_done() + entity_id = 'alarm_control_panel.house' assert hass.states.get(entity_id).state == STATE_ALARM_ARMED_AWAY From bd4ff6fc21850329cfe903dfe2508f9908e61086 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 7 Oct 2018 23:33:46 +0200 Subject: [PATCH 12/56] Bumped version to 0.80.0b2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index db1de6bbe6b..e8e7ef95db2 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0b1' +PATCH_VERSION = '0b2' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 6be52208fc6b803e85aca53d0f99f948ea074bd6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Oct 2018 09:30:40 +0200 Subject: [PATCH 13/56] Prevent accidental device reg override (#17136) --- homeassistant/helpers/entity_platform.py | 27 +++++++++------ tests/helpers/test_entity_platform.py | 42 ++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index f2913e37339..99aa10013ab 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -275,17 +275,24 @@ class EntityPlatform: device_info = entity.device_info if config_entry_id is not None and device_info is not None: + processed_dev_info = { + 'config_entry_id': config_entry_id + } + for key in ( + 'connections', + 'identifiers', + 'manufacturer', + 'model', + 'name', + 'sw_version', + 'via_hub', + ): + if key in device_info: + processed_dev_info[key] = device_info[key] + device = device_registry.async_get_or_create( - config_entry_id=config_entry_id, - connections=device_info.get('connections') or set(), - identifiers=device_info.get('identifiers') or set(), - manufacturer=device_info.get('manufacturer'), - model=device_info.get('model'), - name=device_info.get('name'), - sw_version=device_info.get('sw_version'), - via_hub=device_info.get('via_hub')) - if device: - device_id = device.id + **processed_dev_info) + device_id = device.id else: device_id = None diff --git a/tests/helpers/test_entity_platform.py b/tests/helpers/test_entity_platform.py index 631d446d186..97d6a0f5b98 100644 --- a/tests/helpers/test_entity_platform.py +++ b/tests/helpers/test_entity_platform.py @@ -728,3 +728,45 @@ async def test_device_info_called(hass): assert device.name == 'test-name' assert device.sw_version == 'test-sw' assert device.hub_device_id == hub.id + + +async def test_device_info_not_overrides(hass): + """Test device info is forwarded correctly.""" + registry = await hass.helpers.device_registry.async_get_registry() + device = registry.async_get_or_create( + config_entry_id='bla', + connections={('mac', 'abcd')}, + manufacturer='test-manufacturer', + model='test-model' + ) + + assert device.manufacturer == 'test-manufacturer' + assert device.model == 'test-model' + + async def async_setup_entry(hass, config_entry, async_add_entities): + """Mock setup entry method.""" + async_add_entities([ + MockEntity(unique_id='qwer', device_info={ + 'connections': {('mac', 'abcd')}, + }), + ]) + return True + + platform = MockPlatform( + async_setup_entry=async_setup_entry + ) + config_entry = MockConfigEntry(entry_id='super-mock-id') + entity_platform = MockEntityPlatform( + hass, + platform_name=config_entry.domain, + platform=platform + ) + + assert await entity_platform.async_setup_entry(config_entry) + await hass.async_block_till_done() + + device2 = registry.async_get_device(set(), {('mac', 'abcd')}) + assert device2 is not None + assert device.id == device2.id + assert device2.manufacturer == 'test-manufacturer' + assert device2.model == 'test-model' From 9e386938bb1e4b8bc90ba32fb5ce7c345dc8182b Mon Sep 17 00:00:00 2001 From: Matt Schmitt Date: Mon, 8 Oct 2018 08:19:23 -0400 Subject: [PATCH 14/56] MyQ cover return unknown state if not available (#17207) * Add additional supported states * Use get method for lookup * Return None if unable to get status --- homeassistant/components/cover/myq.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/cover/myq.py b/homeassistant/components/cover/myq.py index 78b6f891f11..5ceb4260d0c 100644 --- a/homeassistant/components/cover/myq.py +++ b/homeassistant/components/cover/myq.py @@ -11,8 +11,8 @@ import voluptuous as vol from homeassistant.components.cover import ( CoverDevice, SUPPORT_CLOSE, SUPPORT_OPEN) from homeassistant.const import ( - CONF_PASSWORD, CONF_TYPE, CONF_USERNAME, STATE_CLOSED, STATE_OPEN, - STATE_CLOSING, STATE_OPENING) + CONF_PASSWORD, CONF_TYPE, CONF_USERNAME, STATE_CLOSED, STATE_CLOSING, + STATE_OPEN, STATE_OPENING) import homeassistant.helpers.config_validation as cv REQUIREMENTS = ['pymyq==0.0.15'] @@ -23,8 +23,8 @@ DEFAULT_NAME = 'myq' MYQ_TO_HASS = { 'closed': STATE_CLOSED, - 'open': STATE_OPEN, 'closing': STATE_CLOSING, + 'open': STATE_OPEN, 'opening': STATE_OPENING } @@ -76,7 +76,7 @@ class MyQDevice(CoverDevice): self.myq = myq self.device_id = device['deviceid'] self._name = device['name'] - self._status = STATE_CLOSED + self._status = None @property def device_class(self): @@ -96,17 +96,19 @@ class MyQDevice(CoverDevice): @property def is_closed(self): """Return true if cover is closed, else False.""" - return MYQ_TO_HASS[self._status] == STATE_CLOSED + if self._status in [None, False]: + return None + return MYQ_TO_HASS.get(self._status) == STATE_CLOSED @property def is_closing(self): """Return if the cover is closing or not.""" - return MYQ_TO_HASS[self._status] == STATE_CLOSING + return MYQ_TO_HASS.get(self._status) == STATE_CLOSING @property def is_opening(self): """Return if the cover is opening or not.""" - return MYQ_TO_HASS[self._status] == STATE_OPENING + return MYQ_TO_HASS.get(self._status) == STATE_OPENING def close_cover(self, **kwargs): """Issue close command to cover.""" From 6671cbb96dfb4ef41be910f12140b1c34e3b5989 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 8 Oct 2018 10:59:43 +0200 Subject: [PATCH 15/56] Fix potential MQTT discovery race condition (#17208) * Fix potential MQTT discovery race condition * Rename data key --- homeassistant/components/mqtt/discovery.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index fdb7948e4bf..a762978a330 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -4,6 +4,7 @@ Support for MQTT discovery. For more details about this component, please refer to the documentation at https://home-assistant.io/components/mqtt/#discovery """ +import asyncio import json import logging import re @@ -51,6 +52,7 @@ CONFIG_ENTRY_PLATFORMS = { } ALREADY_DISCOVERED = 'mqtt_discovered_components' +DATA_CONFIG_ENTRY_LOCK = 'mqtt_config_entry_lock' CONFIG_ENTRY_IS_SETUP = 'mqtt_config_entry_is_setup' MQTT_DISCOVERY_UPDATED = 'mqtt_discovery_updated_{}' MQTT_DISCOVERY_NEW = 'mqtt_discovery_new_{}_{}' @@ -119,14 +121,16 @@ async def async_start(hass: HomeAssistantType, discovery_topic, hass_config, return config_entries_key = '{}.{}'.format(component, platform) - if config_entries_key not in hass.data[CONFIG_ENTRY_IS_SETUP]: - hass.data[CONFIG_ENTRY_IS_SETUP].add(config_entries_key) - await hass.config_entries.async_forward_entry_setup( - config_entry, component) + async with hass.data[DATA_CONFIG_ENTRY_LOCK]: + if config_entries_key not in hass.data[CONFIG_ENTRY_IS_SETUP]: + await hass.config_entries.async_forward_entry_setup( + config_entry, component) + hass.data[CONFIG_ENTRY_IS_SETUP].add(config_entries_key) async_dispatcher_send(hass, MQTT_DISCOVERY_NEW.format( component, platform), payload) + hass.data[DATA_CONFIG_ENTRY_LOCK] = asyncio.Lock() hass.data[CONFIG_ENTRY_IS_SETUP] = set() await mqtt.async_subscribe( From 3a6eac216c8d03215bb364e1c090779f095e0682 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Oct 2018 10:20:18 +0200 Subject: [PATCH 16/56] Fix SPC (#17236) --- homeassistant/components/alarm_control_panel/spc.py | 2 ++ homeassistant/components/binary_sensor/spc.py | 2 ++ homeassistant/components/spc.py | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/alarm_control_panel/spc.py b/homeassistant/components/alarm_control_panel/spc.py index 2345717d835..b4c49d4d190 100644 --- a/homeassistant/components/alarm_control_panel/spc.py +++ b/homeassistant/components/alarm_control_panel/spc.py @@ -36,6 +36,8 @@ def _get_alarm_state(area): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the SPC alarm control panel platform.""" + if discovery_info is None: + return api = hass.data[DATA_API] async_add_entities([SpcAlarm(area=area, api=api) for area in api.areas.values()]) diff --git a/homeassistant/components/binary_sensor/spc.py b/homeassistant/components/binary_sensor/spc.py index 25baf503399..baa25266804 100644 --- a/homeassistant/components/binary_sensor/spc.py +++ b/homeassistant/components/binary_sensor/spc.py @@ -26,6 +26,8 @@ def _get_device_class(zone_type): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the SPC binary sensor.""" + if discovery_info is None: + return api = hass.data[DATA_API] async_add_entities([SpcBinarySensor(zone) for zone in api.zones.values() diff --git a/homeassistant/components/spc.py b/homeassistant/components/spc.py index 0771608f88e..5aa987bd0a8 100644 --- a/homeassistant/components/spc.py +++ b/homeassistant/components/spc.py @@ -63,11 +63,11 @@ async def async_setup(hass, config): # add sensor devices for each zone (typically motion/fire/door sensors) hass.async_create_task(discovery.async_load_platform( - hass, 'binary_sensor', DOMAIN)) + hass, 'binary_sensor', DOMAIN, {})) # create a separate alarm panel for each area hass.async_create_task(discovery.async_load_platform( - hass, 'alarm_control_panel', DOMAIN)) + hass, 'alarm_control_panel', DOMAIN, {})) # start listening for incoming events over websocket spc.start() From 2e120061b4f4db90801cadbef61d18ab9429c951 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Oct 2018 12:53:51 +0200 Subject: [PATCH 17/56] Guard for bad device info (#17238) --- homeassistant/helpers/entity_platform.py | 6 +++--- tests/helpers/test_entity_platform.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index 99aa10013ab..3ab45577236 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -273,6 +273,7 @@ class EntityPlatform: config_entry_id = None device_info = entity.device_info + device_id = None if config_entry_id is not None and device_info is not None: processed_dev_info = { @@ -292,9 +293,8 @@ class EntityPlatform: device = device_registry.async_get_or_create( **processed_dev_info) - device_id = device.id - else: - device_id = None + if device: + device_id = device.id entry = entity_registry.async_get_or_create( self.domain, self.platform_name, entity.unique_id, diff --git a/tests/helpers/test_entity_platform.py b/tests/helpers/test_entity_platform.py index 97d6a0f5b98..e985771e486 100644 --- a/tests/helpers/test_entity_platform.py +++ b/tests/helpers/test_entity_platform.py @@ -719,6 +719,8 @@ async def test_device_info_called(hass): assert await entity_platform.async_setup_entry(config_entry) await hass.async_block_till_done() + assert len(hass.states.async_entity_ids()) == 2 + device = registry.async_get_device({('hue', '1234')}, set()) assert device is not None assert device.identifiers == {('hue', '1234')} From a372053eac3fd27e4ba904d852058368bcbf0555 Mon Sep 17 00:00:00 2001 From: Malte Franken Date: Mon, 8 Oct 2018 22:32:16 +1100 Subject: [PATCH 18/56] updated georss-client library to 0.3 (#17239) --- homeassistant/components/sensor/geo_rss_events.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sensor/geo_rss_events.py b/homeassistant/components/sensor/geo_rss_events.py index 2a9041df357..5085e113e92 100644 --- a/homeassistant/components/sensor/geo_rss_events.py +++ b/homeassistant/components/sensor/geo_rss_events.py @@ -19,7 +19,7 @@ from homeassistant.const import ( STATE_UNKNOWN, CONF_UNIT_OF_MEASUREMENT, CONF_NAME, CONF_RADIUS, CONF_URL) from homeassistant.helpers.entity import Entity -REQUIREMENTS = ['georss_client==0.1'] +REQUIREMENTS = ['georss_client==0.3'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 8ed5109afeb..7da7f7e7847 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -398,7 +398,7 @@ geizhals==0.0.7 geojson_client==0.1 # homeassistant.components.sensor.geo_rss_events -georss_client==0.1 +georss_client==0.3 # homeassistant.components.sensor.gitter gitterpy==0.1.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 39eed8510e6..b4e995d580c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -72,7 +72,7 @@ gTTS-token==1.1.2 geojson_client==0.1 # homeassistant.components.sensor.geo_rss_events -georss_client==0.1 +georss_client==0.3 # homeassistant.components.ffmpeg ha-ffmpeg==1.9 From 4d3d51635d2637b177c290ec47ab6fa97cabda5b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Oct 2018 16:16:01 +0200 Subject: [PATCH 19/56] Bumped version to 0.80.0b3 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index e8e7ef95db2..628d418a735 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0b2' +PATCH_VERSION = '0b3' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 429f09deb3175b82a52790d732bd6a388533981c Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Oct 2018 20:16:37 +0200 Subject: [PATCH 20/56] Add a webhook automation trigger (#17246) --- .../components/automation/webhook.py | 54 +++++++++++++ tests/components/automation/test_webhook.py | 75 +++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 homeassistant/components/automation/webhook.py create mode 100644 tests/components/automation/test_webhook.py diff --git a/homeassistant/components/automation/webhook.py b/homeassistant/components/automation/webhook.py new file mode 100644 index 00000000000..2c9c331cdc5 --- /dev/null +++ b/homeassistant/components/automation/webhook.py @@ -0,0 +1,54 @@ +""" +Offer webhook triggered automation rules. + +For more details about this automation rule, please refer to the documentation +at https://home-assistant.io/docs/automation/trigger/#webhook-trigger +""" +from functools import partial +import logging + +from aiohttp import hdrs +import voluptuous as vol + +from homeassistant.core import callback +from homeassistant.const import CONF_PLATFORM +import homeassistant.helpers.config_validation as cv + +DEPENDENCIES = ('webhook',) + +_LOGGER = logging.getLogger(__name__) +CONF_WEBHOOK_ID = 'webhook_id' + +TRIGGER_SCHEMA = vol.Schema({ + vol.Required(CONF_PLATFORM): 'webhook', + vol.Required(CONF_WEBHOOK_ID): cv.string, +}) + + +async def _handle_webhook(action, hass, webhook_id, request): + """Handle incoming webhook.""" + result = { + 'platform': 'webhook', + 'webhook_id': webhook_id, + } + + if 'json' in request.headers.get(hdrs.CONTENT_TYPE, ''): + result['json'] = await request.json() + else: + result['data'] = await request.post() + + hass.async_run_job(action, {'trigger': result}) + + +async def async_trigger(hass, config, action): + """Trigger based on incoming webhooks.""" + webhook_id = config.get(CONF_WEBHOOK_ID) + hass.components.webhook.async_register( + webhook_id, partial(_handle_webhook, action)) + + @callback + def unregister(): + """Unregister webhook.""" + hass.components.webhook.async_unregister(webhook_id) + + return unregister diff --git a/tests/components/automation/test_webhook.py b/tests/components/automation/test_webhook.py new file mode 100644 index 00000000000..a6cde395583 --- /dev/null +++ b/tests/components/automation/test_webhook.py @@ -0,0 +1,75 @@ +"""The tests for the webhook automation trigger.""" +from homeassistant.core import callback +from homeassistant.setup import async_setup_component + + +async def test_webhook_json(hass, aiohttp_client): + """Test triggering with a JSON webhook.""" + events = [] + + @callback + def store_event(event): + """Helepr to store events.""" + events.append(event) + + hass.bus.async_listen('test_success', store_event) + + assert await async_setup_component(hass, 'automation', { + 'automation': { + 'trigger': { + 'platform': 'webhook', + 'webhook_id': 'json_webhook' + }, + 'action': { + 'event': 'test_success', + 'event_data_template': { + 'hello': 'yo {{ trigger.json.hello }}', + } + } + } + }) + + client = await aiohttp_client(hass.http.app) + + await client.post('/api/webhook/json_webhook', json={ + 'hello': 'world' + }) + + assert len(events) == 1 + assert events[0].data['hello'] == 'yo world' + + +async def test_webhook_post(hass, aiohttp_client): + """Test triggering with a POST webhook.""" + events = [] + + @callback + def store_event(event): + """Helepr to store events.""" + events.append(event) + + hass.bus.async_listen('test_success', store_event) + + assert await async_setup_component(hass, 'automation', { + 'automation': { + 'trigger': { + 'platform': 'webhook', + 'webhook_id': 'post_webhook' + }, + 'action': { + 'event': 'test_success', + 'event_data_template': { + 'hello': 'yo {{ trigger.data.hello }}', + } + } + } + }) + + client = await aiohttp_client(hass.http.app) + + await client.post('/api/webhook/post_webhook', data={ + 'hello': 'world' + }) + + assert len(events) == 1 + assert events[0].data['hello'] == 'yo world' From eb7db1f7632a4cb4ca4993d7f8b8e97ed49d4999 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Oct 2018 20:50:24 +0200 Subject: [PATCH 21/56] block external IP (#17248) * block external IP * Update __init__.py --- .../components/emulated_hue/__init__.py | 15 ++++++++++-- .../components/emulated_hue/hue_api.py | 23 +++++++++++++++++++ tests/components/emulated_hue/test_hue_api.py | 10 ++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/emulated_hue/__init__.py b/homeassistant/components/emulated_hue/__init__.py index 8a67b933b9f..5f1d61dd602 100644 --- a/homeassistant/components/emulated_hue/__init__.py +++ b/homeassistant/components/emulated_hue/__init__.py @@ -18,6 +18,8 @@ from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.deprecation import get_deprecated import homeassistant.helpers.config_validation as cv from homeassistant.util.json import load_json, save_json +from homeassistant.components.http import real_ip + from .hue_api import ( HueUsernameView, HueAllLightsStateView, HueOneLightStateView, HueOneLightChangeView, HueGroupView) @@ -81,12 +83,20 @@ ATTR_EMULATED_HUE_NAME = 'emulated_hue_name' ATTR_EMULATED_HUE_HIDDEN = 'emulated_hue_hidden' -def setup(hass, yaml_config): +async def async_setup(hass, yaml_config): """Activate the emulated_hue component.""" config = Config(hass, yaml_config.get(DOMAIN, {})) app = web.Application() app['hass'] = hass + + real_ip.setup_real_ip(app, False, []) + # We misunderstood the startup signal. You're not allowed to change + # anything during startup. Temp workaround. + # pylint: disable=protected-access + app._on_startup.freeze() + await app.startup() + handler = None server = None @@ -131,7 +141,8 @@ def setup(hass, yaml_config): hass.bus.async_listen_once( EVENT_HOMEASSISTANT_STOP, stop_emulated_hue_bridge) - hass.bus.listen_once(EVENT_HOMEASSISTANT_START, start_emulated_hue_bridge) + hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, + start_emulated_hue_bridge) return True diff --git a/homeassistant/components/emulated_hue/hue_api.py b/homeassistant/components/emulated_hue/hue_api.py index c6fa622513b..3699a45ef30 100644 --- a/homeassistant/components/emulated_hue/hue_api.py +++ b/homeassistant/components/emulated_hue/hue_api.py @@ -20,6 +20,9 @@ from homeassistant.components.fan import ( SPEED_MEDIUM, SPEED_HIGH ) from homeassistant.components.http import HomeAssistantView +from homeassistant.components.http.const import KEY_REAL_IP +from homeassistant.util.network import is_local + _LOGGER = logging.getLogger(__name__) @@ -46,6 +49,10 @@ class HueUsernameView(HomeAssistantView): return self.json_message('devicetype not specified', HTTP_BAD_REQUEST) + if not is_local(request[KEY_REAL_IP]): + return self.json_message('only local IPs allowed', + HTTP_BAD_REQUEST) + return self.json([{'success': {'username': '12345678901234567890'}}]) @@ -63,6 +70,10 @@ class HueGroupView(HomeAssistantView): @core.callback def put(self, request, username): """Process a request to make the Logitech Pop working.""" + if not is_local(request[KEY_REAL_IP]): + return self.json_message('only local IPs allowed', + HTTP_BAD_REQUEST) + return self.json([{ 'error': { 'address': '/groups/0/action/scene', @@ -86,6 +97,10 @@ class HueAllLightsStateView(HomeAssistantView): @core.callback def get(self, request, username): """Process a request to get the list of available lights.""" + if not is_local(request[KEY_REAL_IP]): + return self.json_message('only local IPs allowed', + HTTP_BAD_REQUEST) + hass = request.app['hass'] json_response = {} @@ -114,6 +129,10 @@ class HueOneLightStateView(HomeAssistantView): @core.callback def get(self, request, username, entity_id): """Process a request to get the state of an individual light.""" + if not is_local(request[KEY_REAL_IP]): + return self.json_message('only local IPs allowed', + HTTP_BAD_REQUEST) + hass = request.app['hass'] entity_id = self.config.number_to_entity_id(entity_id) entity = hass.states.get(entity_id) @@ -146,6 +165,10 @@ class HueOneLightChangeView(HomeAssistantView): async def put(self, request, username, entity_number): """Process a request to set the state of an individual light.""" + if not is_local(request[KEY_REAL_IP]): + return self.json_message('only local IPs allowed', + HTTP_BAD_REQUEST) + config = self.config hass = request.app['hass'] entity_id = config.number_to_entity_id(entity_number) diff --git a/tests/components/emulated_hue/test_hue_api.py b/tests/components/emulated_hue/test_hue_api.py index 3920a45ddf6..8582f5b38cf 100644 --- a/tests/components/emulated_hue/test_hue_api.py +++ b/tests/components/emulated_hue/test_hue_api.py @@ -1,6 +1,7 @@ """The tests for the emulated Hue component.""" import asyncio import json +from ipaddress import ip_address from unittest.mock import patch from aiohttp.hdrs import CONTENT_TYPE @@ -484,3 +485,12 @@ def perform_put_light_state(hass_hue, client, entity_id, is_on, yield from hass_hue.async_block_till_done() return result + + +async def test_external_ip_blocked(hue_client): + """Test external IP blocked.""" + with patch('homeassistant.components.http.real_ip.ip_address', + return_value=ip_address('45.45.45.45')): + result = await hue_client.get('/api/username/lights') + + assert result.status == 400 From b59d69f3138747f83946ade64f937865014728f3 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Tue, 9 Oct 2018 10:11:14 +0200 Subject: [PATCH 22/56] Fix ambient light state of the Philips Eyecare Lamp (Closes: #16269) (#17259) --- homeassistant/components/light/xiaomi_miio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/light/xiaomi_miio.py b/homeassistant/components/light/xiaomi_miio.py index 51c36fc2dd0..8bc2497a3e5 100644 --- a/homeassistant/components/light/xiaomi_miio.py +++ b/homeassistant/components/light/xiaomi_miio.py @@ -713,7 +713,7 @@ class XiaomiPhilipsEyecareLampAmbientLight(XiaomiPhilipsAbstractLight): _LOGGER.debug("Got new state: %s", state) self._available = True - self._state = state.eyecare + self._state = state.ambient self._brightness = ceil((255 / 100.0) * state.ambient_brightness) except DeviceException as ex: From 089e15e046df12d5708b5313fe6aca4e6256dbee Mon Sep 17 00:00:00 2001 From: Steven Looman Date: Tue, 9 Oct 2018 10:07:30 +0200 Subject: [PATCH 23/56] Add defaults, fixing #17229 (#17261) --- homeassistant/components/upnp/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/upnp/config_flow.py b/homeassistant/components/upnp/config_flow.py index 885f2f64211..f695e3ada75 100644 --- a/homeassistant/components/upnp/config_flow.py +++ b/homeassistant/components/upnp/config_flow.py @@ -125,8 +125,8 @@ class UpnpFlowHandler(data_entry_flow.FlowHandler): data_schema=vol.Schema( OrderedDict([ (vol.Required('name'), vol.In(names)), - (vol.Optional('enable_sensors'), bool), - (vol.Optional('enable_port_mapping'), bool), + (vol.Optional('enable_sensors', default=False), bool), + (vol.Optional('enable_port_mapping', default=False), bool), ]) )) From 1a76603f531c3cb3f3bf7a140484e4735ebaea58 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Tue, 9 Oct 2018 10:06:42 +0200 Subject: [PATCH 24/56] Remove warning on script delay (#17264) * Remove warning on script delay * Use suppress --- homeassistant/helpers/script.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index ac53a3e32a2..5e660ba7b7f 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -1,6 +1,7 @@ """Helpers to execute scripts.""" import logging +from contextlib import suppress from itertools import islice from typing import Optional, Sequence @@ -95,7 +96,9 @@ class Script(): def async_script_delay(now): """Handle delay.""" # pylint: disable=cell-var-from-loop - self._async_remove_listener() + with suppress(ValueError): + self._async_listener.remove(unsub) + self.hass.async_create_task( self.async_run(variables, context)) @@ -240,7 +243,8 @@ class Script(): @callback def async_script_timeout(now): """Call after timeout is retrieve.""" - self._async_remove_listener() + with suppress(ValueError): + self._async_listener.remove(unsub) # Check if we want to continue to execute # the script after the timeout From a8a21ee28d0e468854b8f1a8a3ec700be481a235 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 9 Oct 2018 16:20:39 +0200 Subject: [PATCH 25/56] Bumped version to 0.80.0b4 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 628d418a735..e00abef3923 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0b3' +PATCH_VERSION = '0b4' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 83dec7173c56ad884f24262491798312c3922bef Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 10 Oct 2018 14:25:21 +0200 Subject: [PATCH 26/56] Update translations --- .../components/auth/.translations/fr.json | 16 ++++++++-- .../cast/.translations/zh-Hant.json | 2 +- .../components/deconz/.translations/ru.json | 2 +- .../homematicip_cloud/.translations/ru.json | 2 +- .../components/ifttt/.translations/fr.json | 18 ++++++++++++ .../components/ifttt/.translations/sl.json | 18 ++++++++++++ .../components/lifx/.translations/ca.json | 15 ++++++++++ .../components/lifx/.translations/fr.json | 15 ++++++++++ .../components/lifx/.translations/ko.json | 15 ++++++++++ .../components/lifx/.translations/lb.json | 15 ++++++++++ .../components/lifx/.translations/nl.json | 15 ++++++++++ .../components/lifx/.translations/pl.json | 15 ++++++++++ .../components/lifx/.translations/ru.json | 15 ++++++++++ .../components/lifx/.translations/sl.json | 15 ++++++++++ .../lifx/.translations/zh-Hant.json | 15 ++++++++++ .../components/mqtt/.translations/fr.json | 9 +++++- .../components/mqtt/.translations/sl.json | 7 +++++ .../components/smhi/.translations/ca.json | 19 ++++++++++++ .../components/smhi/.translations/en.json | 19 ++++++++++++ .../components/smhi/.translations/ko.json | 19 ++++++++++++ .../components/smhi/.translations/lb.json | 19 ++++++++++++ .../components/smhi/.translations/nl.json | 19 ++++++++++++ .../components/smhi/.translations/pl.json | 19 ++++++++++++ .../components/smhi/.translations/ru.json | 19 ++++++++++++ .../components/smhi/.translations/sl.json | 19 ++++++++++++ .../smhi/.translations/zh-Hant.json | 19 ++++++++++++ .../components/sonos/.translations/ko.json | 2 +- .../components/sonos/.translations/pl.json | 2 +- .../sonos/.translations/zh-Hant.json | 2 +- .../components/upnp/.translations/fr.json | 23 +++++++++++++++ .../components/upnp/.translations/nl.json | 6 +++- .../components/upnp/.translations/sl.json | 29 +++++++++++++++++++ .../components/zwave/.translations/ca.json | 17 +++++++++++ .../components/zwave/.translations/ko.json | 22 ++++++++++++++ .../components/zwave/.translations/lb.json | 22 ++++++++++++++ .../components/zwave/.translations/nl.json | 22 ++++++++++++++ .../components/zwave/.translations/ru.json | 22 ++++++++++++++ 37 files changed, 539 insertions(+), 10 deletions(-) create mode 100644 homeassistant/components/ifttt/.translations/fr.json create mode 100644 homeassistant/components/ifttt/.translations/sl.json create mode 100644 homeassistant/components/lifx/.translations/ca.json create mode 100644 homeassistant/components/lifx/.translations/fr.json create mode 100644 homeassistant/components/lifx/.translations/ko.json create mode 100644 homeassistant/components/lifx/.translations/lb.json create mode 100644 homeassistant/components/lifx/.translations/nl.json create mode 100644 homeassistant/components/lifx/.translations/pl.json create mode 100644 homeassistant/components/lifx/.translations/ru.json create mode 100644 homeassistant/components/lifx/.translations/sl.json create mode 100644 homeassistant/components/lifx/.translations/zh-Hant.json create mode 100644 homeassistant/components/smhi/.translations/ca.json create mode 100644 homeassistant/components/smhi/.translations/en.json create mode 100644 homeassistant/components/smhi/.translations/ko.json create mode 100644 homeassistant/components/smhi/.translations/lb.json create mode 100644 homeassistant/components/smhi/.translations/nl.json create mode 100644 homeassistant/components/smhi/.translations/pl.json create mode 100644 homeassistant/components/smhi/.translations/ru.json create mode 100644 homeassistant/components/smhi/.translations/sl.json create mode 100644 homeassistant/components/smhi/.translations/zh-Hant.json create mode 100644 homeassistant/components/upnp/.translations/fr.json create mode 100644 homeassistant/components/upnp/.translations/sl.json create mode 100644 homeassistant/components/zwave/.translations/ca.json create mode 100644 homeassistant/components/zwave/.translations/ko.json create mode 100644 homeassistant/components/zwave/.translations/lb.json create mode 100644 homeassistant/components/zwave/.translations/nl.json create mode 100644 homeassistant/components/zwave/.translations/ru.json diff --git a/homeassistant/components/auth/.translations/fr.json b/homeassistant/components/auth/.translations/fr.json index 85540314af0..cf0a1888495 100644 --- a/homeassistant/components/auth/.translations/fr.json +++ b/homeassistant/components/auth/.translations/fr.json @@ -1,11 +1,23 @@ { "mfa_setup": { "notify": { + "abort": { + "no_available_service": "Aucun service de notification disponible." + }, + "error": { + "invalid_code": "Code invalide. Veuillez essayer \u00e0 nouveau." + }, "step": { + "init": { + "description": "Veuillez s\u00e9lectionner l'un des services de notification:", + "title": "Configurer un mot de passe \u00e0 usage unique d\u00e9livr\u00e9 par le composant notify" + }, "setup": { - "description": "Un mot de passe unique a \u00e9t\u00e9 envoy\u00e9 par **notify.{notify_service}**. Veuillez le saisir ci-dessous :" + "description": "Un mot de passe unique a \u00e9t\u00e9 envoy\u00e9 par **notify.{notify_service}**. Veuillez le saisir ci-dessous :", + "title": "V\u00e9rifier la configuration" } - } + }, + "title": "Notifier un mot de passe unique" }, "totp": { "error": { diff --git a/homeassistant/components/cast/.translations/zh-Hant.json b/homeassistant/components/cast/.translations/zh-Hant.json index 711ac320397..d5383fb1a2b 100644 --- a/homeassistant/components/cast/.translations/zh-Hant.json +++ b/homeassistant/components/cast/.translations/zh-Hant.json @@ -1,7 +1,7 @@ { "config": { "abort": { - "no_devices_found": "\u5728\u7db2\u8def\u4e0a\u627e\u4e0d\u5230 Google Cast \u8a2d\u5099\u3002", + "no_devices_found": "\u5728\u7db2\u8def\u4e0a\u627e\u4e0d\u5230 Google Cast \u88dd\u7f6e\u3002", "single_instance_allowed": "\u50c5\u9700\u8a2d\u5b9a\u4e00\u6b21 Google Cast \u5373\u53ef\u3002" }, "step": { diff --git a/homeassistant/components/deconz/.translations/ru.json b/homeassistant/components/deconz/.translations/ru.json index a9b66314f31..4cbc9594ead 100644 --- a/homeassistant/components/deconz/.translations/ru.json +++ b/homeassistant/components/deconz/.translations/ru.json @@ -28,6 +28,6 @@ "title": "\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f deCONZ" } }, - "title": "deCONZ" + "title": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0448\u043b\u044e\u0437 deCONZ" } } \ No newline at end of file diff --git a/homeassistant/components/homematicip_cloud/.translations/ru.json b/homeassistant/components/homematicip_cloud/.translations/ru.json index 6a0ea612fe8..ae67c616f3f 100644 --- a/homeassistant/components/homematicip_cloud/.translations/ru.json +++ b/homeassistant/components/homematicip_cloud/.translations/ru.json @@ -18,7 +18,7 @@ "name": "\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0434\u043b\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432)", "pin": "PIN-\u043a\u043e\u0434 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)" }, - "title": "\u0412\u044b\u0431\u0438\u0440\u0438\u0442\u0435 \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 HomematicIP" + "title": "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 HomematicIP" }, "link": { "description": "\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441\u0438\u043d\u044e\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u0442\u043e\u0447\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c HomematicIP \u0432 Home Assistant. \n\n ![\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438](/static/images/config_flows/config_homematicip_cloud.png)", diff --git a/homeassistant/components/ifttt/.translations/fr.json b/homeassistant/components/ifttt/.translations/fr.json new file mode 100644 index 00000000000..d083a624d70 --- /dev/null +++ b/homeassistant/components/ifttt/.translations/fr.json @@ -0,0 +1,18 @@ +{ + "config": { + "abort": { + "not_internet_accessible": "Votre instance Home Assistant doit \u00eatre accessible \u00e0 partir d'Internet pour recevoir les messages IFTTT.", + "one_instance_allowed": "Une seule instance est n\u00e9cessaire." + }, + "create_entry": { + "default": "Pour envoyer des \u00e9v\u00e9nements \u00e0 Home Assistant, vous devez utiliser l'action \"Effectuer une demande Web\" \u00e0 partir de [l'applet IFTTT Webhook] ( {applet_url} ). \n\n Remplissez les informations suivantes: \n\n - URL: ` {webhook_url} ` \n - M\u00e9thode: POST \n - Type de contenu: application / json \n\n Voir [la documentation] ( {docs_url} ) pour savoir comment configurer les automatisations pour g\u00e9rer les donn\u00e9es entrantes." + }, + "step": { + "user": { + "description": "\u00cates-vous s\u00fbr de vouloir configurer IFTTT?", + "title": "Configurer l'applet IFTTT Webhook" + } + }, + "title": "IFTTT" + } +} \ No newline at end of file diff --git a/homeassistant/components/ifttt/.translations/sl.json b/homeassistant/components/ifttt/.translations/sl.json new file mode 100644 index 00000000000..f5cc1dc572e --- /dev/null +++ b/homeassistant/components/ifttt/.translations/sl.json @@ -0,0 +1,18 @@ +{ + "config": { + "abort": { + "not_internet_accessible": "Va\u0161 Home Assistent mora biti dostopek prek interneta, da boste lahko prejemali IFTTT sporo\u010dila.", + "one_instance_allowed": "Potrebna je samo ena instanca." + }, + "create_entry": { + "default": "\u010ce \u017eelite poslati dogodke Home Assistent-u, boste morali uporabiti akcijo \u00bbNaredi spletno zahtevo\u00ab iz orodja [IFTTT Webhook applet] ( {applet_url} ). \n\n Izpolnite naslednje podatke: \n\n - URL: ` {webhook_url} ` \n - Metoda: POST \n - Vrsta vsebine: application/json \n\n Poglejte si [dokumentacijo] ( {docs_url} ) o tem, kako konfigurirati avtomatizacijo za obdelavo dohodnih podatkov." + }, + "step": { + "user": { + "description": "Ali ste prepri\u010dani, da \u017eelite nastaviti IFTTT?", + "title": "Nastavite IFTTT Webhook Applet" + } + }, + "title": "IFTTT" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/ca.json b/homeassistant/components/lifx/.translations/ca.json new file mode 100644 index 00000000000..b3896d49e1d --- /dev/null +++ b/homeassistant/components/lifx/.translations/ca.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "No s'han trobat dispositius LIFX a la xarxa.", + "single_instance_allowed": "Nom\u00e9s \u00e9s possible una \u00fanica configuraci\u00f3 de LIFX." + }, + "step": { + "confirm": { + "description": "Voleu configurar LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/fr.json b/homeassistant/components/lifx/.translations/fr.json new file mode 100644 index 00000000000..96a264fa6b2 --- /dev/null +++ b/homeassistant/components/lifx/.translations/fr.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Aucun p\u00e9riph\u00e9rique LIFX trouv\u00e9 sur le r\u00e9seau.", + "single_instance_allowed": "Une seule configuration de LIFX est possible." + }, + "step": { + "confirm": { + "description": "Voulez-vous configurer LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/ko.json b/homeassistant/components/lifx/.translations/ko.json new file mode 100644 index 00000000000..c795c54badb --- /dev/null +++ b/homeassistant/components/lifx/.translations/ko.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "LIFX \uc7a5\uce58\uac00 \ub124\ud2b8\uc6cc\ud06c\uc5d0\uc11c \ubc1c\uacac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.", + "single_instance_allowed": "\ud558\ub098\uc758 LIFX \ub9cc \uad6c\uc131 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4." + }, + "step": { + "confirm": { + "description": "LIFX \ub97c \uc124\uc815\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/lb.json b/homeassistant/components/lifx/.translations/lb.json new file mode 100644 index 00000000000..2e033280e46 --- /dev/null +++ b/homeassistant/components/lifx/.translations/lb.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Keng LIFX Apparater am Netzwierk fonnt.", + "single_instance_allowed": "N\u00ebmmen eng eenzeg Konfiguratioun vun LIFX ass erlaabt." + }, + "step": { + "confirm": { + "description": "Soll LIFX konfigur\u00e9iert ginn?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/nl.json b/homeassistant/components/lifx/.translations/nl.json new file mode 100644 index 00000000000..a23502729d6 --- /dev/null +++ b/homeassistant/components/lifx/.translations/nl.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Geen LIFX-apparaten gevonden op het netwerk.", + "single_instance_allowed": "Slechts een enkele configuratie van LIFX is mogelijk." + }, + "step": { + "confirm": { + "description": "Wilt u LIFX instellen?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/pl.json b/homeassistant/components/lifx/.translations/pl.json new file mode 100644 index 00000000000..f13c0b54bbd --- /dev/null +++ b/homeassistant/components/lifx/.translations/pl.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Nie znaleziono w sieci urz\u0105dze\u0144 LIFX.", + "single_instance_allowed": "Wymagana jest tylko jedna konfiguracja LIFX." + }, + "step": { + "confirm": { + "description": "Czy chcesz skonfigurowa\u0107 LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/ru.json b/homeassistant/components/lifx/.translations/ru.json new file mode 100644 index 00000000000..5ad351b7a90 --- /dev/null +++ b/homeassistant/components/lifx/.translations/ru.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 LIFX \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0432 \u0441\u0435\u0442\u0438.", + "single_instance_allowed": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430" + }, + "step": { + "confirm": { + "description": "\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/sl.json b/homeassistant/components/lifx/.translations/sl.json new file mode 100644 index 00000000000..492bf9010dd --- /dev/null +++ b/homeassistant/components/lifx/.translations/sl.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "V omre\u017eju ni najdenih naprav LIFX.", + "single_instance_allowed": "Mo\u017ena je samo ena konfiguracija LIFX-a." + }, + "step": { + "confirm": { + "description": "Ali \u017eelite nastaviti LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/zh-Hant.json b/homeassistant/components/lifx/.translations/zh-Hant.json new file mode 100644 index 00000000000..4c66f0d0133 --- /dev/null +++ b/homeassistant/components/lifx/.translations/zh-Hant.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "\u5728\u7db2\u8def\u4e0a\u627e\u4e0d\u5230 LIFX \u88dd\u7f6e\u3002", + "single_instance_allowed": "\u50c5\u80fd\u8a2d\u5b9a\u4e00\u7d44 LIFX\u3002" + }, + "step": { + "confirm": { + "description": "\u662f\u5426\u8981\u8a2d\u5b9a LIFX\uff1f", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/mqtt/.translations/fr.json b/homeassistant/components/mqtt/.translations/fr.json index 916b4fdaf39..648c2f972d7 100644 --- a/homeassistant/components/mqtt/.translations/fr.json +++ b/homeassistant/components/mqtt/.translations/fr.json @@ -10,13 +10,20 @@ "broker": { "data": { "broker": "Broker", - "discovery": "Activer la d\u00e9couverte automatique", + "discovery": "Activer la d\u00e9couverte", "password": "Mot de passe", "port": "Port", "username": "Nom d'utilisateur" }, "description": "Veuillez entrer les informations de connexion de votre broker MQTT.", "title": "MQTT" + }, + "hassio_confirm": { + "data": { + "discovery": "Activer la d\u00e9couverte" + }, + "description": "Vous voulez configurer Home Assistant pour vous connecter au broker MQTT fourni par l\u2019Add-on hass.io {addon} ?", + "title": "MQTT Broker via le module compl\u00e9mentaire Hass.io" } }, "title": "MQTT" diff --git a/homeassistant/components/mqtt/.translations/sl.json b/homeassistant/components/mqtt/.translations/sl.json index a12498ac4c2..d8d331449a2 100644 --- a/homeassistant/components/mqtt/.translations/sl.json +++ b/homeassistant/components/mqtt/.translations/sl.json @@ -17,6 +17,13 @@ }, "description": "Prosimo vnesite informacije o povezavi va\u0161ega MQTT posrednika.", "title": "MQTT" + }, + "hassio_confirm": { + "data": { + "discovery": "Omogo\u010di odkrivanje" + }, + "description": "\u017delite konfigurirati Home Assistent-a za povezavo s posrednikom MQTT, ki ga ponuja hass.io add-on {addon} ?", + "title": "MQTT Broker prek dodatka Hass.io" } }, "title": "MQTT" diff --git a/homeassistant/components/smhi/.translations/ca.json b/homeassistant/components/smhi/.translations/ca.json new file mode 100644 index 00000000000..23b6a2934f0 --- /dev/null +++ b/homeassistant/components/smhi/.translations/ca.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "El nom ja existeix", + "wrong_location": "Ubicaci\u00f3 nom\u00e9s a Su\u00e8cia" + }, + "step": { + "user": { + "data": { + "latitude": "Latitud", + "longitude": "Longitud", + "name": "Nom" + }, + "title": "Ubicaci\u00f3 a Su\u00e8cia" + } + }, + "title": "Servei meteorol\u00f2gic suec (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/en.json b/homeassistant/components/smhi/.translations/en.json new file mode 100644 index 00000000000..6aa256d87d4 --- /dev/null +++ b/homeassistant/components/smhi/.translations/en.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Name already exists", + "wrong_location": "Location Sweden only" + }, + "step": { + "user": { + "data": { + "latitude": "Latitude", + "longitude": "Longitude", + "name": "Name" + }, + "title": "Location in Sweden" + } + }, + "title": "Swedish weather service (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/ko.json b/homeassistant/components/smhi/.translations/ko.json new file mode 100644 index 00000000000..f307fa1ad23 --- /dev/null +++ b/homeassistant/components/smhi/.translations/ko.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "\uc774\ub984\uc774 \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c8\ub2e4", + "wrong_location": "\uc2a4\uc6e8\ub374 \uc9c0\uc5ed \uc804\uc6a9\uc785\ub2c8\ub2e4" + }, + "step": { + "user": { + "data": { + "latitude": "\uc704\ub3c4", + "longitude": "\uacbd\ub3c4", + "name": "\uc774\ub984" + }, + "title": "\uc2a4\uc6e8\ub374 \uc9c0\uc5ed \uc704\uce58" + } + }, + "title": "\uc2a4\uc6e8\ub374 \uae30\uc0c1 \uc11c\ube44\uc2a4 (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/lb.json b/homeassistant/components/smhi/.translations/lb.json new file mode 100644 index 00000000000..46abfd2677f --- /dev/null +++ b/homeassistant/components/smhi/.translations/lb.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Numm g\u00ebtt et schonn", + "wrong_location": "N\u00ebmmen Uertschaften an Schweden" + }, + "step": { + "user": { + "data": { + "latitude": "Breedegrad", + "longitude": "L\u00e4ngegrad", + "name": "Numm" + }, + "title": "Uertschaft an Schweden" + } + }, + "title": "Schwedeschen Wieder D\u00e9ngscht (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/nl.json b/homeassistant/components/smhi/.translations/nl.json new file mode 100644 index 00000000000..88edc116e74 --- /dev/null +++ b/homeassistant/components/smhi/.translations/nl.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Naam bestaat al", + "wrong_location": "Locatie alleen Zweden" + }, + "step": { + "user": { + "data": { + "latitude": "Breedtegraad", + "longitude": "Lengtegraad", + "name": "Naam" + }, + "title": "Locatie in Zweden" + } + }, + "title": "Zweedse weerdienst (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/pl.json b/homeassistant/components/smhi/.translations/pl.json new file mode 100644 index 00000000000..21973cd54b6 --- /dev/null +++ b/homeassistant/components/smhi/.translations/pl.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Nazwa ju\u017c istnieje", + "wrong_location": "Lokalizacja w Szwecji" + }, + "step": { + "user": { + "data": { + "latitude": "Szeroko\u015b\u0107 geograficzna", + "longitude": "D\u0142ugo\u015b\u0107 geograficzna", + "name": "Nazwa" + }, + "title": "Lokalizacja w Szwecji" + } + }, + "title": "Szwedzka us\u0142uga pogodowa (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/ru.json b/homeassistant/components/smhi/.translations/ru.json new file mode 100644 index 00000000000..012bb74c568 --- /dev/null +++ b/homeassistant/components/smhi/.translations/ru.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "\u0418\u043c\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442", + "wrong_location": "\u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0428\u0432\u0435\u0446\u0438\u0438" + }, + "step": { + "user": { + "data": { + "latitude": "\u0428\u0438\u0440\u043e\u0442\u0430", + "longitude": "\u0414\u043e\u043b\u0433\u043e\u0442\u0430", + "name": "\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435" + }, + "title": "\u041c\u0435\u0441\u0442\u043e\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0432 \u0428\u0432\u0435\u0446\u0438\u0438" + } + }, + "title": "\u0428\u0432\u0435\u0434\u0441\u043a\u0430\u044f \u043c\u0435\u0442\u0435\u043e\u0440\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/sl.json b/homeassistant/components/smhi/.translations/sl.json new file mode 100644 index 00000000000..94c3750f06f --- /dev/null +++ b/homeassistant/components/smhi/.translations/sl.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Ime \u017ee obstaja", + "wrong_location": "Lokacija le na \u0160vedskem" + }, + "step": { + "user": { + "data": { + "latitude": "Zemljepisna \u0161irina", + "longitude": "Zemljepisna dol\u017eina", + "name": "Ime" + }, + "title": "Lokacija na \u0160vedskem" + } + }, + "title": "\u0160vedska vremenska slu\u017eba (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/zh-Hant.json b/homeassistant/components/smhi/.translations/zh-Hant.json new file mode 100644 index 00000000000..b982baac2f8 --- /dev/null +++ b/homeassistant/components/smhi/.translations/zh-Hant.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "\u8a72\u540d\u7a31\u5df2\u5b58\u5728", + "wrong_location": "\u50c5\u9650\u745e\u5178\u5ea7\u6a19" + }, + "step": { + "user": { + "data": { + "latitude": "\u7def\u5ea6", + "longitude": "\u7d93\u5ea6", + "name": "\u540d\u7a31" + }, + "title": "\u745e\u5178\u5ea7\u6a19" + } + }, + "title": "\u745e\u5178\u6c23\u8c61\u670d\u52d9\uff08SMHI\uff09" + } +} \ No newline at end of file diff --git a/homeassistant/components/sonos/.translations/ko.json b/homeassistant/components/sonos/.translations/ko.json index 89933f57425..0b2e2a1875c 100644 --- a/homeassistant/components/sonos/.translations/ko.json +++ b/homeassistant/components/sonos/.translations/ko.json @@ -6,7 +6,7 @@ }, "step": { "confirm": { - "description": "Sonos\ub97c \uc124\uc815 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?", + "description": "Sonos \ub97c \uc124\uc815 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?", "title": "Sonos" } }, diff --git a/homeassistant/components/sonos/.translations/pl.json b/homeassistant/components/sonos/.translations/pl.json index 2a0c526b9a6..a45cb4e9824 100644 --- a/homeassistant/components/sonos/.translations/pl.json +++ b/homeassistant/components/sonos/.translations/pl.json @@ -6,7 +6,7 @@ }, "step": { "confirm": { - "description": "Chcesz skonfigurowa\u0107 Sonos?", + "description": "Czy chcesz skonfigurowa\u0107 Sonos?", "title": "Sonos" } }, diff --git a/homeassistant/components/sonos/.translations/zh-Hant.json b/homeassistant/components/sonos/.translations/zh-Hant.json index c6fb13c3605..520a29b7602 100644 --- a/homeassistant/components/sonos/.translations/zh-Hant.json +++ b/homeassistant/components/sonos/.translations/zh-Hant.json @@ -1,7 +1,7 @@ { "config": { "abort": { - "no_devices_found": "\u5728\u7db2\u8def\u4e0a\u627e\u4e0d\u5230 Sonos \u8a2d\u5099\u3002", + "no_devices_found": "\u5728\u7db2\u8def\u4e0a\u627e\u4e0d\u5230 Sonos \u88dd\u7f6e\u3002", "single_instance_allowed": "\u50c5\u9700\u8a2d\u5b9a\u4e00\u6b21 Sonos \u5373\u53ef\u3002" }, "step": { diff --git a/homeassistant/components/upnp/.translations/fr.json b/homeassistant/components/upnp/.translations/fr.json new file mode 100644 index 00000000000..3eac9577890 --- /dev/null +++ b/homeassistant/components/upnp/.translations/fr.json @@ -0,0 +1,23 @@ +{ + "config": { + "abort": { + "already_configured": "UPnP / IGD est d\u00e9j\u00e0 configur\u00e9", + "no_devices_discovered": "Aucun UPnP / IGD d\u00e9couvert", + "no_sensors_or_port_mapping": "Activer au moins les capteurs ou la cartographie des ports" + }, + "step": { + "init": { + "title": "UPnP / IGD" + }, + "user": { + "data": { + "enable_port_mapping": "Activer le mappage de port pour Home Assistant", + "enable_sensors": "Ajouter des capteurs de trafic", + "igd": "UPnP / IGD" + }, + "title": "Options de configuration pour UPnP / IGD" + } + }, + "title": "UPnP / IGD" + } +} \ No newline at end of file diff --git a/homeassistant/components/upnp/.translations/nl.json b/homeassistant/components/upnp/.translations/nl.json index c6356709170..647eb647f24 100644 --- a/homeassistant/components/upnp/.translations/nl.json +++ b/homeassistant/components/upnp/.translations/nl.json @@ -6,10 +6,14 @@ "no_sensors_or_port_mapping": "Schakel ten minste sensoren of poorttoewijzing in" }, "step": { + "init": { + "title": "UPnP/IGD" + }, "user": { "data": { "enable_port_mapping": "Poorttoewijzing voor Home Assistant inschakelen", - "enable_sensors": "Voeg verkeerssensoren toe" + "enable_sensors": "Voeg verkeerssensoren toe", + "igd": "UPnP/IGD" }, "title": "Configuratiemogelijkheden voor de UPnP/IGD" } diff --git a/homeassistant/components/upnp/.translations/sl.json b/homeassistant/components/upnp/.translations/sl.json new file mode 100644 index 00000000000..20debe7f09a --- /dev/null +++ b/homeassistant/components/upnp/.translations/sl.json @@ -0,0 +1,29 @@ +{ + "config": { + "abort": { + "already_configured": "UPnP/IGD je \u017ee konfiguriran", + "no_devices_discovered": "Ni odkritih UPnP/IGD naprav", + "no_sensors_or_port_mapping": "Omogo\u010dite vsaj senzorje ali preslikavo vrat (port mapping)" + }, + "error": { + "few": "nekaj", + "one": "ena", + "other": "ve\u010d", + "two": "dve" + }, + "step": { + "init": { + "title": "UPnP/IGD" + }, + "user": { + "data": { + "enable_port_mapping": "Omogo\u010dajo preslikavo vrat (port mapping) za Home Assistent-a", + "enable_sensors": "Dodaj prometne senzorje", + "igd": "UPnP/IGD" + }, + "title": "Mo\u017enosti konfiguracije za UPnP/IGD" + } + }, + "title": "UPnP/IGD" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/ca.json b/homeassistant/components/zwave/.translations/ca.json new file mode 100644 index 00000000000..8c39ca58201 --- /dev/null +++ b/homeassistant/components/zwave/.translations/ca.json @@ -0,0 +1,17 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave ja est\u00e0 configurat", + "one_instance_only": "El component nom\u00e9s admet una inst\u00e0ncia de Z-Wave" + }, + "step": { + "user": { + "data": { + "network_key": "Clau de xarxa (deixeu-ho en blanc per generar-la autom\u00e0ticament)" + }, + "title": "Configureu Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/ko.json b/homeassistant/components/zwave/.translations/ko.json new file mode 100644 index 00000000000..43103de3d51 --- /dev/null +++ b/homeassistant/components/zwave/.translations/ko.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave \uac00 \uc774\ubbf8 \uad6c\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4", + "one_instance_only": "\uad6c\uc131\uc694\uc18c\ub294 \ud558\ub098\uc758 Z-Wave \uc778\uc2a4\ud134\uc2a4\ub9cc \uc9c0\uc6d0\ud569\ub2c8\ub2e4" + }, + "error": { + "option_error": "Z-Wave \uc720\ud6a8\uc131 \uac80\uc0ac\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. USB \uc2a4\ud2f1\uc758 \uacbd\ub85c\uac00 \uc815\ud655\ud569\ub2c8\uae4c?" + }, + "step": { + "user": { + "data": { + "network_key": "\ub124\ud2b8\uc6cc\ud06c \ud0a4 (\uacf5\ub780\uc73c\ub85c \ube44\uc6cc\ub450\uba74 \uc790\ub3d9 \uc0dd\uc131\ud569\ub2c8\ub2e4)", + "usb_path": "USB \uacbd\ub85c" + }, + "description": "\uad6c\uc131 \ubcc0\uc218\uc5d0 \ub300\ud55c \uc815\ubcf4\ub294 https://www.home-assistant.io/docs/z-wave/installation/ \uc744 \ucc38\uc870\ud574\uc8fc\uc138\uc694", + "title": "Z-Wave \uc124\uc815" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/lb.json b/homeassistant/components/zwave/.translations/lb.json new file mode 100644 index 00000000000..84b6d8aa67d --- /dev/null +++ b/homeassistant/components/zwave/.translations/lb.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave ass scho konfigur\u00e9iert", + "one_instance_only": "Komponent \u00ebnnerst\u00ebtzt n\u00ebmmen eng Z-Wave Instanz" + }, + "error": { + "option_error": "Z-Wave Validatioun net g\u00eblteg. Ass de Pad zum USB Stick richteg?" + }, + "step": { + "user": { + "data": { + "network_key": "Netzwierk Schl\u00ebssel (eidel loossen fir een automatesch z'erstellen)", + "usb_path": "USB Pad" + }, + "description": "Lies op https://www.home-assistant.io/docs/z-wave/installation/ fir weider Informatiounen iwwert d'Konfiguratioun vun den Variabelen", + "title": "Z-Wave konfigur\u00e9ieren" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/nl.json b/homeassistant/components/zwave/.translations/nl.json new file mode 100644 index 00000000000..0b700b895fd --- /dev/null +++ b/homeassistant/components/zwave/.translations/nl.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave is al geconfigureerd", + "one_instance_only": "Component ondersteunt slechts \u00e9\u00e9n Z-Wave-instantie" + }, + "error": { + "option_error": "Z-Wave-validatie mislukt. Is het pad naar de USB-stick correct?" + }, + "step": { + "user": { + "data": { + "network_key": "Netwerksleutel (laat leeg om automatisch te genereren)", + "usb_path": "USB-pad" + }, + "description": "Zie https://www.home-assistant.io/docs/z-wave/installation/ voor informatie over de configuratievariabelen", + "title": "Stel Z-Wave in" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/ru.json b/homeassistant/components/zwave/.translations/ru.json new file mode 100644 index 00000000000..457bfd3baa8 --- /dev/null +++ b/homeassistant/components/zwave/.translations/ru.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.", + "one_instance_only": "\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 Z-Wave" + }, + "error": { + "option_error": "\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 Z-Wave. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0443\u0442\u044c \u043a USB-\u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044e." + }, + "step": { + "user": { + "data": { + "network_key": "\u041a\u043b\u044e\u0447 \u0441\u0435\u0442\u0438 (\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u043b\u0435 \u043f\u0443\u0441\u0442\u044b\u043c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438)", + "usb_path": "\u041f\u0443\u0442\u044c \u043a USB" + }, + "description": "\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 [\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439](https://www.home-assistant.io/docs/z-wave/installation/) \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438", + "title": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file From 3f28b30860a8b9bd24d8ad54396afca0e83cf473 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 10 Oct 2018 14:07:51 +0200 Subject: [PATCH 27/56] Hassio auth (#17274) * Create auth.py * Update auth.py * Update auth.py * Update __init__.py * Update auth.py * Update auth.py * Update auth.py * Update auth.py * Update auth.py * Update auth.py * Update auth.py * Update auth.py * Update auth.py * Add tests * Update test_auth.py * Update auth.py * Update test_auth.py * Update auth.py --- homeassistant/components/hassio/__init__.py | 4 + homeassistant/components/hassio/auth.py | 75 ++++++++++++++++ tests/components/hassio/test_auth.py | 95 +++++++++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 homeassistant/components/hassio/auth.py create mode 100644 tests/components/hassio/test_auth.py diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index b97d748d864..9516675480a 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -19,6 +19,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.loader import bind_hass from homeassistant.util.dt import utcnow +from .auth import async_setup_auth from .handler import HassIO, HassioAPIError from .discovery import async_setup_discovery from .http import HassIOView @@ -280,4 +281,7 @@ async def async_setup(hass, config): # Init discovery Hass.io feature async_setup_discovery(hass, hassio, config) + # Init auth Hass.io feature + async_setup_auth(hass) + return True diff --git a/homeassistant/components/hassio/auth.py b/homeassistant/components/hassio/auth.py new file mode 100644 index 00000000000..73ef5aa29cc --- /dev/null +++ b/homeassistant/components/hassio/auth.py @@ -0,0 +1,75 @@ +"""Implement the auth feature from Hass.io for Add-ons.""" +import logging +from ipaddress import ip_address +import os + +from aiohttp import web +from aiohttp.web_exceptions import ( + HTTPForbidden, HTTPNotFound, HTTPUnauthorized) +import voluptuous as vol + +from homeassistant.core import callback +import homeassistant.helpers.config_validation as cv +from homeassistant.exceptions import HomeAssistantError +from homeassistant.components.http import HomeAssistantView +from homeassistant.components.http.const import KEY_REAL_IP +from homeassistant.components.http.data_validator import RequestDataValidator + +_LOGGER = logging.getLogger(__name__) + +ATTR_USERNAME = 'username' +ATTR_PASSWORD = 'password' + + +SCHEMA_API_AUTH = vol.Schema({ + vol.Required(ATTR_USERNAME): cv.string, + vol.Required(ATTR_PASSWORD): cv.string, +}) + + +@callback +def async_setup_auth(hass): + """Auth setup.""" + hassio_auth = HassIOAuth(hass) + hass.http.register_view(hassio_auth) + + +class HassIOAuth(HomeAssistantView): + """Hass.io view to handle base part.""" + + name = "api:hassio_auth" + url = "/api/hassio_auth" + + def __init__(self, hass): + """Initialize WebView.""" + self.hass = hass + + @RequestDataValidator(SCHEMA_API_AUTH) + async def post(self, request, data): + """Handle new discovery requests.""" + hassio_ip = os.environ['HASSIO'].split(':')[0] + if request[KEY_REAL_IP] != ip_address(hassio_ip): + _LOGGER.error( + "Invalid auth request from %s", request[KEY_REAL_IP]) + raise HTTPForbidden() + + await self._check_login(data[ATTR_USERNAME], data[ATTR_PASSWORD]) + return web.Response(status=200) + + def _get_provider(self): + """Return Homeassistant auth provider.""" + for prv in self.hass.auth.auth_providers: + if prv.type == 'homeassistant': + return prv + + _LOGGER.error("Can't find Home Assistant auth.") + raise HTTPNotFound() + + async def _check_login(self, username, password): + """Check User credentials.""" + provider = self._get_provider() + + try: + await provider.async_validate_login(username, password) + except HomeAssistantError: + raise HTTPUnauthorized() from None diff --git a/tests/components/hassio/test_auth.py b/tests/components/hassio/test_auth.py new file mode 100644 index 00000000000..50d9488a19c --- /dev/null +++ b/tests/components/hassio/test_auth.py @@ -0,0 +1,95 @@ +"""The tests for the hassio component.""" +from unittest.mock import patch, Mock + +from homeassistant.const import HTTP_HEADER_HA_AUTH +from homeassistant.exceptions import HomeAssistantError + +from tests.common import mock_coro, register_auth_provider +from . import API_PASSWORD + + +async def test_login_success(hass, hassio_client): + """Test no auth needed for .""" + await register_auth_provider(hass, {'type': 'homeassistant'}) + + with patch('homeassistant.auth.providers.homeassistant.' + 'HassAuthProvider.async_validate_login', + Mock(return_value=mock_coro())) as mock_login: + resp = await hassio_client.post( + '/api/hassio_auth', + json={ + "username": "test", + "password": "123456" + }, + headers={ + HTTP_HEADER_HA_AUTH: API_PASSWORD + } + ) + + # Check we got right response + assert resp.status == 200 + mock_login.assert_called_with("test", "123456") + + +async def test_login_error(hass, hassio_client): + """Test no auth needed for error.""" + await register_auth_provider(hass, {'type': 'homeassistant'}) + + with patch('homeassistant.auth.providers.homeassistant.' + 'HassAuthProvider.async_validate_login', + Mock(side_effect=HomeAssistantError())) as mock_login: + resp = await hassio_client.post( + '/api/hassio_auth', + json={ + "username": "test", + "password": "123456" + }, + headers={ + HTTP_HEADER_HA_AUTH: API_PASSWORD + } + ) + + # Check we got right response + assert resp.status == 401 + mock_login.assert_called_with("test", "123456") + + +async def test_login_no_data(hass, hassio_client): + """Test auth with no data -> error.""" + await register_auth_provider(hass, {'type': 'homeassistant'}) + + with patch('homeassistant.auth.providers.homeassistant.' + 'HassAuthProvider.async_validate_login', + Mock(side_effect=HomeAssistantError())) as mock_login: + resp = await hassio_client.post( + '/api/hassio_auth', + headers={ + HTTP_HEADER_HA_AUTH: API_PASSWORD + } + ) + + # Check we got right response + assert resp.status == 400 + assert not mock_login.called + + +async def test_login_no_username(hass, hassio_client): + """Test auth with no username in data -> error.""" + await register_auth_provider(hass, {'type': 'homeassistant'}) + + with patch('homeassistant.auth.providers.homeassistant.' + 'HassAuthProvider.async_validate_login', + Mock(side_effect=HomeAssistantError())) as mock_login: + resp = await hassio_client.post( + '/api/hassio_auth', + json={ + "password": "123456" + }, + headers={ + HTTP_HEADER_HA_AUTH: API_PASSWORD + } + ) + + # Check we got right response + assert resp.status == 400 + assert not mock_login.called From 951d7154b8fa1c532aafc318eff19a07d4cf6a08 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 10 Oct 2018 13:50:11 +0200 Subject: [PATCH 28/56] Fix hassio discovery (#17275) * Update discovery.py * Update test_discovery.py * Update test_discovery.py * Update test_discovery.py * Update test_discovery.py * Update test_discovery.py * Update test_discovery.py * Fix tests * fix lint --- homeassistant/components/hassio/discovery.py | 9 ++-- tests/components/hassio/conftest.py | 2 + tests/components/hassio/test_discovery.py | 53 ++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/hassio/discovery.py b/homeassistant/components/hassio/discovery.py index ba5c8c3f789..3c5242607c1 100644 --- a/homeassistant/components/hassio/discovery.py +++ b/homeassistant/components/hassio/discovery.py @@ -5,7 +5,7 @@ import logging from aiohttp import web from aiohttp.web_exceptions import HTTPServiceUnavailable -from homeassistant.core import callback +from homeassistant.core import callback, CoreState from homeassistant.const import EVENT_HOMEASSISTANT_START from homeassistant.components.http import HomeAssistantView @@ -40,8 +40,11 @@ def async_setup_discovery(hass, hassio, config): if jobs: await asyncio.wait(jobs) - hass.bus.async_listen_once( - EVENT_HOMEASSISTANT_START, async_discovery_start_handler) + if hass.state == CoreState.running: + hass.async_create_task(async_discovery_start_handler(None)) + else: + hass.bus.async_listen_once( + EVENT_HOMEASSISTANT_START, async_discovery_start_handler) hass.http.register_view(hassio_discovery) diff --git a/tests/components/hassio/conftest.py b/tests/components/hassio/conftest.py index fb3a172a45c..f9ad1c578de 100644 --- a/tests/components/hassio/conftest.py +++ b/tests/components/hassio/conftest.py @@ -4,6 +4,7 @@ from unittest.mock import patch, Mock import pytest +from homeassistant.core import CoreState from homeassistant.setup import async_setup_component from homeassistant.components.hassio.handler import HassIO, HassioAPIError @@ -33,6 +34,7 @@ def hassio_client(hassio_env, hass, aiohttp_client): patch('homeassistant.components.hassio.HassIO.' 'get_homeassistant_info', Mock(side_effect=HassioAPIError())): + hass.state = CoreState.starting hass.loop.run_until_complete(async_setup_component(hass, 'hassio', { 'http': { 'api_password': API_PASSWORD diff --git a/tests/components/hassio/test_discovery.py b/tests/components/hassio/test_discovery.py index 98d0835c102..c8926a1cd18 100644 --- a/tests/components/hassio/test_discovery.py +++ b/tests/components/hassio/test_discovery.py @@ -1,6 +1,8 @@ """Test config flow.""" from unittest.mock import patch, Mock +from homeassistant.setup import async_setup_component +from homeassistant.components.hassio.handler import HassioAPIError from homeassistant.const import EVENT_HOMEASSISTANT_START, HTTP_HEADER_HA_AUTH from tests.common import mock_coro @@ -29,6 +31,8 @@ async def test_hassio_discovery_startup(hass, aioclient_mock, hassio_client): 'result': 'ok', 'data': {'name': "Mosquitto Test"} }) + assert aioclient_mock.call_count == 0 + with patch('homeassistant.components.mqtt.' 'config_flow.FlowHandler.async_step_hassio', Mock(return_value=mock_coro({"type": "abort"}))) as mock_mqtt: @@ -44,6 +48,55 @@ async def test_hassio_discovery_startup(hass, aioclient_mock, hassio_client): }) +async def test_hassio_discovery_startup_done(hass, aioclient_mock, + hassio_client): + """Test startup and discovery with hass discovery.""" + aioclient_mock.get( + "http://127.0.0.1/discovery", json={ + 'result': 'ok', 'data': {'discovery': [ + { + "service": "mqtt", "uuid": "test", + "addon": "mosquitto", "config": + { + 'broker': 'mock-broker', + 'port': 1883, + 'username': 'mock-user', + 'password': 'mock-pass', + 'protocol': '3.1.1' + } + } + ]}}) + aioclient_mock.get( + "http://127.0.0.1/addons/mosquitto/info", json={ + 'result': 'ok', 'data': {'name': "Mosquitto Test"} + }) + + with patch('homeassistant.components.hassio.HassIO.update_hass_api', + Mock(return_value=mock_coro({"result": "ok"}))), \ + patch('homeassistant.components.hassio.HassIO.' + 'get_homeassistant_info', + Mock(side_effect=HassioAPIError())), \ + patch('homeassistant.components.mqtt.' + 'config_flow.FlowHandler.async_step_hassio', + Mock(return_value=mock_coro({"type": "abort"})) + ) as mock_mqtt: + await hass.async_start() + await async_setup_component(hass, 'hassio', { + 'http': { + 'api_password': API_PASSWORD + } + }) + await hass.async_block_till_done() + + assert aioclient_mock.call_count == 2 + assert mock_mqtt.called + mock_mqtt.assert_called_with({ + 'broker': 'mock-broker', 'port': 1883, 'username': 'mock-user', + 'password': 'mock-pass', 'protocol': '3.1.1', + 'addon': 'Mosquitto Test', + }) + + async def test_hassio_discovery_webhook(hass, aioclient_mock, hassio_client): """Test discovery webhook.""" aioclient_mock.get( From 1d78393680187e336dea5e64bc1fcd22dc030ef6 Mon Sep 17 00:00:00 2001 From: Paul Annekov Date: Wed, 10 Oct 2018 15:24:30 +0300 Subject: [PATCH 29/56] fixed 'on_startup() takes 0 positional arguments but 1 was given' (#17295) --- homeassistant/components/sensor/miflora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/miflora.py b/homeassistant/components/sensor/miflora.py index a097974fbfd..74bb8261609 100644 --- a/homeassistant/components/sensor/miflora.py +++ b/homeassistant/components/sensor/miflora.py @@ -106,7 +106,7 @@ class MiFloraSensor(Entity): async def async_added_to_hass(self): """Set initial state.""" @callback - def on_startup(): + def on_startup(_): self.async_schedule_update_ha_state(True) self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, on_startup) From fa3f6ca2c749c0440e533774656fe51652658bce Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 10 Oct 2018 14:29:04 +0200 Subject: [PATCH 30/56] Bumped version to 0.80.0b5 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index e00abef3923..737a2c10cff 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0b4' +PATCH_VERSION = '0b5' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From cfc5ebbfb06c2090a24ec855788f37a247079960 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 12 Oct 2018 14:57:29 +0200 Subject: [PATCH 31/56] Update frontend --- homeassistant/components/frontend/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 27904faec1a..c06f659573e 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -24,7 +24,7 @@ from homeassistant.core import callback from homeassistant.helpers.translation import async_get_translations from homeassistant.loader import bind_hass -REQUIREMENTS = ['home-assistant-frontend==20181007.0'] +REQUIREMENTS = ['home-assistant-frontend==20181012.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log', diff --git a/requirements_all.txt b/requirements_all.txt index 7da7f7e7847..c91b4127880 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -458,7 +458,7 @@ hole==0.3.0 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181007.0 +home-assistant-frontend==20181012.0 # homeassistant.components.homekit_controller # homekit==0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b4e995d580c..871714cc47d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -90,7 +90,7 @@ hdate==0.6.3 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181007.0 +home-assistant-frontend==20181012.0 # homeassistant.components.homematicip_cloud homematicip==0.9.8 From f47e080f37c0cebaae391eee1cd64bc1fee2b8f2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 12 Oct 2018 14:58:09 +0200 Subject: [PATCH 32/56] Update translations --- .../components/auth/.translations/sv.json | 9 +++++-- .../deconz/.translations/zh-Hant.json | 2 +- .../components/hangouts/.translations/sv.json | 2 ++ .../components/ifttt/.translations/sv.json | 13 +++++++++ .../ifttt/.translations/zh-Hant.json | 4 +-- .../components/ios/.translations/sv.json | 3 +++ .../components/lifx/.translations/en.json | 15 +++++++++++ .../components/lifx/.translations/sv.json | 15 +++++++++++ .../lifx/.translations/zh-Hans.json | 15 +++++++++++ .../components/mqtt/.translations/sv.json | 22 +++++++++++++-- .../components/smhi/.translations/sv.json | 19 +++++++++++++ .../smhi/.translations/zh-Hans.json | 19 +++++++++++++ .../components/tradfri/.translations/sv.json | 5 +++- .../components/upnp/.translations/sv.json | 27 +++++++++++++++++++ .../components/zwave/.translations/ca.json | 7 ++++- .../components/zwave/.translations/en.json | 22 +++++++++++++++ .../components/zwave/.translations/sl.json | 22 +++++++++++++++ .../components/zwave/.translations/sv.json | 22 +++++++++++++++ .../zwave/.translations/zh-Hans.json | 22 +++++++++++++++ .../zwave/.translations/zh-Hant.json | 22 +++++++++++++++ 20 files changed, 278 insertions(+), 9 deletions(-) create mode 100644 homeassistant/components/lifx/.translations/en.json create mode 100644 homeassistant/components/lifx/.translations/sv.json create mode 100644 homeassistant/components/lifx/.translations/zh-Hans.json create mode 100644 homeassistant/components/smhi/.translations/sv.json create mode 100644 homeassistant/components/smhi/.translations/zh-Hans.json create mode 100644 homeassistant/components/upnp/.translations/sv.json create mode 100644 homeassistant/components/zwave/.translations/en.json create mode 100644 homeassistant/components/zwave/.translations/sl.json create mode 100644 homeassistant/components/zwave/.translations/sv.json create mode 100644 homeassistant/components/zwave/.translations/zh-Hans.json create mode 100644 homeassistant/components/zwave/.translations/zh-Hant.json diff --git a/homeassistant/components/auth/.translations/sv.json b/homeassistant/components/auth/.translations/sv.json index 604ae3c4fe5..9246a88c512 100644 --- a/homeassistant/components/auth/.translations/sv.json +++ b/homeassistant/components/auth/.translations/sv.json @@ -8,11 +8,16 @@ "invalid_code": "Ogiltig kod, var god f\u00f6rs\u00f6k igen." }, "step": { + "init": { + "description": "Var god v\u00e4lj en av notifieringstj\u00e4nsterna:", + "title": "Konfigurera ett eng\u00e5ngsl\u00f6senord levererat genom notifieringskomponenten" + }, "setup": { "description": "Ett eng\u00e5ngsl\u00f6senord har skickats av **notify.{notify_service}**. V\u00e4nligen ange det nedan:", - "title": "Verifiera installationen" + "title": "Verifiera inst\u00e4llningen" } - } + }, + "title": "Meddela eng\u00e5ngsl\u00f6senord" }, "totp": { "error": { diff --git a/homeassistant/components/deconz/.translations/zh-Hant.json b/homeassistant/components/deconz/.translations/zh-Hant.json index 5cd1a14d499..524f68d41bc 100644 --- a/homeassistant/components/deconz/.translations/zh-Hant.json +++ b/homeassistant/components/deconz/.translations/zh-Hant.json @@ -3,7 +3,7 @@ "abort": { "already_configured": "Bridge \u5df2\u7d93\u8a2d\u5b9a\u5b8c\u6210", "no_bridges": "\u672a\u641c\u5c0b\u5230 deCONZ Bridfe", - "one_instance_only": "\u7d44\u4ef6\u50c5\u652f\u63f4\u4e00\u7d44 deCONZ \u5be6\u4f8b" + "one_instance_only": "\u7d44\u4ef6\u50c5\u652f\u63f4\u4e00\u7d44 deCONZ \u7269\u4ef6" }, "error": { "no_key": "\u7121\u6cd5\u53d6\u5f97 API key" diff --git a/homeassistant/components/hangouts/.translations/sv.json b/homeassistant/components/hangouts/.translations/sv.json index 90bf4e97712..ae03fdbf722 100644 --- a/homeassistant/components/hangouts/.translations/sv.json +++ b/homeassistant/components/hangouts/.translations/sv.json @@ -14,6 +14,7 @@ "data": { "2fa": "2FA Pinkod" }, + "description": "Missing english translation", "title": "Tv\u00e5faktorsautentisering" }, "user": { @@ -21,6 +22,7 @@ "email": "E-postadress", "password": "L\u00f6senord" }, + "description": "Missing english translation", "title": "Google Hangouts-inloggning" } }, diff --git a/homeassistant/components/ifttt/.translations/sv.json b/homeassistant/components/ifttt/.translations/sv.json index 077956287b3..883bb042822 100644 --- a/homeassistant/components/ifttt/.translations/sv.json +++ b/homeassistant/components/ifttt/.translations/sv.json @@ -1,5 +1,18 @@ { "config": { + "abort": { + "not_internet_accessible": "Din Home Assistant instans m\u00e5ste vara tillg\u00e4nglig fr\u00e5n internet f\u00f6r att ta emot IFTTT meddelanden.", + "one_instance_allowed": "Endast en enda instans \u00e4r n\u00f6dv\u00e4ndig." + }, + "create_entry": { + "default": "F\u00f6r att skicka h\u00e4ndelser till Home Assistant m\u00e5ste du anv\u00e4nda \u00e5tg\u00e4rden \"G\u00f6r en webbf\u00f6rfr\u00e5gan\" fr\u00e5n [IFTTT Webhook applet] ( {applet_url} ).\n\n Fyll i f\u00f6ljande information:\n \n - URL: ` {webhook_url} `\n - Metod: POST\n - Inneh\u00e5llstyp: application / json\n\n Se [dokumentationen] ( {docs_url} ) om hur du konfigurerar automatiseringar f\u00f6r att hantera inkommande data." + }, + "step": { + "user": { + "description": "\u00c4r du s\u00e4ker p\u00e5 att du vill st\u00e4lla in IFTTT?", + "title": "St\u00e4lla in IFTTT Webhook Applet" + } + }, "title": "IFTTT" } } \ No newline at end of file diff --git a/homeassistant/components/ifttt/.translations/zh-Hant.json b/homeassistant/components/ifttt/.translations/zh-Hant.json index 5c75beddbe1..8610351f43b 100644 --- a/homeassistant/components/ifttt/.translations/zh-Hant.json +++ b/homeassistant/components/ifttt/.translations/zh-Hant.json @@ -1,8 +1,8 @@ { "config": { "abort": { - "not_internet_accessible": "Home Assistant \u5be6\u4f8b\u5fc5\u9808\u80fd\u5920\u7531\u7db2\u969b\u7db2\u8def\u5b58\u53d6\uff0c\u65b9\u80fd\u63a5\u53d7 IFTTT \u8a0a\u606f\u3002", - "one_instance_allowed": "\u50c5\u9700\u8a2d\u5b9a\u4e00\u7d44\u5be6\u4f8b\u5373\u53ef\u3002" + "not_internet_accessible": "Home Assistant \u7269\u4ef6\u5fc5\u9808\u80fd\u5920\u7531\u7db2\u969b\u7db2\u8def\u5b58\u53d6\uff0c\u65b9\u80fd\u63a5\u53d7 IFTTT \u8a0a\u606f\u3002", + "one_instance_allowed": "\u50c5\u9700\u8a2d\u5b9a\u4e00\u7d44\u7269\u4ef6\u5373\u53ef\u3002" }, "create_entry": { "default": "\u6b32\u50b3\u9001\u4e8b\u4ef6\u81f3 Home Assistant\uff0c\u5c07\u9700\u8981\u7531 [IFTTT Webhook applet]({applet_url}) \u547c\u53eb\u300c\u9032\u884c Web \u8acb\u6c42\u300d\u52d5\u4f5c\u3002\n\n\u8acb\u586b\u5beb\u4e0b\u5217\u8cc7\u8a0a\uff1a\n\n- URL: `{webhook_url}`\n- Method: POST\n- Content Type: application/json\n\n\u95dc\u65bc\u5982\u4f55\u50b3\u5165\u8cc7\u6599\u81ea\u52d5\u5316\u8a2d\u5b9a\uff0c\u8acb\u53c3\u95b1[\u6587\u4ef6]({docs_url})\u4ee5\u9032\u884c\u4e86\u89e3\u3002" diff --git a/homeassistant/components/ios/.translations/sv.json b/homeassistant/components/ios/.translations/sv.json index 6806f9bab90..5a605ed8987 100644 --- a/homeassistant/components/ios/.translations/sv.json +++ b/homeassistant/components/ios/.translations/sv.json @@ -1,5 +1,8 @@ { "config": { + "abort": { + "single_instance_allowed": "Endast en enda konfiguration av Home Assistant iOS \u00e4r n\u00f6dv\u00e4ndig." + }, "step": { "confirm": { "description": "Vill du konfigurera Home Assistants iOS komponent?", diff --git a/homeassistant/components/lifx/.translations/en.json b/homeassistant/components/lifx/.translations/en.json new file mode 100644 index 00000000000..64fdc7516ea --- /dev/null +++ b/homeassistant/components/lifx/.translations/en.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "No LIFX devices found on the network.", + "single_instance_allowed": "Only a single configuration of LIFX is possible." + }, + "step": { + "confirm": { + "description": "Do you want to set up LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/sv.json b/homeassistant/components/lifx/.translations/sv.json new file mode 100644 index 00000000000..a935e209bb4 --- /dev/null +++ b/homeassistant/components/lifx/.translations/sv.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Inga LIFX enheter hittas i n\u00e4tverket.", + "single_instance_allowed": "Endast en enda konfiguration av LIFX \u00e4r m\u00f6jlig." + }, + "step": { + "confirm": { + "description": "Vill du st\u00e4lla in LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/zh-Hans.json b/homeassistant/components/lifx/.translations/zh-Hans.json new file mode 100644 index 00000000000..bc9375d807d --- /dev/null +++ b/homeassistant/components/lifx/.translations/zh-Hans.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "\u6ca1\u6709\u5728\u7f51\u7edc\u4e0a\u627e\u5230 LIFX \u8bbe\u5907\u3002", + "single_instance_allowed": "LIFX \u53ea\u80fd\u914d\u7f6e\u4e00\u6b21\u3002" + }, + "step": { + "confirm": { + "description": "\u60a8\u60f3\u8981\u914d\u7f6e LIFX \u5417\uff1f", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/mqtt/.translations/sv.json b/homeassistant/components/mqtt/.translations/sv.json index 7cf6d75b9c1..70e3720038d 100644 --- a/homeassistant/components/mqtt/.translations/sv.json +++ b/homeassistant/components/mqtt/.translations/sv.json @@ -1,13 +1,31 @@ { "config": { + "abort": { + "single_instance_allowed": "Endast en enda konfiguration av MQTT \u00e4r till\u00e5ten." + }, + "error": { + "cannot_connect": "Det gick inte att ansluta till broker." + }, "step": { "broker": { "data": { + "broker": "Broker", + "discovery": "Aktivera uppt\u00e4ckt", "password": "L\u00f6senord", "port": "Port", "username": "Anv\u00e4ndarnamn" - } + }, + "description": "V\u00e4nligen ange anslutningsinformationen f\u00f6r din MQTT broker.", + "title": "MQTT" + }, + "hassio_confirm": { + "data": { + "discovery": "Aktivera uppt\u00e4ckt" + }, + "description": "Vill du konfigurera Home Assistant f\u00f6r att ansluta till MQTT Broker som tillhandah\u00e5lls av hass.io-till\u00e4gget {addon} ?", + "title": "MQTT Broker via Hass.io till\u00e4gg" } - } + }, + "title": "MQTT" } } \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/sv.json b/homeassistant/components/smhi/.translations/sv.json new file mode 100644 index 00000000000..69073a0eb73 --- /dev/null +++ b/homeassistant/components/smhi/.translations/sv.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Namnet finns redan", + "wrong_location": "Plats i Sverige endast" + }, + "step": { + "user": { + "data": { + "latitude": "Latitud", + "longitude": "Longitud", + "name": "Namn" + }, + "title": "Plats i Sverige" + } + }, + "title": "Svensk v\u00e4derservice (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/zh-Hans.json b/homeassistant/components/smhi/.translations/zh-Hans.json new file mode 100644 index 00000000000..a70bb7a6722 --- /dev/null +++ b/homeassistant/components/smhi/.translations/zh-Hans.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "\u540d\u79f0\u5df2\u5b58\u5728", + "wrong_location": "\u4ec5\u9650\u745e\u5178\u7684\u4f4d\u7f6e" + }, + "step": { + "user": { + "data": { + "latitude": "\u7eac\u5ea6", + "longitude": "\u7ecf\u5ea6", + "name": "\u540d\u79f0" + }, + "title": "\u5728\u745e\u5178\u7684\u4f4d\u7f6e" + } + }, + "title": "\u745e\u5178\u6c14\u8c61\u670d\u52a1\uff08SMHI\uff09" + } +} \ No newline at end of file diff --git a/homeassistant/components/tradfri/.translations/sv.json b/homeassistant/components/tradfri/.translations/sv.json index ffe8bff22b4..34799050539 100644 --- a/homeassistant/components/tradfri/.translations/sv.json +++ b/homeassistant/components/tradfri/.translations/sv.json @@ -4,11 +4,14 @@ "already_configured": "Bryggan \u00e4r redan konfigurerad" }, "error": { - "cannot_connect": "Det gick inte att ansluta till gatewayen." + "cannot_connect": "Det gick inte att ansluta till gatewayen.", + "invalid_key": "Misslyckades med att registrera den angivna nyckeln. Om det h\u00e4r h\u00e4nder, f\u00f6rs\u00f6k starta om gatewayen igen.", + "timeout": "Timeout vid valididering av kod" }, "step": { "auth": { "data": { + "host": "V\u00e4rd", "security_code": "S\u00e4kerhetskod" }, "description": "Du kan hitta s\u00e4kerhetskoden p\u00e5 baksidan av din gateway.", diff --git a/homeassistant/components/upnp/.translations/sv.json b/homeassistant/components/upnp/.translations/sv.json new file mode 100644 index 00000000000..63c63781845 --- /dev/null +++ b/homeassistant/components/upnp/.translations/sv.json @@ -0,0 +1,27 @@ +{ + "config": { + "abort": { + "already_configured": "UPnP/IGD \u00e4r redan konfigurerad", + "no_devices_discovered": "Inga UPnP/IGDs uppt\u00e4cktes", + "no_sensors_or_port_mapping": "Aktivera minst sensorer eller portmappning" + }, + "error": { + "one": "En", + "other": "Andra" + }, + "step": { + "init": { + "title": "UPnP/IGD" + }, + "user": { + "data": { + "enable_port_mapping": "Aktivera portmappning f\u00f6r Home Assistant", + "enable_sensors": "L\u00e4gg till trafiksensorer", + "igd": "UPnP/IGD" + }, + "title": "Konfigurationsalternativ f\u00f6r UPnP/IGD" + } + }, + "title": "UPnP/IGD" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/ca.json b/homeassistant/components/zwave/.translations/ca.json index 8c39ca58201..b617a902374 100644 --- a/homeassistant/components/zwave/.translations/ca.json +++ b/homeassistant/components/zwave/.translations/ca.json @@ -4,11 +4,16 @@ "already_configured": "Z-Wave ja est\u00e0 configurat", "one_instance_only": "El component nom\u00e9s admet una inst\u00e0ncia de Z-Wave" }, + "error": { + "option_error": "Ha fallat la validaci\u00f3 de Z-Wave. \u00c9s correcta la ruta al port on hi ha la mem\u00f2ria USB?" + }, "step": { "user": { "data": { - "network_key": "Clau de xarxa (deixeu-ho en blanc per generar-la autom\u00e0ticament)" + "network_key": "Clau de xarxa (deixeu-ho en blanc per generar-la autom\u00e0ticament)", + "usb_path": "Ruta del port USB" }, + "description": "Consulteu https://www.home-assistant.io/docs/z-wave/installation/ per obtenir informaci\u00f3 sobre les variables de configuraci\u00f3", "title": "Configureu Z-Wave" } }, diff --git a/homeassistant/components/zwave/.translations/en.json b/homeassistant/components/zwave/.translations/en.json new file mode 100644 index 00000000000..081d5c858cb --- /dev/null +++ b/homeassistant/components/zwave/.translations/en.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave is already configured", + "one_instance_only": "Component only supports one Z-Wave instance" + }, + "error": { + "option_error": "Z-Wave validation failed. Is the path to the USB stick correct?" + }, + "step": { + "user": { + "data": { + "network_key": "Network Key (leave blank to auto-generate)", + "usb_path": "USB Path" + }, + "description": "See https://www.home-assistant.io/docs/z-wave/installation/ for information on the configuration variables", + "title": "Set up Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/sl.json b/homeassistant/components/zwave/.translations/sl.json new file mode 100644 index 00000000000..fa799d1ed36 --- /dev/null +++ b/homeassistant/components/zwave/.translations/sl.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave je \u017ee konfiguriran", + "one_instance_only": "Komponente podpirajo le eno Z-Wave instanco" + }, + "error": { + "option_error": "Potrjevanje Z-Wave ni uspelo. Ali je pot do USB klju\u010da pravilna?" + }, + "step": { + "user": { + "data": { + "network_key": "Omre\u017eni klju\u010d (pustite prazno za samodejno generiranje)", + "usb_path": "USB Pot" + }, + "description": "Za informacije o konfiguracijskih spremenljivka si oglejte https://www.home-assistant.io/docs/z-wave/installation/", + "title": "Nastavite Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/sv.json b/homeassistant/components/zwave/.translations/sv.json new file mode 100644 index 00000000000..508652a1784 --- /dev/null +++ b/homeassistant/components/zwave/.translations/sv.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave \u00e4r redan konfigurerat", + "one_instance_only": "Komponenten st\u00f6der endast en Z-Wave-instans" + }, + "error": { + "option_error": "Z-Wave-valideringen misslyckades. \u00c4r s\u00f6kv\u00e4gen till USB-minnet korrekt?" + }, + "step": { + "user": { + "data": { + "network_key": "N\u00e4tverksnyckel (l\u00e4mna blank f\u00f6r automatisk generering)", + "usb_path": "USB-s\u00f6kv\u00e4g" + }, + "description": "Se https://www.home-assistant.io/docs/z-wave/installation/ f\u00f6r information om konfigurationsvariabler", + "title": "St\u00e4lla in Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/zh-Hans.json b/homeassistant/components/zwave/.translations/zh-Hans.json new file mode 100644 index 00000000000..2c72ce72c60 --- /dev/null +++ b/homeassistant/components/zwave/.translations/zh-Hans.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave \u5df2\u914d\u7f6e\u5b8c\u6210", + "one_instance_only": "\u7ec4\u4ef6\u53ea\u652f\u6301\u4e00\u4e2a Z-Wave \u5b9e\u4f8b" + }, + "error": { + "option_error": "Z-Wave \u9a8c\u8bc1\u5931\u8d25\u3002 USB \u68d2\u7684\u8def\u5f84\u662f\u5426\u6b63\u786e\uff1f" + }, + "step": { + "user": { + "data": { + "network_key": "\u7f51\u7edc\u5bc6\u94a5\uff08\u7559\u7a7a\u5c06\u81ea\u52a8\u751f\u6210\uff09", + "usb_path": "USB \u8def\u5f84" + }, + "description": "\u6709\u5173\u914d\u7f6e\u7684\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 https://www.home-assistant.io/docs/z-wave/installation/", + "title": "\u8bbe\u7f6e Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/zh-Hant.json b/homeassistant/components/zwave/.translations/zh-Hant.json new file mode 100644 index 00000000000..2a84e8b3fd6 --- /dev/null +++ b/homeassistant/components/zwave/.translations/zh-Hant.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave \u5df2\u7d93\u8a2d\u5b9a\u5b8c\u6210", + "one_instance_only": "\u7d44\u4ef6\u50c5\u652f\u63f4\u4e00\u7d44 Z-Wave \u7269\u4ef6" + }, + "error": { + "option_error": "Z-Wave \u9a57\u8b49\u5931\u6557\uff0c\u8acb\u78ba\u5b9a USB \u96a8\u8eab\u789f\u8def\u5f91\u6b63\u78ba\uff1f" + }, + "step": { + "user": { + "data": { + "network_key": "\u7db2\u8def\u5bc6\u9470\uff08\u4fdd\u7559\u7a7a\u767d\u5c07\u6703\u81ea\u52d5\u7522\u751f\uff09", + "usb_path": "USB \u8def\u5f91" + }, + "description": "\u95dc\u65bc\u8a2d\u5b9a\u8b8a\u6578\u8cc7\u8a0a\uff0c\u8acb\u53c3\u95b1 https://www.home-assistant.io/docs/z-wave/installation/", + "title": "\u8a2d\u5b9a Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file From d199f57aa8083ea3268f69245e6c41bd72060f91 Mon Sep 17 00:00:00 2001 From: Nikolay Vasilchuk Date: Thu, 11 Oct 2018 15:15:04 +0300 Subject: [PATCH 33/56] Logbook: filter by entity and period (#17095) * Filter logbook by entity_id * Filter logbook by period * Simple test * houndci-bot review * Tests * Test fix * Test Fix --- homeassistant/components/logbook.py | 19 ++++-- tests/components/test_logbook.py | 89 ++++++++++++++++++++++++++++- 2 files changed, 103 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/logbook.py b/homeassistant/components/logbook.py index 9e66c8d3aca..5cbd2b9432b 100644 --- a/homeassistant/components/logbook.py +++ b/homeassistant/components/logbook.py @@ -133,14 +133,21 @@ class LogbookView(HomeAssistantView): else: datetime = dt_util.start_of_local_day() - start_day = dt_util.as_utc(datetime) - end_day = start_day + timedelta(days=1) + period = request.query.get('period') + if period is None: + period = 1 + else: + period = int(period) + + entity_id = request.query.get('entity') + start_day = dt_util.as_utc(datetime) - timedelta(days=period - 1) + end_day = start_day + timedelta(days=period) hass = request.app['hass'] def json_events(): """Fetch events and generate JSON.""" return self.json(list( - _get_events(hass, self.config, start_day, end_day))) + _get_events(hass, self.config, start_day, end_day, entity_id))) return await hass.async_add_job(json_events) @@ -288,7 +295,7 @@ def humanify(hass, events): } -def _get_events(hass, config, start_day, end_day): +def _get_events(hass, config, start_day, end_day, entity_id=None): """Get events for a period of time.""" from homeassistant.components.recorder.models import Events, States from homeassistant.components.recorder.util import ( @@ -302,6 +309,10 @@ def _get_events(hass, config, start_day, end_day): & (Events.time_fired < end_day)) \ .filter((States.last_updated == States.last_changed) | (States.state_id.is_(None))) + + if entity_id is not None: + query = query.filter(States.entity_id == entity_id.lower()) + events = execute(query) return humanify(hass, _exclude_events(events, config)) diff --git a/tests/components/test_logbook.py b/tests/components/test_logbook.py index 8e7c2299731..3bb3ae57c68 100644 --- a/tests/components/test_logbook.py +++ b/tests/components/test_logbook.py @@ -1,7 +1,7 @@ """The tests for the logbook component.""" # pylint: disable=protected-access,invalid-name import logging -from datetime import timedelta +from datetime import (timedelta, datetime) import unittest from homeassistant.components import sun @@ -558,6 +558,93 @@ async def test_logbook_view(hass, aiohttp_client): assert response.status == 200 +async def test_logbook_view_period_entity(hass, aiohttp_client): + """Test the logbook view with period and entity.""" + await hass.async_add_job(init_recorder_component, hass) + await async_setup_component(hass, 'logbook', {}) + await hass.components.recorder.wait_connection_ready() + await hass.async_add_job(hass.data[recorder.DATA_INSTANCE].block_till_done) + + entity_id_test = 'switch.test' + hass.states.async_set(entity_id_test, STATE_OFF) + hass.states.async_set(entity_id_test, STATE_ON) + entity_id_second = 'switch.second' + hass.states.async_set(entity_id_second, STATE_OFF) + hass.states.async_set(entity_id_second, STATE_ON) + await hass.async_block_till_done() + await hass.async_add_job(hass.data[recorder.DATA_INSTANCE].block_till_done) + + client = await aiohttp_client(hass.http.app) + + # Today time 00:00:00 + start = dt_util.utcnow().date() + start_date = datetime(start.year, start.month, start.day) + + # Test today entries without filters + response = await client.get( + '/api/logbook/{}'.format(start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 2 + assert json[0]['entity_id'] == entity_id_test + assert json[1]['entity_id'] == entity_id_second + + # Test today entries with filter by period + response = await client.get( + '/api/logbook/{}?period=1'.format(start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 2 + assert json[0]['entity_id'] == entity_id_test + assert json[1]['entity_id'] == entity_id_second + + # Test today entries with filter by entity_id + response = await client.get( + '/api/logbook/{}?entity=switch.test'.format( + start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 1 + assert json[0]['entity_id'] == entity_id_test + + # Test entries for 3 days with filter by entity_id + response = await client.get( + '/api/logbook/{}?period=3&entity=switch.test'.format( + start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 1 + assert json[0]['entity_id'] == entity_id_test + + # Tomorrow time 00:00:00 + start = (dt_util.utcnow() + timedelta(days=1)).date() + start_date = datetime(start.year, start.month, start.day) + + # Test tomorrow entries without filters + response = await client.get( + '/api/logbook/{}'.format(start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 0 + + # Test tomorrow entries with filter by entity_id + response = await client.get( + '/api/logbook/{}?entity=switch.test'.format( + start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 0 + + # Test entries from tomorrow to 3 days ago with filter by entity_id + response = await client.get( + '/api/logbook/{}?period=3&entity=switch.test'.format( + start_date.isoformat())) + assert response.status == 200 + json = await response.json() + assert len(json) == 1 + assert json[0]['entity_id'] == entity_id_test + + async def test_humanify_alexa_event(hass): """Test humanifying Alexa event.""" hass.states.async_set('light.kitchen', 'on', { From 05ae8f9dd4bea024a7c079c9d8751a3106ee283e Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Tue, 9 Oct 2018 15:43:59 -0400 Subject: [PATCH 34/56] Fix samsung bug (#17285) --- homeassistant/components/media_player/samsungtv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/media_player/samsungtv.py b/homeassistant/components/media_player/samsungtv.py index 3573b28b4e3..3a66aa66dc0 100644 --- a/homeassistant/components/media_player/samsungtv.py +++ b/homeassistant/components/media_player/samsungtv.py @@ -30,7 +30,7 @@ _LOGGER = logging.getLogger(__name__) DEFAULT_NAME = 'Samsung TV Remote' DEFAULT_PORT = 55000 -DEFAULT_TIMEOUT = 0 +DEFAULT_TIMEOUT = 1 KEY_PRESS_TIMEOUT = 1.2 KNOWN_DEVICES_KEY = 'samsungtv_known_devices' From 8778b707f14edbd7aec479286b0636b2c5e1cacb Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Thu, 11 Oct 2018 10:37:34 +0200 Subject: [PATCH 35/56] Allow tradfri groups for new imported entries (#17310) * Clean up leftover config schema option * Allow import groups via new config yaml setup * Fix and add test * Add a test without groups for legacy import * Change default import groups to False * Fix I/O in test --- homeassistant/components/tradfri/__init__.py | 7 +- .../components/tradfri/config_flow.py | 5 +- tests/components/tradfri/conftest.py | 12 +++ tests/components/tradfri/test_config_flow.py | 96 +++++++++++++++---- tests/components/tradfri/test_init.py | 2 +- 5 files changed, 96 insertions(+), 26 deletions(-) create mode 100644 tests/components/tradfri/conftest.py diff --git a/homeassistant/components/tradfri/__init__.py b/homeassistant/components/tradfri/__init__.py index e9ee8d0898b..ba13b8d511a 100644 --- a/homeassistant/components/tradfri/__init__.py +++ b/homeassistant/components/tradfri/__init__.py @@ -25,11 +25,11 @@ CONFIG_FILE = '.tradfri_psk.conf' KEY_GATEWAY = 'tradfri_gateway' KEY_API = 'tradfri_api' CONF_ALLOW_TRADFRI_GROUPS = 'allow_tradfri_groups' -DEFAULT_ALLOW_TRADFRI_GROUPS = True +DEFAULT_ALLOW_TRADFRI_GROUPS = False CONFIG_SCHEMA = vol.Schema({ DOMAIN: vol.Schema({ - vol.Inclusive(CONF_HOST, 'gateway'): cv.string, + vol.Optional(CONF_HOST): cv.string, vol.Optional(CONF_ALLOW_TRADFRI_GROUPS, default=DEFAULT_ALLOW_TRADFRI_GROUPS): cv.boolean, }) @@ -64,13 +64,14 @@ async def async_setup(hass, config): )) host = conf.get(CONF_HOST) + import_groups = conf[CONF_ALLOW_TRADFRI_GROUPS] if host is None or host in configured_hosts or host in legacy_hosts: return True hass.async_create_task(hass.config_entries.flow.async_init( DOMAIN, context={'source': config_entries.SOURCE_IMPORT}, - data={'host': host} + data={CONF_HOST: host, CONF_IMPORT_GROUPS: import_groups} )) return True diff --git a/homeassistant/components/tradfri/config_flow.py b/homeassistant/components/tradfri/config_flow.py index a3452e50c4d..2e24fde8294 100644 --- a/homeassistant/components/tradfri/config_flow.py +++ b/homeassistant/components/tradfri/config_flow.py @@ -34,6 +34,7 @@ class FlowHandler(config_entries.ConfigFlow): def __init__(self): """Initialize flow.""" self._host = None + self._import_groups = False async def async_step_user(self, user_input=None): """Handle a flow initialized by the user.""" @@ -52,7 +53,8 @@ class FlowHandler(config_entries.ConfigFlow): # We don't ask for import group anymore as group state # is not reliable, don't want to show that to the user. - auth[CONF_IMPORT_GROUPS] = False + # But we still allow specifying import group via config yaml. + auth[CONF_IMPORT_GROUPS] = self._import_groups return await self._entry_from_data(auth) @@ -97,6 +99,7 @@ class FlowHandler(config_entries.ConfigFlow): # Happens if user has host directly in configuration.yaml if 'key' not in user_input: self._host = user_input['host'] + self._import_groups = user_input[CONF_IMPORT_GROUPS] return await self.async_step_auth() try: diff --git a/tests/components/tradfri/conftest.py b/tests/components/tradfri/conftest.py new file mode 100644 index 00000000000..9a5745264b7 --- /dev/null +++ b/tests/components/tradfri/conftest.py @@ -0,0 +1,12 @@ +"""Common tradfri test fixtures.""" +from unittest.mock import patch + +import pytest + + +@pytest.fixture +def mock_gateway_info(): + """Mock get_gateway_info.""" + with patch('homeassistant.components.tradfri.config_flow.' + 'get_gateway_info') as mock_gateway: + yield mock_gateway diff --git a/tests/components/tradfri/test_config_flow.py b/tests/components/tradfri/test_config_flow.py index 99566356f61..6756a01bbc7 100644 --- a/tests/components/tradfri/test_config_flow.py +++ b/tests/components/tradfri/test_config_flow.py @@ -17,14 +17,6 @@ def mock_auth(): yield mock_auth -@pytest.fixture -def mock_gateway_info(): - """Mock get_gateway_info.""" - with patch('homeassistant.components.tradfri.config_flow.' - 'get_gateway_info') as mock_gateway: - yield mock_gateway - - @pytest.fixture def mock_entry_setup(): """Mock entry setup.""" @@ -125,34 +117,65 @@ async def test_discovery_connection(hass, mock_auth, mock_entry_setup): } -async def test_import_connection(hass, mock_gateway_info, mock_entry_setup): +async def test_import_connection(hass, mock_auth, mock_entry_setup): """Test a connection via import.""" - mock_gateway_info.side_effect = \ - lambda hass, host, identity, key: mock_coro({ - 'host': host, - 'identity': identity, - 'key': key, - 'gateway_id': 'mock-gateway' - }) + mock_auth.side_effect = lambda hass, host, code: mock_coro({ + 'host': host, + 'gateway_id': 'bla', + 'identity': 'mock-iden', + 'key': 'mock-key', + }) - result = await hass.config_entries.flow.async_init( + flow = await hass.config_entries.flow.async_init( 'tradfri', context={'source': 'import'}, data={ 'host': '123.123.123.123', - 'identity': 'mock-iden', - 'key': 'mock-key', 'import_groups': True }) + result = await hass.config_entries.flow.async_configure(flow['flow_id'], { + 'security_code': 'abcd', + }) + assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY assert result['result'].data == { 'host': '123.123.123.123', - 'gateway_id': 'mock-gateway', + 'gateway_id': 'bla', 'identity': 'mock-iden', 'key': 'mock-key', 'import_groups': True } - assert len(mock_gateway_info.mock_calls) == 1 + assert len(mock_entry_setup.mock_calls) == 1 + + +async def test_import_connection_no_groups(hass, mock_auth, mock_entry_setup): + """Test a connection via import and no groups allowed.""" + mock_auth.side_effect = lambda hass, host, code: mock_coro({ + 'host': host, + 'gateway_id': 'bla', + 'identity': 'mock-iden', + 'key': 'mock-key', + }) + + flow = await hass.config_entries.flow.async_init( + 'tradfri', context={'source': 'import'}, data={ + 'host': '123.123.123.123', + 'import_groups': False + }) + + result = await hass.config_entries.flow.async_configure(flow['flow_id'], { + 'security_code': 'abcd', + }) + + assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY + assert result['result'].data == { + 'host': '123.123.123.123', + 'gateway_id': 'bla', + 'identity': 'mock-iden', + 'key': 'mock-key', + 'import_groups': False + } + assert len(mock_entry_setup.mock_calls) == 1 @@ -187,6 +210,37 @@ async def test_import_connection_legacy(hass, mock_gateway_info, assert len(mock_entry_setup.mock_calls) == 1 +async def test_import_connection_legacy_no_groups( + hass, mock_gateway_info, mock_entry_setup): + """Test a connection via legacy import and no groups allowed.""" + mock_gateway_info.side_effect = \ + lambda hass, host, identity, key: mock_coro({ + 'host': host, + 'identity': identity, + 'key': key, + 'gateway_id': 'mock-gateway' + }) + + result = await hass.config_entries.flow.async_init( + 'tradfri', context={'source': 'import'}, data={ + 'host': '123.123.123.123', + 'key': 'mock-key', + 'import_groups': False + }) + + assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY + assert result['result'].data == { + 'host': '123.123.123.123', + 'gateway_id': 'mock-gateway', + 'identity': 'homeassistant', + 'key': 'mock-key', + 'import_groups': False + } + + assert len(mock_gateway_info.mock_calls) == 1 + assert len(mock_entry_setup.mock_calls) == 1 + + async def test_discovery_duplicate_aborted(hass): """Test a duplicate discovery host is ignored.""" MockConfigEntry( diff --git a/tests/components/tradfri/test_init.py b/tests/components/tradfri/test_init.py index 4527e87f605..800c7b72ee6 100644 --- a/tests/components/tradfri/test_init.py +++ b/tests/components/tradfri/test_init.py @@ -58,7 +58,7 @@ async def test_config_json_host_not_imported(hass): assert len(mock_init.mock_calls) == 0 -async def test_config_json_host_imported(hass): +async def test_config_json_host_imported(hass, mock_gateway_info): """Test that we import a configured host.""" with patch('homeassistant.components.tradfri.load_json', return_value={'mock-host': {'key': 'some-info'}}): From bc036cc2fe52e4102e2ec6b76f81932a3ecb1234 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Oct 2018 01:02:00 +0200 Subject: [PATCH 36/56] Fix auth for hass.io (#17318) * Update test_auth.py * Update auth.py * Update test_auth.py --- homeassistant/components/hassio/auth.py | 5 ++--- tests/components/hassio/test_auth.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/hassio/auth.py b/homeassistant/components/hassio/auth.py index 73ef5aa29cc..951110271d4 100644 --- a/homeassistant/components/hassio/auth.py +++ b/homeassistant/components/hassio/auth.py @@ -4,8 +4,7 @@ from ipaddress import ip_address import os from aiohttp import web -from aiohttp.web_exceptions import ( - HTTPForbidden, HTTPNotFound, HTTPUnauthorized) +from aiohttp.web_exceptions import HTTPForbidden, HTTPNotFound import voluptuous as vol from homeassistant.core import callback @@ -72,4 +71,4 @@ class HassIOAuth(HomeAssistantView): try: await provider.async_validate_login(username, password) except HomeAssistantError: - raise HTTPUnauthorized() from None + raise HTTPForbidden() from None diff --git a/tests/components/hassio/test_auth.py b/tests/components/hassio/test_auth.py index 50d9488a19c..b3a6ae223f9 100644 --- a/tests/components/hassio/test_auth.py +++ b/tests/components/hassio/test_auth.py @@ -50,7 +50,7 @@ async def test_login_error(hass, hassio_client): ) # Check we got right response - assert resp.status == 401 + assert resp.status == 403 mock_login.assert_called_with("test", "123456") From edb3722abdd5d149013e74d0f0707993fcdd3824 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Oct 2018 10:55:38 +0200 Subject: [PATCH 37/56] Hass.io auth/sso part2 (#17324) * Update discovery.py * Create const.py * Update auth.py * Update const.py * Update const.py * Update http.py * Update handler.py * Update auth.py * Update auth.py * Update test_auth.py --- homeassistant/components/hassio/auth.py | 8 ++--- homeassistant/components/hassio/const.py | 12 +++++++ homeassistant/components/hassio/discovery.py | 10 ++---- homeassistant/components/hassio/handler.py | 4 +-- homeassistant/components/hassio/http.py | 3 +- tests/components/hassio/test_auth.py | 34 ++++++++++++++++++-- 6 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 homeassistant/components/hassio/const.py diff --git a/homeassistant/components/hassio/auth.py b/homeassistant/components/hassio/auth.py index 951110271d4..4be3ba9956c 100644 --- a/homeassistant/components/hassio/auth.py +++ b/homeassistant/components/hassio/auth.py @@ -14,16 +14,16 @@ from homeassistant.components.http import HomeAssistantView from homeassistant.components.http.const import KEY_REAL_IP from homeassistant.components.http.data_validator import RequestDataValidator -_LOGGER = logging.getLogger(__name__) +from .const import ATTR_USERNAME, ATTR_PASSWORD, ATTR_ADDON -ATTR_USERNAME = 'username' -ATTR_PASSWORD = 'password' +_LOGGER = logging.getLogger(__name__) SCHEMA_API_AUTH = vol.Schema({ vol.Required(ATTR_USERNAME): cv.string, vol.Required(ATTR_PASSWORD): cv.string, -}) + vol.Required(ATTR_ADDON): cv.string, +}, extra=vol.ALLOW_EXTRA) @callback diff --git a/homeassistant/components/hassio/const.py b/homeassistant/components/hassio/const.py new file mode 100644 index 00000000000..c539169ebe3 --- /dev/null +++ b/homeassistant/components/hassio/const.py @@ -0,0 +1,12 @@ +"""Hass.io const variables.""" + +ATTR_DISCOVERY = 'discovery' +ATTR_ADDON = 'addon' +ATTR_NAME = 'name' +ATTR_SERVICE = 'service' +ATTR_CONFIG = 'config' +ATTR_UUID = 'uuid' +ATTR_USERNAME = 'username' +ATTR_PASSWORD = 'password' + +X_HASSIO = 'X-HASSIO-KEY' diff --git a/homeassistant/components/hassio/discovery.py b/homeassistant/components/hassio/discovery.py index 3c5242607c1..4c7c5a6597f 100644 --- a/homeassistant/components/hassio/discovery.py +++ b/homeassistant/components/hassio/discovery.py @@ -10,16 +10,12 @@ from homeassistant.const import EVENT_HOMEASSISTANT_START from homeassistant.components.http import HomeAssistantView from .handler import HassioAPIError +from .const import ( + ATTR_DISCOVERY, ATTR_ADDON, ATTR_NAME, ATTR_SERVICE, ATTR_CONFIG, + ATTR_UUID) _LOGGER = logging.getLogger(__name__) -ATTR_DISCOVERY = 'discovery' -ATTR_ADDON = 'addon' -ATTR_NAME = 'name' -ATTR_SERVICE = 'service' -ATTR_CONFIG = 'config' -ATTR_UUID = 'uuid' - @callback def async_setup_discovery(hass, hassio, config): diff --git a/homeassistant/components/hassio/handler.py b/homeassistant/components/hassio/handler.py index 7c450b49bcc..91019776eeb 100644 --- a/homeassistant/components/hassio/handler.py +++ b/homeassistant/components/hassio/handler.py @@ -16,9 +16,9 @@ from homeassistant.components.http import ( CONF_SSL_CERTIFICATE) from homeassistant.const import CONF_TIME_ZONE, SERVER_PORT -_LOGGER = logging.getLogger(__name__) +from .const import X_HASSIO -X_HASSIO = 'X-HASSIO-KEY' +_LOGGER = logging.getLogger(__name__) class HassioAPIError(RuntimeError): diff --git a/homeassistant/components/hassio/http.py b/homeassistant/components/hassio/http.py index abd1c16ba8b..c3bd18fa9bb 100644 --- a/homeassistant/components/hassio/http.py +++ b/homeassistant/components/hassio/http.py @@ -18,9 +18,10 @@ from aiohttp.web_exceptions import HTTPBadGateway from homeassistant.const import CONTENT_TYPE_TEXT_PLAIN from homeassistant.components.http import KEY_AUTHENTICATED, HomeAssistantView +from .const import X_HASSIO + _LOGGER = logging.getLogger(__name__) -X_HASSIO = 'X-HASSIO-KEY' NO_TIMEOUT = re.compile( r'^(?:' diff --git a/tests/components/hassio/test_auth.py b/tests/components/hassio/test_auth.py index b3a6ae223f9..fdf3230dedc 100644 --- a/tests/components/hassio/test_auth.py +++ b/tests/components/hassio/test_auth.py @@ -19,7 +19,8 @@ async def test_login_success(hass, hassio_client): '/api/hassio_auth', json={ "username": "test", - "password": "123456" + "password": "123456", + "addon": "samba", }, headers={ HTTP_HEADER_HA_AUTH: API_PASSWORD @@ -42,7 +43,8 @@ async def test_login_error(hass, hassio_client): '/api/hassio_auth', json={ "username": "test", - "password": "123456" + "password": "123456", + "addon": "samba", }, headers={ HTTP_HEADER_HA_AUTH: API_PASSWORD @@ -83,7 +85,8 @@ async def test_login_no_username(hass, hassio_client): resp = await hassio_client.post( '/api/hassio_auth', json={ - "password": "123456" + "password": "123456", + "addon": "samba", }, headers={ HTTP_HEADER_HA_AUTH: API_PASSWORD @@ -93,3 +96,28 @@ async def test_login_no_username(hass, hassio_client): # Check we got right response assert resp.status == 400 assert not mock_login.called + + +async def test_login_success_extra(hass, hassio_client): + """Test auth with extra data.""" + await register_auth_provider(hass, {'type': 'homeassistant'}) + + with patch('homeassistant.auth.providers.homeassistant.' + 'HassAuthProvider.async_validate_login', + Mock(return_value=mock_coro())) as mock_login: + resp = await hassio_client.post( + '/api/hassio_auth', + json={ + "username": "test", + "password": "123456", + "addon": "samba", + "path": "/share", + }, + headers={ + HTTP_HEADER_HA_AUTH: API_PASSWORD + } + ) + + # Check we got right response + assert resp.status == 200 + mock_login.assert_called_with("test", "123456") From cd29b47924cf92c6fc760b8dd965647a634a8c6a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 12 Oct 2018 14:59:36 +0200 Subject: [PATCH 38/56] Bumped version to 0.80.0 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 737a2c10cff..d023591c828 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0b5' +PATCH_VERSION = '0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 49a9b61f6fb9535467ac9f31f65c26e881c199c3 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 14 Oct 2018 19:17:30 +0200 Subject: [PATCH 39/56] Update frontend to 20181014.0 --- homeassistant/components/frontend/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index c06f659573e..aa9406d9c62 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -24,7 +24,7 @@ from homeassistant.core import callback from homeassistant.helpers.translation import async_get_translations from homeassistant.loader import bind_hass -REQUIREMENTS = ['home-assistant-frontend==20181012.0'] +REQUIREMENTS = ['home-assistant-frontend==20181014.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log', diff --git a/requirements_all.txt b/requirements_all.txt index c91b4127880..6e117df7c0c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -458,7 +458,7 @@ hole==0.3.0 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181012.0 +home-assistant-frontend==20181014.0 # homeassistant.components.homekit_controller # homekit==0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 871714cc47d..bc30ce5d2d0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -90,7 +90,7 @@ hdate==0.6.3 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181012.0 +home-assistant-frontend==20181014.0 # homeassistant.components.homematicip_cloud homematicip==0.9.8 From 220054a6c3d3ec46fb3d9f4c5dc6f0bbb034464f Mon Sep 17 00:00:00 2001 From: Martin Berg <2682426+mbrrg@users.noreply.github.com> Date: Sat, 13 Oct 2018 10:30:49 +0200 Subject: [PATCH 40/56] Fix arm/disarm calls. (#17381) --- homeassistant/components/alarm_control_panel/spc.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/alarm_control_panel/spc.py b/homeassistant/components/alarm_control_panel/spc.py index b4c49d4d190..7adbb616774 100644 --- a/homeassistant/components/alarm_control_panel/spc.py +++ b/homeassistant/components/alarm_control_panel/spc.py @@ -85,19 +85,23 @@ class SpcAlarm(alarm.AlarmControlPanel): async def async_alarm_disarm(self, code=None): """Send disarm command.""" from pyspcwebgw.const import AreaMode - self._api.change_mode(area=self._area, new_mode=AreaMode.UNSET) + await self._api.change_mode(area=self._area, + new_mode=AreaMode.UNSET) async def async_alarm_arm_home(self, code=None): """Send arm home command.""" from pyspcwebgw.const import AreaMode - self._api.change_mode(area=self._area, new_mode=AreaMode.PART_SET_A) + await self._api.change_mode(area=self._area, + new_mode=AreaMode.PART_SET_A) async def async_alarm_arm_night(self, code=None): """Send arm home command.""" from pyspcwebgw.const import AreaMode - self._api.change_mode(area=self._area, new_mode=AreaMode.PART_SET_B) + await self._api.change_mode(area=self._area, + new_mode=AreaMode.PART_SET_B) async def async_alarm_arm_away(self, code=None): """Send arm away command.""" from pyspcwebgw.const import AreaMode - self._api.change_mode(area=self._area, new_mode=AreaMode.FULL_SET) + await self._api.change_mode(area=self._area, + new_mode=AreaMode.FULL_SET) From f92b392a24372af9c0646cd5de23166c2b1466d7 Mon Sep 17 00:00:00 2001 From: Tommy Jonsson Date: Sat, 13 Oct 2018 10:54:35 +0200 Subject: [PATCH 41/56] Fix hangout.send_message requiring data key (#17393) --- homeassistant/components/hangouts/hangouts_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/hangouts/hangouts_bot.py b/homeassistant/components/hangouts/hangouts_bot.py index 8747bff9ba7..bceedb1acfa 100644 --- a/homeassistant/components/hangouts/hangouts_bot.py +++ b/homeassistant/components/hangouts/hangouts_bot.py @@ -304,7 +304,7 @@ class HangoutsBot: """Handle the send_message service.""" await self._async_send_message(service.data[ATTR_MESSAGE], service.data[ATTR_TARGET], - service.data[ATTR_DATA]) + service.data.get(ATTR_DATA, {})) async def async_handle_update_users_and_conversations(self, _=None): """Handle the update_users_and_conversations service.""" From 80867cc9b7f9abd2f43cc5f8eb34d47b9b85c247 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 15 Oct 2018 10:31:49 +0200 Subject: [PATCH 42/56] Bugfix eventstream with EOF on end (#17465) --- homeassistant/components/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/api.py b/homeassistant/components/api.py index 0fbb4de39f1..cbe404537eb 100644 --- a/homeassistant/components/api.py +++ b/homeassistant/components/api.py @@ -141,6 +141,8 @@ class APIEventStream(HomeAssistantView): _LOGGER.debug("STREAM %s RESPONSE CLOSED", id(stop_obj)) unsub_stream() + return response + class APIConfigView(HomeAssistantView): """View to handle Configuration requests.""" From b5272f2bc70f2f70a27e93deb994e1a2fba41c96 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 15 Oct 2018 11:48:36 +0200 Subject: [PATCH 43/56] Fix websocket API (#17471) --- homeassistant/components/websocket_api/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/websocket_api/http.py b/homeassistant/components/websocket_api/http.py index 87f25c9b3ef..13be503a009 100644 --- a/homeassistant/components/websocket_api/http.py +++ b/homeassistant/components/websocket_api/http.py @@ -187,3 +187,5 @@ class WebSocketHandler: self._logger.debug("Disconnected") else: self._logger.warning("Disconnected: %s", disconnect_warn) + + return wsock From 708334c0c2bfdb64564b3335db0b28f56e4cb2e7 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 15 Oct 2018 15:31:12 +0200 Subject: [PATCH 44/56] Bumped version to 0.80.1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index d023591c828..377ecb68cd2 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '0' +PATCH_VERSION = '1' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From a27d49d022f5fd28637385b8cbf0a5865a88d59a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 17 Oct 2018 14:12:41 +0200 Subject: [PATCH 45/56] Update translations --- .../components/auth/.translations/uk.json | 9 +++++++ .../components/deconz/.translations/ru.json | 2 +- .../components/ifttt/.translations/cs.json | 11 ++++++++ .../components/ifttt/.translations/de.json | 2 +- .../components/ifttt/.translations/ko.json | 2 +- .../components/ifttt/.translations/ro.json | 10 +++++++ .../components/lifx/.translations/cs.json | 15 +++++++++++ .../components/lifx/.translations/de.json | 15 +++++++++++ .../components/lifx/.translations/hu.json | 10 +++++++ .../components/lifx/.translations/no.json | 15 +++++++++++ .../components/lifx/.translations/ro.json | 15 +++++++++++ .../components/mqtt/.translations/de.json | 2 +- .../components/mqtt/.translations/uk.json | 23 ++++++++++++++++ .../components/openuv/.translations/uk.json | 17 ++++++++++++ .../sensor/.translations/season.uk.json | 8 ++++++ .../simplisafe/.translations/ca.json | 19 +++++++++++++ .../simplisafe/.translations/cs.json | 18 +++++++++++++ .../simplisafe/.translations/de.json | 19 +++++++++++++ .../simplisafe/.translations/hu.json | 11 ++++++++ .../simplisafe/.translations/it.json | 19 +++++++++++++ .../simplisafe/.translations/ko.json | 19 +++++++++++++ .../simplisafe/.translations/lb.json | 19 +++++++++++++ .../simplisafe/.translations/no.json | 19 +++++++++++++ .../simplisafe/.translations/pl.json | 19 +++++++++++++ .../simplisafe/.translations/ro.json | 17 ++++++++++++ .../simplisafe/.translations/ru.json | 19 +++++++++++++ .../simplisafe/.translations/sl.json | 19 +++++++++++++ .../simplisafe/.translations/uk.json | 14 ++++++++++ .../simplisafe/.translations/zh-Hans.json | 19 +++++++++++++ .../simplisafe/.translations/zh-Hant.json | 19 +++++++++++++ .../components/smhi/.translations/cs.json | 19 +++++++++++++ .../components/smhi/.translations/de.json | 19 +++++++++++++ .../components/smhi/.translations/no.json | 19 +++++++++++++ .../components/smhi/.translations/ro.json | 18 +++++++++++++ .../components/tradfri/.translations/uk.json | 15 +++++++++++ .../components/unifi/.translations/ca.json | 26 ++++++++++++++++++ .../components/unifi/.translations/en.json | 26 ++++++++++++++++++ .../components/unifi/.translations/hu.json | 12 +++++++++ .../components/unifi/.translations/ko.json | 26 ++++++++++++++++++ .../components/unifi/.translations/lb.json | 26 ++++++++++++++++++ .../components/unifi/.translations/pl.json | 26 ++++++++++++++++++ .../components/unifi/.translations/ru.json | 25 +++++++++++++++++ .../components/unifi/.translations/sl.json | 26 ++++++++++++++++++ .../unifi/.translations/zh-Hant.json | 26 ++++++++++++++++++ .../components/upnp/.translations/cs.json | 13 +++++++++ .../components/upnp/.translations/no.json | 6 +++-- .../components/upnp/.translations/ro.json | 27 +++++++++++++++++++ .../upnp/.translations/zh-Hant.json | 2 +- .../components/zone/.translations/uk.json | 21 +++++++++++++++ .../components/zwave/.translations/cs.json | 22 +++++++++++++++ .../components/zwave/.translations/de.json | 22 +++++++++++++++ .../components/zwave/.translations/hu.json | 5 ++++ .../components/zwave/.translations/it.json | 15 +++++++++++ .../components/zwave/.translations/ko.json | 2 +- .../components/zwave/.translations/no.json | 22 +++++++++++++++ .../components/zwave/.translations/pl.json | 22 +++++++++++++++ .../components/zwave/.translations/ro.json | 22 +++++++++++++++ script/translations_download | 2 +- 58 files changed, 928 insertions(+), 9 deletions(-) create mode 100644 homeassistant/components/auth/.translations/uk.json create mode 100644 homeassistant/components/ifttt/.translations/cs.json create mode 100644 homeassistant/components/ifttt/.translations/ro.json create mode 100644 homeassistant/components/lifx/.translations/cs.json create mode 100644 homeassistant/components/lifx/.translations/de.json create mode 100644 homeassistant/components/lifx/.translations/hu.json create mode 100644 homeassistant/components/lifx/.translations/no.json create mode 100644 homeassistant/components/lifx/.translations/ro.json create mode 100644 homeassistant/components/mqtt/.translations/uk.json create mode 100644 homeassistant/components/openuv/.translations/uk.json create mode 100644 homeassistant/components/sensor/.translations/season.uk.json create mode 100644 homeassistant/components/simplisafe/.translations/ca.json create mode 100644 homeassistant/components/simplisafe/.translations/cs.json create mode 100644 homeassistant/components/simplisafe/.translations/de.json create mode 100644 homeassistant/components/simplisafe/.translations/hu.json create mode 100644 homeassistant/components/simplisafe/.translations/it.json create mode 100644 homeassistant/components/simplisafe/.translations/ko.json create mode 100644 homeassistant/components/simplisafe/.translations/lb.json create mode 100644 homeassistant/components/simplisafe/.translations/no.json create mode 100644 homeassistant/components/simplisafe/.translations/pl.json create mode 100644 homeassistant/components/simplisafe/.translations/ro.json create mode 100644 homeassistant/components/simplisafe/.translations/ru.json create mode 100644 homeassistant/components/simplisafe/.translations/sl.json create mode 100644 homeassistant/components/simplisafe/.translations/uk.json create mode 100644 homeassistant/components/simplisafe/.translations/zh-Hans.json create mode 100644 homeassistant/components/simplisafe/.translations/zh-Hant.json create mode 100644 homeassistant/components/smhi/.translations/cs.json create mode 100644 homeassistant/components/smhi/.translations/de.json create mode 100644 homeassistant/components/smhi/.translations/no.json create mode 100644 homeassistant/components/smhi/.translations/ro.json create mode 100644 homeassistant/components/tradfri/.translations/uk.json create mode 100644 homeassistant/components/unifi/.translations/ca.json create mode 100644 homeassistant/components/unifi/.translations/en.json create mode 100644 homeassistant/components/unifi/.translations/hu.json create mode 100644 homeassistant/components/unifi/.translations/ko.json create mode 100644 homeassistant/components/unifi/.translations/lb.json create mode 100644 homeassistant/components/unifi/.translations/pl.json create mode 100644 homeassistant/components/unifi/.translations/ru.json create mode 100644 homeassistant/components/unifi/.translations/sl.json create mode 100644 homeassistant/components/unifi/.translations/zh-Hant.json create mode 100644 homeassistant/components/upnp/.translations/cs.json create mode 100644 homeassistant/components/upnp/.translations/ro.json create mode 100644 homeassistant/components/zone/.translations/uk.json create mode 100644 homeassistant/components/zwave/.translations/cs.json create mode 100644 homeassistant/components/zwave/.translations/de.json create mode 100644 homeassistant/components/zwave/.translations/hu.json create mode 100644 homeassistant/components/zwave/.translations/it.json create mode 100644 homeassistant/components/zwave/.translations/no.json create mode 100644 homeassistant/components/zwave/.translations/pl.json create mode 100644 homeassistant/components/zwave/.translations/ro.json diff --git a/homeassistant/components/auth/.translations/uk.json b/homeassistant/components/auth/.translations/uk.json new file mode 100644 index 00000000000..3d4d9a5b151 --- /dev/null +++ b/homeassistant/components/auth/.translations/uk.json @@ -0,0 +1,9 @@ +{ + "mfa_setup": { + "notify": { + "error": { + "invalid_code": "\u041d\u0435\u0432\u0456\u0440\u043d\u0438\u0439 \u043a\u043e\u0434, \u0441\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0449\u0435 \u0440\u0430\u0437." + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/deconz/.translations/ru.json b/homeassistant/components/deconz/.translations/ru.json index 4cbc9594ead..a9b66314f31 100644 --- a/homeassistant/components/deconz/.translations/ru.json +++ b/homeassistant/components/deconz/.translations/ru.json @@ -28,6 +28,6 @@ "title": "\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f deCONZ" } }, - "title": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0448\u043b\u044e\u0437 deCONZ" + "title": "deCONZ" } } \ No newline at end of file diff --git a/homeassistant/components/ifttt/.translations/cs.json b/homeassistant/components/ifttt/.translations/cs.json new file mode 100644 index 00000000000..abbbd9ff890 --- /dev/null +++ b/homeassistant/components/ifttt/.translations/cs.json @@ -0,0 +1,11 @@ +{ + "config": { + "step": { + "user": { + "description": "Opravdu chcete nastavit IFTTT?", + "title": "Nastavte applet IFTTT Webhook" + } + }, + "title": "IFTTT" + } +} \ No newline at end of file diff --git a/homeassistant/components/ifttt/.translations/de.json b/homeassistant/components/ifttt/.translations/de.json index b8fdc819753..a5b66156389 100644 --- a/homeassistant/components/ifttt/.translations/de.json +++ b/homeassistant/components/ifttt/.translations/de.json @@ -5,7 +5,7 @@ "one_instance_allowed": "Nur eine einzige Instanz ist notwendig." }, "create_entry": { - "default": "Um Ereignisse an den Home Assistant zu senden, m\u00fcssen Sie die Aktion \"Eine Webanforderung erstellen\" aus dem [IFTTT Webhook Applet]({applet_url}) ausw\u00e4hlen.\n\nF\u00fcllen Sie folgende Informationen aus: \n- URL: `{webhook_url}`\n- Methode: POST\n- Inhaltstyp: application/json\n\nIn der Dokumentation ({docs_url}) finden Sie Informationen zur Konfiguration der Automation eingehender Daten." + "default": "Um Ereignisse an Home Assistant zu senden, musst du die Aktion \"Eine Webanforderung erstellen\" aus dem [IFTTT Webhook Applet]({applet_url}) ausw\u00e4hlen.\n\nF\u00fclle folgende Informationen aus: \n- URL: `{webhook_url}`\n- Methode: POST\n- Inhaltstyp: application/json\n\nIn der Dokumentation ({docs_url}) findest du Informationen zur Konfiguration der Automation eingehender Daten." }, "step": { "user": { diff --git a/homeassistant/components/ifttt/.translations/ko.json b/homeassistant/components/ifttt/.translations/ko.json index 832123d5065..57ad8037753 100644 --- a/homeassistant/components/ifttt/.translations/ko.json +++ b/homeassistant/components/ifttt/.translations/ko.json @@ -5,7 +5,7 @@ "one_instance_allowed": "\ud558\ub098\uc758 \uc778\uc2a4\ud134\uc2a4\ub9cc \ud544\uc694\ud569\ub2c8\ub2e4." }, "create_entry": { - "default": "Home Assistant \ub85c \uc774\ubca4\ud2b8\ub97c \ubcf4\ub0b4\uae30 \uc704\ud574\uc11c\ub294 [IFTTT Webhook \uc560\ud50c\ub9bf]({applet_url}) \uc5d0\uc11c \"Make a web request\" \ub97c \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. \n\n \ub2e4\uc74c\uc758 \uc815\ubcf4\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694.\n\n - URL: `{webhook_url}` \n - Method: POST \n - Content Type: application/json \n\n Home Assistant \ub85c \ub4e4\uc5b4\uc624\ub294 \ub370\uc774\ud130\ub97c \ucc98\ub9ac\ud558\uae30 \uc704\ud55c \uc790\ub3d9\ud654\ub97c \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc740 [\ubcf8 \ubb38\uc11c]({docs_url}) \ub97c \ucc38\uc870\ud574 \uc8fc\uc138\uc694." + "default": "Home Assistant \ub85c \uc774\ubca4\ud2b8\ub97c \ubcf4\ub0b4\uae30 \uc704\ud574\uc11c\ub294 [IFTTT Webhook \uc560\ud50c\ub9bf]({applet_url}) \uc5d0\uc11c \"Make a web request\" \ub97c \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. \n\n \ub2e4\uc74c\uc758 \uc815\ubcf4\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694.\n\n - URL: `{webhook_url}` \n - Method: POST \n - Content Type: application/json \n\n Home Assistant \ub85c \ub4e4\uc5b4\uc624\ub294 \ub370\uc774\ud130\ub97c \ucc98\ub9ac\ud558\uae30 \uc704\ud55c \uc790\ub3d9\ud654\ub97c \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc740 [\uc548\ub0b4]({docs_url})\ub97c \ucc38\uc870\ud574 \uc8fc\uc138\uc694." }, "step": { "user": { diff --git a/homeassistant/components/ifttt/.translations/ro.json b/homeassistant/components/ifttt/.translations/ro.json new file mode 100644 index 00000000000..03c77426671 --- /dev/null +++ b/homeassistant/components/ifttt/.translations/ro.json @@ -0,0 +1,10 @@ +{ + "config": { + "step": { + "user": { + "description": "Sigur dori\u021bi s\u0103 configura\u021bi IFTTT?" + } + }, + "title": "IFTTT" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/cs.json b/homeassistant/components/lifx/.translations/cs.json new file mode 100644 index 00000000000..d83ee576768 --- /dev/null +++ b/homeassistant/components/lifx/.translations/cs.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "V s\u00edti nejsou nalezena \u017e\u00e1dn\u00e1 za\u0159\u00edzen\u00ed LIFX.", + "single_instance_allowed": "K dispozici je pouze jedna konfigurace LIFX." + }, + "step": { + "confirm": { + "description": "Chcete nastavit LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/de.json b/homeassistant/components/lifx/.translations/de.json new file mode 100644 index 00000000000..2553e2d5e86 --- /dev/null +++ b/homeassistant/components/lifx/.translations/de.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Keine LIFX Ger\u00e4te im Netzwerk gefunden.", + "single_instance_allowed": "Nur eine einzige Konfiguration von LIFX ist zul\u00e4ssig." + }, + "step": { + "confirm": { + "description": "M\u00f6chtest du LIFX einrichten?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/hu.json b/homeassistant/components/lifx/.translations/hu.json new file mode 100644 index 00000000000..c78905b09c8 --- /dev/null +++ b/homeassistant/components/lifx/.translations/hu.json @@ -0,0 +1,10 @@ +{ + "config": { + "step": { + "confirm": { + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/no.json b/homeassistant/components/lifx/.translations/no.json new file mode 100644 index 00000000000..63080a30ff1 --- /dev/null +++ b/homeassistant/components/lifx/.translations/no.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Ingen LIFX-enheter funnet p\u00e5 nettverket.", + "single_instance_allowed": "Kun en enkelt konfigurasjon av LIFX er mulig." + }, + "step": { + "confirm": { + "description": "\u00d8nsker du \u00e5 sette opp LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/lifx/.translations/ro.json b/homeassistant/components/lifx/.translations/ro.json new file mode 100644 index 00000000000..12827082104 --- /dev/null +++ b/homeassistant/components/lifx/.translations/ro.json @@ -0,0 +1,15 @@ +{ + "config": { + "abort": { + "no_devices_found": "Nu exist\u0103 dispozitive LIFX g\u0103site \u00een re\u021bea.", + "single_instance_allowed": "Doar o singur\u0103 configura\u021bie de LIFX este posibil\u0103." + }, + "step": { + "confirm": { + "description": "Dori\u021bi s\u0103 configura\u021bi LIFX?", + "title": "LIFX" + } + }, + "title": "LIFX" + } +} \ No newline at end of file diff --git a/homeassistant/components/mqtt/.translations/de.json b/homeassistant/components/mqtt/.translations/de.json index 1c895136d9d..d95c43cc618 100644 --- a/homeassistant/components/mqtt/.translations/de.json +++ b/homeassistant/components/mqtt/.translations/de.json @@ -22,7 +22,7 @@ "data": { "discovery": "Suche aktivieren" }, - "description": "M\u00f6chten Sie den Home Assistant so konfigurieren, dass er eine Verbindung mit dem MQTT-Broker herstellt, der vom Add-on hass.io {addon} bereitgestellt wird?", + "description": "M\u00f6chtest du Home Assistant so konfigurieren, dass er eine Verbindung mit dem MQTT-Broker herstellt, der vom Add-on hass.io {addon} bereitgestellt wird?", "title": "MQTT Broker per Hass.io add-on" } }, diff --git a/homeassistant/components/mqtt/.translations/uk.json b/homeassistant/components/mqtt/.translations/uk.json new file mode 100644 index 00000000000..e747e774c45 --- /dev/null +++ b/homeassistant/components/mqtt/.translations/uk.json @@ -0,0 +1,23 @@ +{ + "config": { + "error": { + "cannot_connect": "\u041d\u0435\u043c\u043e\u0436\u043b\u0438\u0432\u043e \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0438\u0441\u044f \u0434\u043e \u0431\u0440\u043e\u043a\u0435\u0440\u0430." + }, + "step": { + "broker": { + "data": { + "broker": "\u0411\u0440\u043e\u043a\u0435\u0440", + "discovery": "\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u043f\u043e\u0448\u0443\u043a", + "password": "\u041f\u0430\u0440\u043e\u043b\u044c", + "port": "\u041f\u043e\u0440\u0442", + "username": "\u0406\u043c'\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430" + } + }, + "hassio_confirm": { + "data": { + "discovery": "\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u043f\u043e\u0448\u0443\u043a" + } + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/openuv/.translations/uk.json b/homeassistant/components/openuv/.translations/uk.json new file mode 100644 index 00000000000..144ae8b8d36 --- /dev/null +++ b/homeassistant/components/openuv/.translations/uk.json @@ -0,0 +1,17 @@ +{ + "config": { + "error": { + "identifier_exists": "\u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0438 \u0432\u0436\u0435 \u0437\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u043e\u0432\u0430\u043d\u0456" + }, + "step": { + "user": { + "data": { + "elevation": "\u0412\u0438\u0441\u043e\u0442\u0430", + "latitude": "\u0428\u0438\u0440\u043e\u0442\u0430", + "longitude": "\u0414\u043e\u0432\u0433\u043e\u0442\u0430" + }, + "title": "\u0417\u0430\u043f\u043e\u0432\u043d\u0456\u0442\u044c \u0432\u0430\u0448\u0443 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e" + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/sensor/.translations/season.uk.json b/homeassistant/components/sensor/.translations/season.uk.json new file mode 100644 index 00000000000..766e59a43da --- /dev/null +++ b/homeassistant/components/sensor/.translations/season.uk.json @@ -0,0 +1,8 @@ +{ + "state": { + "autumn": "\u041e\u0441\u0456\u043d\u044c", + "spring": "\u0412\u0435\u0441\u043d\u0430", + "summer": "\u041b\u0456\u0442\u043e", + "winter": "\u0417\u0438\u043c\u0430" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/ca.json b/homeassistant/components/simplisafe/.translations/ca.json new file mode 100644 index 00000000000..1662162c439 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/ca.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Aquest compte ja est\u00e0 registrat", + "invalid_credentials": "Credencials inv\u00e0lides" + }, + "step": { + "user": { + "data": { + "code": "Codi (pel Home Assistant)", + "password": "Contrasenya", + "username": "Correu electr\u00f2nic" + }, + "title": "Introdu\u00efu la vostra informaci\u00f3" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/cs.json b/homeassistant/components/simplisafe/.translations/cs.json new file mode 100644 index 00000000000..0dd9912de0d --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/cs.json @@ -0,0 +1,18 @@ +{ + "config": { + "error": { + "identifier_exists": "\u00da\u010det je ji\u017e zaregistrov\u00e1n", + "invalid_credentials": "Neplatn\u00e9 p\u0159ihla\u0161ovac\u00ed \u00fadaje" + }, + "step": { + "user": { + "data": { + "code": "K\u00f3d (pro Home Assistant)", + "password": "Heslo", + "username": "E-mailov\u00e1 adresa" + }, + "title": "Vypl\u0148te va\u0161e \u00fadaje" + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/de.json b/homeassistant/components/simplisafe/.translations/de.json new file mode 100644 index 00000000000..ee7eaecc852 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/de.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Konto bereits registriert", + "invalid_credentials": "Ung\u00fcltige Anmeldeinformationen" + }, + "step": { + "user": { + "data": { + "code": "Code (f\u00fcr Home Assistant)", + "password": "Passwort", + "username": "E-Mail-Adresse" + }, + "title": "Gebe deine Informationen ein" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/hu.json b/homeassistant/components/simplisafe/.translations/hu.json new file mode 100644 index 00000000000..ff2c2fc87b5 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/hu.json @@ -0,0 +1,11 @@ +{ + "config": { + "step": { + "user": { + "data": { + "password": "Jelsz\u00f3" + } + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/it.json b/homeassistant/components/simplisafe/.translations/it.json new file mode 100644 index 00000000000..134bfae3668 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/it.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Account gi\u00e0 registrato", + "invalid_credentials": "Credenziali non valide" + }, + "step": { + "user": { + "data": { + "code": "Codice (Home Assistant)", + "password": "Password", + "username": "Indirizzo email" + }, + "title": "Inserisci i tuoi dati" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/ko.json b/homeassistant/components/simplisafe/.translations/ko.json new file mode 100644 index 00000000000..eca099ed79d --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/ko.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "\uacc4\uc815\uc774 \uc774\ubbf8 \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4", + "invalid_credentials": "\uc774\uba54\uc77c \uc8fc\uc18c \ud639\uc740 \ube44\ubc00\ubc88\ud638\uac00 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4" + }, + "step": { + "user": { + "data": { + "code": "\ucf54\ub4dc (Home Assistant \uc6a9)", + "password": "\ube44\ubc00\ubc88\ud638", + "username": "\uc774\uba54\uc77c \uc8fc\uc18c" + }, + "title": "\uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/lb.json b/homeassistant/components/simplisafe/.translations/lb.json new file mode 100644 index 00000000000..94c451a49db --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/lb.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Konto ass scho registr\u00e9iert", + "invalid_credentials": "Ong\u00eblteg Login Informatioune" + }, + "step": { + "user": { + "data": { + "code": "Code (fir Home Assistant)", + "password": "Passwuert", + "username": "E-Mail Adress" + }, + "title": "F\u00ebllt \u00e4r Informatiounen aus" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/no.json b/homeassistant/components/simplisafe/.translations/no.json new file mode 100644 index 00000000000..7c28209514e --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/no.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Konto er allerede registrert", + "invalid_credentials": "Ugyldig legitimasjon" + }, + "step": { + "user": { + "data": { + "code": "Kode (for Home Assistant)", + "password": "Passord", + "username": "E-postadresse" + }, + "title": "Fyll ut informasjonen din" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/pl.json b/homeassistant/components/simplisafe/.translations/pl.json new file mode 100644 index 00000000000..0b83ba8cbed --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/pl.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Konto zosta\u0142o ju\u017c zarejestrowane", + "invalid_credentials": "Nieprawid\u0142owe po\u015bwiadczenia" + }, + "step": { + "user": { + "data": { + "code": "Kod (dla Home Assistant'a)", + "password": "Has\u0142o", + "username": "Adres e-mail" + }, + "title": "Wprowad\u017a swoje dane" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/ro.json b/homeassistant/components/simplisafe/.translations/ro.json new file mode 100644 index 00000000000..7046b0992b1 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/ro.json @@ -0,0 +1,17 @@ +{ + "config": { + "error": { + "identifier_exists": "Contul este deja \u00eenregistrat", + "invalid_credentials": "Credentiale invalide" + }, + "step": { + "user": { + "data": { + "password": "Parola", + "username": "Adresa de email" + }, + "title": "Completa\u021bi informa\u021biile dvs." + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/ru.json b/homeassistant/components/simplisafe/.translations/ru.json new file mode 100644 index 00000000000..4ddf405e1ed --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/ru.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "\u0423\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430", + "invalid_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435" + }, + "step": { + "user": { + "data": { + "code": "\u041a\u043e\u0434 (\u0434\u043b\u044f Home Assistant)", + "password": "\u041f\u0430\u0440\u043e\u043b\u044c", + "username": "\u0410\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b" + }, + "title": "\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/sl.json b/homeassistant/components/simplisafe/.translations/sl.json new file mode 100644 index 00000000000..7fe0adad2df --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/sl.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "Ra\u010dun je \u017ee registriran", + "invalid_credentials": "Neveljavne poverilnice" + }, + "step": { + "user": { + "data": { + "code": "Koda (za Home Assistant)", + "password": "Geslo", + "username": "E-po\u0161tni naslov" + }, + "title": "Izpolnite svoje podatke" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/uk.json b/homeassistant/components/simplisafe/.translations/uk.json new file mode 100644 index 00000000000..4dee0ed5f4d --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/uk.json @@ -0,0 +1,14 @@ +{ + "config": { + "step": { + "user": { + "data": { + "code": "\u041a\u043e\u0434 (\u0434\u043b\u044f Home Assistant)", + "password": "\u041f\u0430\u0440\u043e\u043b\u044c", + "username": "\u0410\u0434\u0440\u0435\u0441\u0430 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438" + }, + "title": "\u0417\u0430\u043f\u043e\u0432\u043d\u0456\u0442\u044c \u0432\u0430\u0448\u0443 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e" + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/zh-Hans.json b/homeassistant/components/simplisafe/.translations/zh-Hans.json new file mode 100644 index 00000000000..2316f5c7454 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/zh-Hans.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "\u5e10\u6237\u5df2\u6ce8\u518c", + "invalid_credentials": "\u65e0\u6548\u7684\u8eab\u4efd\u8ba4\u8bc1" + }, + "step": { + "user": { + "data": { + "code": "\u4ee3\u7801\uff08\u7528\u4e8eHome Assistant\uff09", + "password": "\u5bc6\u7801", + "username": "\u7535\u5b50\u90ae\u4ef6\u5730\u5740" + }, + "title": "\u586b\u5199\u60a8\u7684\u4fe1\u606f" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/simplisafe/.translations/zh-Hant.json b/homeassistant/components/simplisafe/.translations/zh-Hant.json new file mode 100644 index 00000000000..bd0b2c6f3d6 --- /dev/null +++ b/homeassistant/components/simplisafe/.translations/zh-Hant.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "identifier_exists": "\u5e33\u865f\u5df2\u8a3b\u518a", + "invalid_credentials": "\u6191\u8b49\u7121\u6548" + }, + "step": { + "user": { + "data": { + "code": "\u9a57\u8b49\u78bc\uff08Home Assistant \u7528\uff09", + "password": "\u5bc6\u78bc", + "username": "\u96fb\u5b50\u90f5\u4ef6\u5730\u5740" + }, + "title": "\u586b\u5beb\u8cc7\u8a0a" + } + }, + "title": "SimpliSafe" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/cs.json b/homeassistant/components/smhi/.translations/cs.json new file mode 100644 index 00000000000..356603c9cf8 --- /dev/null +++ b/homeassistant/components/smhi/.translations/cs.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "N\u00e1zev ji\u017e existuje", + "wrong_location": "Lokalita pouze pro \u0160v\u00e9dsko" + }, + "step": { + "user": { + "data": { + "latitude": "Zem\u011bpisn\u00e1 \u0161\u00ed\u0159ka", + "longitude": "Zem\u011bpisn\u00e1 d\u00e9lka", + "name": "N\u00e1zev" + }, + "title": "Lokalita ve \u0160v\u00e9dsku" + } + }, + "title": "\u0160v\u00e9dsk\u00e1 meteorologick\u00e1 slu\u017eba (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/de.json b/homeassistant/components/smhi/.translations/de.json new file mode 100644 index 00000000000..7c41731988c --- /dev/null +++ b/homeassistant/components/smhi/.translations/de.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Name existiert bereits", + "wrong_location": "Standort nur in Schweden" + }, + "step": { + "user": { + "data": { + "latitude": "Breitengrad", + "longitude": "L\u00e4ngengrad", + "name": "Name" + }, + "title": "Standort in Schweden" + } + }, + "title": "Schwedischer Wetterdienst (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/no.json b/homeassistant/components/smhi/.translations/no.json new file mode 100644 index 00000000000..19c90f8ec5c --- /dev/null +++ b/homeassistant/components/smhi/.translations/no.json @@ -0,0 +1,19 @@ +{ + "config": { + "error": { + "name_exists": "Navnet eksisterer allerede", + "wrong_location": "Bare plassering i Sverige" + }, + "step": { + "user": { + "data": { + "latitude": "Breddegrad", + "longitude": "Lengdegrad", + "name": "Navn" + }, + "title": "Plassering i Sverige" + } + }, + "title": "Sveriges Meteorologiske og Hydrologiske Institut (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/smhi/.translations/ro.json b/homeassistant/components/smhi/.translations/ro.json new file mode 100644 index 00000000000..6fe28787655 --- /dev/null +++ b/homeassistant/components/smhi/.translations/ro.json @@ -0,0 +1,18 @@ +{ + "config": { + "error": { + "name_exists": "Numele exist\u0103 deja" + }, + "step": { + "user": { + "data": { + "latitude": "Latitudine", + "longitude": "Longitudine", + "name": "Nume" + }, + "title": "Loca\u021bie \u00een Suedia" + } + }, + "title": "Serviciul meteorologic suedez (SMHI)" + } +} \ No newline at end of file diff --git a/homeassistant/components/tradfri/.translations/uk.json b/homeassistant/components/tradfri/.translations/uk.json new file mode 100644 index 00000000000..a163a4680e3 --- /dev/null +++ b/homeassistant/components/tradfri/.translations/uk.json @@ -0,0 +1,15 @@ +{ + "config": { + "error": { + "cannot_connect": "\u041d\u0435\u043c\u043e\u0436\u043b\u0438\u0432\u043e \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0438\u0441\u044f \u0434\u043e \u0448\u043b\u044e\u0437\u0443." + }, + "step": { + "auth": { + "data": { + "security_code": "\u041a\u043e\u0434 \u0431\u0435\u0437\u043f\u0435\u043a\u0438" + }, + "title": "\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u043a\u043e\u0434 \u0431\u0435\u0437\u043f\u0435\u043a\u0438" + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/ca.json b/homeassistant/components/unifi/.translations/ca.json new file mode 100644 index 00000000000..77d859627dc --- /dev/null +++ b/homeassistant/components/unifi/.translations/ca.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "El lloc del controlador ja est\u00e0 configurat", + "user_privilege": "L'usuari ha de ser administrador" + }, + "error": { + "faulty_credentials": "Credencials d'usuari incorrectes", + "service_unavailable": "Servei no disponible" + }, + "step": { + "user": { + "data": { + "host": "Amfitri\u00f3", + "password": "Contrasenya", + "port": "Port", + "site": "ID del lloc", + "username": "Nom d'usuari", + "verify_ssl": "El controlador est\u00e0 utilitzant un certificat adequat" + }, + "title": "Configura el controlador UniFi" + } + }, + "title": "Controlador UniFi" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/en.json b/homeassistant/components/unifi/.translations/en.json new file mode 100644 index 00000000000..3686148fdb6 --- /dev/null +++ b/homeassistant/components/unifi/.translations/en.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "Controller site is already configured", + "user_privilege": "User needs to be administrator" + }, + "error": { + "faulty_credentials": "Bad user credentials", + "service_unavailable": "No service available" + }, + "step": { + "user": { + "data": { + "host": "Host", + "password": "Password", + "port": "Port", + "site": "Site ID", + "username": "User name", + "verify_ssl": "Controller using proper certificate" + }, + "title": "Set up UniFi Controller" + } + }, + "title": "UniFi Controller" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/hu.json b/homeassistant/components/unifi/.translations/hu.json new file mode 100644 index 00000000000..f5827c47353 --- /dev/null +++ b/homeassistant/components/unifi/.translations/hu.json @@ -0,0 +1,12 @@ +{ + "config": { + "step": { + "user": { + "data": { + "password": "Jelsz\u00f3", + "port": "Port" + } + } + } + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/ko.json b/homeassistant/components/unifi/.translations/ko.json new file mode 100644 index 00000000000..431d6bbf5e6 --- /dev/null +++ b/homeassistant/components/unifi/.translations/ko.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "\ucee8\ud2b8\ub864\ub7ec \uc0ac\uc774\ud2b8\uac00 \uc774\ubbf8 \uad6c\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4", + "user_privilege": "\uc0ac\uc6a9\uc790\ub294 \uad00\ub9ac\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4" + }, + "error": { + "faulty_credentials": "\uc0ac\uc6a9\uc790 \uc790\uaca9\uc99d\uba85\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4", + "service_unavailable": "\uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 \uc11c\ube44\uc2a4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4" + }, + "step": { + "user": { + "data": { + "host": "\ud638\uc2a4\ud2b8", + "password": "\ube44\ubc00\ubc88\ud638", + "port": "\ud3ec\ud2b8", + "site": "\uc0ac\uc774\ud2b8 ID", + "username": "\uc0ac\uc6a9\uc790 \uc774\ub984", + "verify_ssl": "\uc62c\ubc14\ub978 \uc778\uc99d\uc11c\ub97c \uc0ac\uc6a9\ud558\ub294 \ucee8\ud2b8\ub864\ub7ec" + }, + "title": "UniFi \ucee8\ud2b8\ub864\ub7ec \uc124\uc815" + } + }, + "title": "UniFi \ucee8\ud2b8\ub864\ub7ec" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/lb.json b/homeassistant/components/unifi/.translations/lb.json new file mode 100644 index 00000000000..3bef273b83e --- /dev/null +++ b/homeassistant/components/unifi/.translations/lb.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "Kontroller Site ass scho konfigur\u00e9iert", + "user_privilege": "Benotzer muss een Administrator sinn" + }, + "error": { + "faulty_credentials": "Ong\u00eblteg Login Informatioune", + "service_unavailable": "Keen Service disponibel" + }, + "step": { + "user": { + "data": { + "host": "Host", + "password": "Passwuert", + "port": "Port", + "site": "Site ID", + "username": "Benotzer", + "verify_ssl": "Kontroller benotzt g\u00ebltegen Zertifikat" + }, + "title": "Unifi Kontroller ariichten" + } + }, + "title": "Unifi Kontroller" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/pl.json b/homeassistant/components/unifi/.translations/pl.json new file mode 100644 index 00000000000..f2f8082ac76 --- /dev/null +++ b/homeassistant/components/unifi/.translations/pl.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "Witryna kontrolera jest ju\u017c skonfigurowana", + "user_privilege": "U\u017cytkownik musi by\u0107 administratorem" + }, + "error": { + "faulty_credentials": "B\u0142\u0119dne dane uwierzytelniaj\u0105ce", + "service_unavailable": "Brak dost\u0119pnych us\u0142ug" + }, + "step": { + "user": { + "data": { + "host": "Host", + "password": "Has\u0142o", + "port": "Port", + "site": "Identyfikator witryny", + "username": "Nazwa u\u017cytkownika", + "verify_ssl": "Kontroler u\u017cywa prawid\u0142owego certyfikatu" + }, + "title": "Skonfiguruj kontroler UniFi" + } + }, + "title": "Kontroler UniFi" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/ru.json b/homeassistant/components/unifi/.translations/ru.json new file mode 100644 index 00000000000..908c1c5d0c5 --- /dev/null +++ b/homeassistant/components/unifi/.translations/ru.json @@ -0,0 +1,25 @@ +{ + "config": { + "abort": { + "already_configured": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.", + "user_privilege": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c" + }, + "error": { + "faulty_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435", + "service_unavailable": "\u0421\u043b\u0443\u0436\u0431\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430" + }, + "step": { + "user": { + "data": { + "host": "\u0425\u043e\u0441\u0442", + "password": "\u041f\u0430\u0440\u043e\u043b\u044c", + "port": "\u041f\u043e\u0440\u0442", + "site": "ID \u0441\u0430\u0439\u0442\u0430", + "username": "\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f" + }, + "title": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 UniFi Controller" + } + }, + "title": "UniFi Controller" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/sl.json b/homeassistant/components/unifi/.translations/sl.json new file mode 100644 index 00000000000..7543542abbf --- /dev/null +++ b/homeassistant/components/unifi/.translations/sl.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "Nadzornik je \u017ee konfiguriran", + "user_privilege": "Uporabnik mora biti skrbnik" + }, + "error": { + "faulty_credentials": "Napa\u010dni uporabni\u0161ki podatki", + "service_unavailable": "Nobena storitev ni na voljo" + }, + "step": { + "user": { + "data": { + "host": "Gostitelj", + "password": "Geslo", + "port": "Vrata", + "site": "Mesto ID", + "username": "Uporabni\u0161ko ime", + "verify_ssl": "Kontroler uporablja ustrezen certifikat" + }, + "title": "Nastavi UniFi Controller" + } + }, + "title": "UniFi Krmilnik" + } +} \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/zh-Hant.json b/homeassistant/components/unifi/.translations/zh-Hant.json new file mode 100644 index 00000000000..e506c582cb7 --- /dev/null +++ b/homeassistant/components/unifi/.translations/zh-Hant.json @@ -0,0 +1,26 @@ +{ + "config": { + "abort": { + "already_configured": "\u63a7\u5236\u5668\u4f4d\u5740\u5df2\u7d93\u8a2d\u5b9a", + "user_privilege": "\u4f7f\u7528\u8005\u5fc5\u9808\u70ba\u7ba1\u7406\u54e1\u8eab\u4efd" + }, + "error": { + "faulty_credentials": "\u4f7f\u7528\u8005\u6191\u8b49\u7121\u6548", + "service_unavailable": "\u7121\u670d\u52d9\u53ef\u7528" + }, + "step": { + "user": { + "data": { + "host": "\u4e3b\u6a5f\u7aef", + "password": "\u5bc6\u78bc", + "port": "\u901a\u8a0a\u57e0", + "site": "\u4f4d\u5740 ID", + "username": "\u4f7f\u7528\u8005\u540d\u7a31", + "verify_ssl": "\u63a7\u5236\u5668\u4f7f\u7528\u9a57\u8b49" + }, + "title": "\u8a2d\u5b9a UniFi \u63a7\u5236\u5668" + } + }, + "title": "UniFi \u63a7\u5236\u5668" + } +} \ No newline at end of file diff --git a/homeassistant/components/upnp/.translations/cs.json b/homeassistant/components/upnp/.translations/cs.json new file mode 100644 index 00000000000..24a725d1af6 --- /dev/null +++ b/homeassistant/components/upnp/.translations/cs.json @@ -0,0 +1,13 @@ +{ + "config": { + "step": { + "user": { + "data": { + "igd": "UPnP/IGD" + }, + "title": "Mo\u017enosti konfigurace pro UPnP/IGD" + } + }, + "title": "UPnP/IGD" + } +} \ No newline at end of file diff --git a/homeassistant/components/upnp/.translations/no.json b/homeassistant/components/upnp/.translations/no.json index fbb1b4afc75..a0c4c23f9c4 100644 --- a/homeassistant/components/upnp/.translations/no.json +++ b/homeassistant/components/upnp/.translations/no.json @@ -2,7 +2,8 @@ "config": { "abort": { "already_configured": "UPnP / IGD er allerede konfigurert", - "no_devices_discovered": "Ingen UPnP / IGDs oppdaget" + "no_devices_discovered": "Ingen UPnP / IGDs oppdaget", + "no_sensors_or_port_mapping": "Aktiver minst sensorer eller port mapping" }, "error": { "few": "f\u00e5", @@ -18,12 +19,13 @@ }, "user": { "data": { + "enable_port_mapping": "Aktiver port mapping for Home Assistant", "enable_sensors": "Legg til trafikk sensorer", "igd": "UPnP / IGD" }, "title": "Konfigurasjonsalternativer for UPnP / IGD" } }, - "title": "UPnP / IGD" + "title": "UPnP/IGD" } } \ No newline at end of file diff --git a/homeassistant/components/upnp/.translations/ro.json b/homeassistant/components/upnp/.translations/ro.json new file mode 100644 index 00000000000..bb584da05dc --- /dev/null +++ b/homeassistant/components/upnp/.translations/ro.json @@ -0,0 +1,27 @@ +{ + "config": { + "abort": { + "already_configured": "UPnP/IGD este deja configurat", + "no_devices_discovered": "Nu au fost descoperite UPnP/IGD-uri" + }, + "error": { + "few": "", + "one": "Unul", + "other": "" + }, + "step": { + "init": { + "title": "UPnP/IGD" + }, + "user": { + "data": { + "enable_port_mapping": "Activa\u021bi maparea porturilor pentru Home Assistant", + "enable_sensors": "Ad\u0103uga\u021bi senzori de trafic", + "igd": "UPnP/IGD" + }, + "title": "Op\u021biuni de configurare pentru UPnP/IGD" + } + }, + "title": "UPnP/IGD" + } +} \ No newline at end of file diff --git a/homeassistant/components/upnp/.translations/zh-Hant.json b/homeassistant/components/upnp/.translations/zh-Hant.json index ca8171265ae..22db0f26482 100644 --- a/homeassistant/components/upnp/.translations/zh-Hant.json +++ b/homeassistant/components/upnp/.translations/zh-Hant.json @@ -12,7 +12,7 @@ "user": { "data": { "enable_port_mapping": "\u958b\u555f Home Assistant \u901a\u8a0a\u57e0\u8f49\u767c", - "enable_sensors": "\u65b0\u589e\u4ea4\u901a\u611f\u61c9\u5668", + "enable_sensors": "\u65b0\u589e\u6d41\u91cf\u611f\u61c9\u5668", "igd": "UPnP/IGD" }, "title": "UPnP/IGD \u8a2d\u5b9a\u9078\u9805" diff --git a/homeassistant/components/zone/.translations/uk.json b/homeassistant/components/zone/.translations/uk.json new file mode 100644 index 00000000000..ce082d34a1c --- /dev/null +++ b/homeassistant/components/zone/.translations/uk.json @@ -0,0 +1,21 @@ +{ + "config": { + "error": { + "name_exists": "\u0406\u043c'\u044f \u0432\u0436\u0435 \u0456\u0441\u043d\u0443\u0454" + }, + "step": { + "init": { + "data": { + "icon": "\u0406\u043a\u043e\u043d\u043a\u0430", + "latitude": "\u0428\u0438\u0440\u043e\u0442\u0430", + "longitude": "\u0414\u043e\u0432\u0433\u043e\u0442\u0430", + "name": "\u041d\u0430\u0437\u0432\u0430", + "passive": "\u041f\u0430\u0441\u0438\u0432\u043d\u0438\u0439", + "radius": "\u0420\u0430\u0434\u0456\u0443\u0441" + }, + "title": "\u0412\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0437\u043e\u043d\u0438" + } + }, + "title": "\u0417\u043e\u043d\u0430" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/cs.json b/homeassistant/components/zwave/.translations/cs.json new file mode 100644 index 00000000000..a44fb8ad34b --- /dev/null +++ b/homeassistant/components/zwave/.translations/cs.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave je ji\u017e nakonfigurov\u00e1no", + "one_instance_only": "Komponenta podporuje pouze jednu instanci Z-Wave" + }, + "error": { + "option_error": "Z-Wave ov\u011b\u0159en\u00ed se nezda\u0159ilo. Je cesta k USB za\u0159\u00edzen\u00ed spr\u00e1vn\u011b?" + }, + "step": { + "user": { + "data": { + "network_key": "S\u00ed\u0165ov\u00fd kl\u00ed\u010d (ponechte pr\u00e1zdn\u00e9 pro automatick\u00e9 generov\u00e1n\u00ed)", + "usb_path": "Cesta k USB" + }, + "description": "Viz https://www.home-assistant.io/docs/z-wave/installation/ pro informace o konfigura\u010dn\u00edch prom\u011bnn\u00fdch", + "title": "Nastavit Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/de.json b/homeassistant/components/zwave/.translations/de.json new file mode 100644 index 00000000000..f2438f1561f --- /dev/null +++ b/homeassistant/components/zwave/.translations/de.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave ist bereits konfiguriert", + "one_instance_only": "Komponente unterst\u00fctzt nur eine Z-Wave-Instanz" + }, + "error": { + "option_error": "Z-Wave-Validierung fehlgeschlagen. Ist der Pfad zum USB-Stick korrekt?" + }, + "step": { + "user": { + "data": { + "network_key": "Netzwerkschl\u00fcssel (leer lassen, um automatisch zu generieren)", + "usb_path": "USB-Pfad" + }, + "description": "Informationen zu den Konfigurationsvariablen findest du unter https://www.home-assistant.io/docs/z-wave/installation/", + "title": "Z-Wave einrichten" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/hu.json b/homeassistant/components/zwave/.translations/hu.json new file mode 100644 index 00000000000..16c25cb7cab --- /dev/null +++ b/homeassistant/components/zwave/.translations/hu.json @@ -0,0 +1,5 @@ +{ + "config": { + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/it.json b/homeassistant/components/zwave/.translations/it.json new file mode 100644 index 00000000000..86a61307814 --- /dev/null +++ b/homeassistant/components/zwave/.translations/it.json @@ -0,0 +1,15 @@ +{ + "config": { + "step": { + "user": { + "data": { + "network_key": "Chiave di rete (lascia vuoto per generare automaticamente)", + "usb_path": "Percorso USB" + }, + "description": "Vai su https://www.home-assistant.io/docs/z-wave/installation/ per le informazioni sulle variabili di configurazione", + "title": "Imposta Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/ko.json b/homeassistant/components/zwave/.translations/ko.json index 43103de3d51..d57f758ce25 100644 --- a/homeassistant/components/zwave/.translations/ko.json +++ b/homeassistant/components/zwave/.translations/ko.json @@ -13,7 +13,7 @@ "network_key": "\ub124\ud2b8\uc6cc\ud06c \ud0a4 (\uacf5\ub780\uc73c\ub85c \ube44\uc6cc\ub450\uba74 \uc790\ub3d9 \uc0dd\uc131\ud569\ub2c8\ub2e4)", "usb_path": "USB \uacbd\ub85c" }, - "description": "\uad6c\uc131 \ubcc0\uc218\uc5d0 \ub300\ud55c \uc815\ubcf4\ub294 https://www.home-assistant.io/docs/z-wave/installation/ \uc744 \ucc38\uc870\ud574\uc8fc\uc138\uc694", + "description": "\uad6c\uc131 \ubcc0\uc218\uc5d0 \ub300\ud55c \uc815\ubcf4\ub294 [\uc548\ub0b4](https://www.home-assistant.io/docs/z-wave/installation/)\ub97c \ucc38\uc870\ud574\uc8fc\uc138\uc694", "title": "Z-Wave \uc124\uc815" } }, diff --git a/homeassistant/components/zwave/.translations/no.json b/homeassistant/components/zwave/.translations/no.json new file mode 100644 index 00000000000..f70eaa48260 --- /dev/null +++ b/homeassistant/components/zwave/.translations/no.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave er allerede konfigurert", + "one_instance_only": "Komponenten st\u00f8tter kun en enkelt Z-Wave-forekomst" + }, + "error": { + "option_error": "Z-Wave-validering mislyktes. Er banen til USB dongel riktig?" + }, + "step": { + "user": { + "data": { + "network_key": "Nettverksn\u00f8kkel (la v\u00e6re tom for automatisk generering)", + "usb_path": "USB bane" + }, + "description": "Se [www.home-assistant.io/docs/z-wave/installation/](https://www.home-assistant.io/docs/z-wave/installation/) for informasjon om konfigurasjon variablene", + "title": "Sett opp Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/pl.json b/homeassistant/components/zwave/.translations/pl.json new file mode 100644 index 00000000000..a96010a74a8 --- /dev/null +++ b/homeassistant/components/zwave/.translations/pl.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave jest ju\u017c skonfigurowany", + "one_instance_only": "Komponent obs\u0142uguje tylko jedn\u0105 instancj\u0119 Z-Wave" + }, + "error": { + "option_error": "Walidacja Z-Wave nie powiod\u0142a si\u0119. Czy \u015bcie\u017cka do kontrolera Z-Wave USB jest prawid\u0142owa?" + }, + "step": { + "user": { + "data": { + "network_key": "Klucz sieciowy (pozostaw pusty by generowa\u0107 automatycznie)", + "usb_path": "\u015acie\u017cka do kontrolera Z-Wave USB" + }, + "description": "Zobacz https://www.home-assistant.io/docs/z-wave/installation/, aby uzyska\u0107 informacje na temat zmiennych konfiguracyjnych", + "title": "Konfiguracja Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/homeassistant/components/zwave/.translations/ro.json b/homeassistant/components/zwave/.translations/ro.json new file mode 100644 index 00000000000..6920f56cdb1 --- /dev/null +++ b/homeassistant/components/zwave/.translations/ro.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "Z-Wave este deja configurat", + "one_instance_only": "Componenta accept\u0103 numai o instan\u021b\u0103 Z-Wave" + }, + "error": { + "option_error": "Validarea Z-Wave a e\u0219uat. Este corect\u0103 calea c\u0103tre stick-ul USB?" + }, + "step": { + "user": { + "data": { + "network_key": "Cheie de re\u021bea (l\u0103sa\u021bi necompletat pentru a genera automat)", + "usb_path": "Cale USB" + }, + "description": "Vede\u021bi https://www.home-assistant.io/docs/z-wave/installation/ pentru informa\u021bii despre variabilele de configurare", + "title": "Configura\u021bi Z-Wave" + } + }, + "title": "Z-Wave" + } +} \ No newline at end of file diff --git a/script/translations_download b/script/translations_download index 15b6a681056..9363bc425ae 100755 --- a/script/translations_download +++ b/script/translations_download @@ -28,7 +28,7 @@ mkdir -p ${LOCAL_DIR} docker run \ -v ${LOCAL_DIR}:/opt/dest/locale \ - lokalise/lokalise-cli@sha256:ddf5677f58551261008342df5849731c88bcdc152ab645b133b21819aede8218 lokalise \ + lokalise/lokalise-cli@sha256:b8329d20280263cad04f65b843e54b9e8e6909a348a678eac959550b5ef5c75f lokalise \ --token ${LOKALISE_TOKEN} \ export ${PROJECT_ID} \ --export_empty skip \ From 6551c53e32ec96404b87e8affc94fbe6543c3896 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 17 Oct 2018 14:16:49 +0200 Subject: [PATCH 46/56] Bump frontend to 20181017.0 --- homeassistant/components/frontend/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index aa9406d9c62..ce553da31a4 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -24,7 +24,7 @@ from homeassistant.core import callback from homeassistant.helpers.translation import async_get_translations from homeassistant.loader import bind_hass -REQUIREMENTS = ['home-assistant-frontend==20181014.0'] +REQUIREMENTS = ['home-assistant-frontend==20181017.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log', diff --git a/requirements_all.txt b/requirements_all.txt index 6e117df7c0c..0f2b3d43fb4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -458,7 +458,7 @@ hole==0.3.0 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181014.0 +home-assistant-frontend==20181017.0 # homeassistant.components.homekit_controller # homekit==0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index bc30ce5d2d0..97c453b2069 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -90,7 +90,7 @@ hdate==0.6.3 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181014.0 +home-assistant-frontend==20181017.0 # homeassistant.components.homematicip_cloud homematicip==0.9.8 From dc55718bc3d505599ba0438112126382d7a273e7 Mon Sep 17 00:00:00 2001 From: Nikolay Vasilchuk Date: Tue, 16 Oct 2018 11:22:57 +0300 Subject: [PATCH 47/56] Fix: Connection pool of Request object is smaller than optimal value (8) (#17483) --- homeassistant/components/telegram_bot/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/telegram_bot/__init__.py b/homeassistant/components/telegram_bot/__init__.py index 40724a1ee86..29781f5052c 100644 --- a/homeassistant/components/telegram_bot/__init__.py +++ b/homeassistant/components/telegram_bot/__init__.py @@ -309,10 +309,10 @@ def initialize_bot(p_config): proxy_params = p_config.get(CONF_PROXY_PARAMS) if proxy_url is not None: - request = Request(con_pool_size=4, proxy_url=proxy_url, + request = Request(con_pool_size=8, proxy_url=proxy_url, urllib3_proxy_kwargs=proxy_params) else: - request = Request(con_pool_size=4) + request = Request(con_pool_size=8) return Bot(token=api_key, request=request) From f74e976be1a46dc379025914d9b0335c8dd8dae2 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Wed, 17 Oct 2018 02:38:03 -0400 Subject: [PATCH 48/56] Blink update - fixes #17316 (#17538) * Updgrae blinkpy to 0.10.0 - Remove status sensor (API endpoint unreliable for this) - Wifi strength reports in wifi bars rather than dBm (result of new API endpoint) - Added unique ids based on serial number * Update requirements --- .../components/alarm_control_panel/blink.py | 12 +++++++++--- homeassistant/components/binary_sensor/blink.py | 1 + homeassistant/components/blink/__init__.py | 6 ++---- homeassistant/components/camera/blink.py | 8 +++++++- homeassistant/components/sensor/blink.py | 6 ++++++ requirements_all.txt | 2 +- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/alarm_control_panel/blink.py b/homeassistant/components/alarm_control_panel/blink.py index 850ac52fda4..728b5967db1 100644 --- a/homeassistant/components/alarm_control_panel/blink.py +++ b/homeassistant/components/alarm_control_panel/blink.py @@ -43,6 +43,11 @@ class BlinkSyncModule(AlarmControlPanel): self._name = name self._state = None + @property + def unique_id(self): + """Return the unique id for the sync module.""" + return self.sync.serial + @property def icon(self): """Return icon.""" @@ -61,9 +66,10 @@ class BlinkSyncModule(AlarmControlPanel): @property def device_state_attributes(self): """Return the state attributes.""" - return { - ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION, - } + attr = self.sync.attributes + attr['network_info'] = self.data.networks + attr[ATTR_ATTRIBUTION] = DEFAULT_ATTRIBUTION + return attr def update(self): """Update the state of the device.""" diff --git a/homeassistant/components/binary_sensor/blink.py b/homeassistant/components/binary_sensor/blink.py index 6519d09a29a..46751ce5394 100644 --- a/homeassistant/components/binary_sensor/blink.py +++ b/homeassistant/components/binary_sensor/blink.py @@ -36,6 +36,7 @@ class BlinkBinarySensor(BinarySensorDevice): self._icon = icon self._camera = data.sync.cameras[camera] self._state = None + self._unique_id = "{}-{}".format(self._camera.serial, self._type) @property def name(self): diff --git a/homeassistant/components/blink/__init__.py b/homeassistant/components/blink/__init__.py index 1d84b5be113..abdbc1a2e92 100644 --- a/homeassistant/components/blink/__init__.py +++ b/homeassistant/components/blink/__init__.py @@ -15,7 +15,7 @@ from homeassistant.const import ( CONF_BINARY_SENSORS, CONF_SENSORS, CONF_FILENAME, CONF_MONITORED_CONDITIONS, TEMP_FAHRENHEIT) -REQUIREMENTS = ['blinkpy==0.9.0'] +REQUIREMENTS = ['blinkpy==0.10.0'] _LOGGER = logging.getLogger(__name__) @@ -36,7 +36,6 @@ TYPE_MOTION_DETECTED = 'motion_detected' TYPE_TEMPERATURE = 'temperature' TYPE_BATTERY = 'battery' TYPE_WIFI_STRENGTH = 'wifi_strength' -TYPE_STATUS = 'status' SERVICE_REFRESH = 'blink_update' SERVICE_TRIGGER = 'trigger_camera' @@ -50,8 +49,7 @@ BINARY_SENSORS = { SENSORS = { TYPE_TEMPERATURE: ['Temperature', TEMP_FAHRENHEIT, 'mdi:thermometer'], TYPE_BATTERY: ['Battery', '%', 'mdi:battery-80'], - TYPE_WIFI_STRENGTH: ['Wifi Signal', 'dBm', 'mdi:wifi-strength-2'], - TYPE_STATUS: ['Status', '', 'mdi:bell'] + TYPE_WIFI_STRENGTH: ['Wifi Signal', 'bars', 'mdi:wifi-strength-2'], } BINARY_SENSOR_SCHEMA = vol.Schema({ diff --git a/homeassistant/components/camera/blink.py b/homeassistant/components/camera/blink.py index 5a728e92ce3..510c2ab2563 100644 --- a/homeassistant/components/camera/blink.py +++ b/homeassistant/components/camera/blink.py @@ -38,6 +38,7 @@ class BlinkCamera(Camera): self.data = data self._name = "{} {}".format(BLINK_DATA, name) self._camera = camera + self._unique_id = "{}-camera".format(camera.serial) self.response = None self.current_image = None self.last_image = None @@ -48,6 +49,11 @@ class BlinkCamera(Camera): """Return the camera name.""" return self._name + @property + def unique_id(self): + """Return the unique camera id.""" + return self._unique_id + @property def device_state_attributes(self): """Return the camera attributes.""" @@ -64,7 +70,7 @@ class BlinkCamera(Camera): @property def motion_detection_enabled(self): """Return the state of the camera.""" - return self._camera.armed + return self._camera.motion_enabled @property def brand(self): diff --git a/homeassistant/components/sensor/blink.py b/homeassistant/components/sensor/blink.py index 885bb939edf..804f83de4fd 100644 --- a/homeassistant/components/sensor/blink.py +++ b/homeassistant/components/sensor/blink.py @@ -43,12 +43,18 @@ class BlinkSensor(Entity): self._state = None self._unit_of_measurement = units self._icon = icon + self._unique_id = "{}-{}".format(self._camera.serial, self._type) @property def name(self): """Return the name of the camera.""" return self._name + @property + def unique_id(self): + """Return the unique id for the camera sensor.""" + return self._unique_id + @property def icon(self): """Return the icon of the sensor.""" diff --git a/requirements_all.txt b/requirements_all.txt index 0f2b3d43fb4..e86a488de51 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -179,7 +179,7 @@ bellows==0.7.0 bimmer_connected==0.5.3 # homeassistant.components.blink -blinkpy==0.9.0 +blinkpy==0.10.0 # homeassistant.components.light.blinksticklight blinkstick==1.1.8 From b3548f1eadae4050b6f43c9d9372aa11c1f329d5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 17 Oct 2018 10:45:01 +0200 Subject: [PATCH 49/56] Add another 3 days leeway to give time for payment processing times (#17542) --- homeassistant/components/cloud/__init__.py | 4 ++-- tests/components/cloud/test_init.py | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/cloud/__init__.py b/homeassistant/components/cloud/__init__.py index 217b39aff62..54a221565b4 100644 --- a/homeassistant/components/cloud/__init__.py +++ b/homeassistant/components/cloud/__init__.py @@ -5,7 +5,7 @@ For more details about this component, please refer to the documentation at https://home-assistant.io/components/cloud/ """ import asyncio -from datetime import datetime +from datetime import datetime, timedelta import json import logging import os @@ -162,7 +162,7 @@ class Cloud: @property def subscription_expired(self): """Return a boolean if the subscription has expired.""" - return dt_util.utcnow() > self.expiration_date + return dt_util.utcnow() > self.expiration_date + timedelta(days=3) @property def expiration_date(self): diff --git a/tests/components/cloud/test_init.py b/tests/components/cloud/test_init.py index 1fdbda496a9..8695830eae9 100644 --- a/tests/components/cloud/test_init.py +++ b/tests/components/cloud/test_init.py @@ -142,14 +142,28 @@ def test_write_user_info(): @asyncio.coroutine def test_subscription_expired(hass): - """Test subscription being expired.""" + """Test subscription being expired after 3 days of expiration.""" cl = cloud.Cloud(hass, cloud.MODE_DEV, None, None) token_val = { 'custom:sub-exp': '2017-11-13' } with patch.object(cl, '_decode_claims', return_value=token_val), \ patch('homeassistant.util.dt.utcnow', - return_value=utcnow().replace(year=2018)): + return_value=utcnow().replace(year=2017, month=11, day=13)): + assert not cl.subscription_expired + + with patch.object(cl, '_decode_claims', return_value=token_val), \ + patch('homeassistant.util.dt.utcnow', + return_value=utcnow().replace( + year=2017, month=11, day=15, hour=23, minute=59, + second=59)): + assert not cl.subscription_expired + + with patch.object(cl, '_decode_claims', return_value=token_val), \ + patch('homeassistant.util.dt.utcnow', + return_value=utcnow().replace( + year=2017, month=11, day=16, hour=0, minute=0, + second=0)): assert cl.subscription_expired From 9500bb1ac880c5e7d17047d7776c80bc7e3496de Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 17 Oct 2018 14:17:56 +0200 Subject: [PATCH 50/56] Bumped version to 0.80.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 377ecb68cd2..54d1550ebe9 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '1' +PATCH_VERSION = '2' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) From 6e4a99cec0f437778209e8573b8f4cb4a0649ca6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 18 Oct 2018 13:52:38 +0200 Subject: [PATCH 51/56] Bump frontend to 20181018.0 --- homeassistant/components/frontend/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index ce553da31a4..df25803b4e0 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -24,7 +24,7 @@ from homeassistant.core import callback from homeassistant.helpers.translation import async_get_translations from homeassistant.loader import bind_hass -REQUIREMENTS = ['home-assistant-frontend==20181017.0'] +REQUIREMENTS = ['home-assistant-frontend==20181018.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log', diff --git a/requirements_all.txt b/requirements_all.txt index e86a488de51..a18883d7c2c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -458,7 +458,7 @@ hole==0.3.0 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181017.0 +home-assistant-frontend==20181018.0 # homeassistant.components.homekit_controller # homekit==0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 97c453b2069..dc38eab532e 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -90,7 +90,7 @@ hdate==0.6.3 holidays==0.9.7 # homeassistant.components.frontend -home-assistant-frontend==20181017.0 +home-assistant-frontend==20181018.0 # homeassistant.components.homematicip_cloud homematicip==0.9.8 From 91dc0c3731fb6d62a695ff788b1afa6928cad183 Mon Sep 17 00:00:00 2001 From: Marcel Hoppe Date: Tue, 16 Oct 2018 20:09:34 +0200 Subject: [PATCH 52/56] update hangups to 0.4.6 and fix Issue #16593 hangouts reconnects. (#17518) --- homeassistant/components/hangouts/__init__.py | 2 +- homeassistant/components/hangouts/hangouts_bot.py | 13 ++++++++----- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/hangouts/__init__.py b/homeassistant/components/hangouts/__init__.py index 8480ae09549..5d8a167d2d9 100644 --- a/homeassistant/components/hangouts/__init__.py +++ b/homeassistant/components/hangouts/__init__.py @@ -27,7 +27,7 @@ from .const import ( # We need an import from .config_flow, without it .config_flow is never loaded. from .config_flow import HangoutsFlowHandler # noqa: F401 -REQUIREMENTS = ['hangups==0.4.5'] +REQUIREMENTS = ['hangups==0.4.6'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/hangouts/hangouts_bot.py b/homeassistant/components/hangouts/hangouts_bot.py index bceedb1acfa..ed041a30ce6 100644 --- a/homeassistant/components/hangouts/hangouts_bot.py +++ b/homeassistant/components/hangouts/hangouts_bot.py @@ -191,16 +191,19 @@ class HangoutsBot: self._connected = True dispatcher.async_dispatcher_send(self.hass, EVENT_HANGOUTS_CONNECTED) - def _on_disconnect(self): + async def _on_disconnect(self): """Handle disconnecting.""" - _LOGGER.debug('Connection lost!') - self._connected = False - dispatcher.async_dispatcher_send(self.hass, - EVENT_HANGOUTS_DISCONNECTED) + if self._connected: + _LOGGER.debug('Connection lost! Reconnect...') + await self.async_connect() + else: + dispatcher.async_dispatcher_send(self.hass, + EVENT_HANGOUTS_DISCONNECTED) async def async_disconnect(self): """Disconnect the client if it is connected.""" if self._connected: + self._connected = False await self._client.disconnect() async def async_handle_hass_stop(self, _): diff --git a/requirements_all.txt b/requirements_all.txt index a18883d7c2c..12a11ba1499 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -434,7 +434,7 @@ ha-philipsjs==0.0.5 habitipy==0.2.0 # homeassistant.components.hangouts -hangups==0.4.5 +hangups==0.4.6 # homeassistant.components.mqtt.server hbmqtt==0.9.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index dc38eab532e..b92e5616c3d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -78,7 +78,7 @@ georss_client==0.3 ha-ffmpeg==1.9 # homeassistant.components.hangouts -hangups==0.4.5 +hangups==0.4.6 # homeassistant.components.mqtt.server hbmqtt==0.9.4 From 9ded16ccc355bc5046daa1f7fbffea13799930fa Mon Sep 17 00:00:00 2001 From: Steven Looman Date: Sat, 13 Oct 2018 14:29:12 +0200 Subject: [PATCH 53/56] Update to async-upnp-client==0.12.5 (#17401) --- homeassistant/components/media_player/dlna_dmr.py | 2 +- homeassistant/components/upnp/__init__.py | 2 +- requirements_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/media_player/dlna_dmr.py b/homeassistant/components/media_player/dlna_dmr.py index 8aab4bfa43a..25a729aed6d 100644 --- a/homeassistant/components/media_player/dlna_dmr.py +++ b/homeassistant/components/media_player/dlna_dmr.py @@ -25,7 +25,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.util import get_local_ip -REQUIREMENTS = ['async-upnp-client==0.12.4'] +REQUIREMENTS = ['async-upnp-client==0.12.5'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/upnp/__init__.py b/homeassistant/components/upnp/__init__.py index f70fbcc4d20..bf9f8a4746d 100644 --- a/homeassistant/components/upnp/__init__.py +++ b/homeassistant/components/upnp/__init__.py @@ -30,7 +30,7 @@ from .config_flow import ensure_domain_data from .device import Device -REQUIREMENTS = ['async-upnp-client==0.12.4'] +REQUIREMENTS = ['async-upnp-client==0.12.5'] DEPENDENCIES = ['http'] NOTIFICATION_ID = 'upnp_notification' diff --git a/requirements_all.txt b/requirements_all.txt index 12a11ba1499..c3f376908ca 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -147,7 +147,7 @@ asterisk_mbox==0.5.0 # homeassistant.components.upnp # homeassistant.components.media_player.dlna_dmr -async-upnp-client==0.12.4 +async-upnp-client==0.12.5 # homeassistant.components.light.avion # avion==0.7 From 43b140be5e6cac14c597f40db01bb0608c4d53b0 Mon Sep 17 00:00:00 2001 From: Steven Looman Date: Wed, 17 Oct 2018 22:56:21 +0200 Subject: [PATCH 54/56] Upgrade async_upnp_client to 0.12.6 (#17560) --- homeassistant/components/media_player/dlna_dmr.py | 2 +- homeassistant/components/upnp/__init__.py | 2 +- requirements_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/media_player/dlna_dmr.py b/homeassistant/components/media_player/dlna_dmr.py index 25a729aed6d..b787ed689c8 100644 --- a/homeassistant/components/media_player/dlna_dmr.py +++ b/homeassistant/components/media_player/dlna_dmr.py @@ -25,7 +25,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.util import get_local_ip -REQUIREMENTS = ['async-upnp-client==0.12.5'] +REQUIREMENTS = ['async-upnp-client==0.12.6'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/upnp/__init__.py b/homeassistant/components/upnp/__init__.py index bf9f8a4746d..c496caba948 100644 --- a/homeassistant/components/upnp/__init__.py +++ b/homeassistant/components/upnp/__init__.py @@ -30,7 +30,7 @@ from .config_flow import ensure_domain_data from .device import Device -REQUIREMENTS = ['async-upnp-client==0.12.5'] +REQUIREMENTS = ['async-upnp-client==0.12.6'] DEPENDENCIES = ['http'] NOTIFICATION_ID = 'upnp_notification' diff --git a/requirements_all.txt b/requirements_all.txt index c3f376908ca..7f8cec584b0 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -147,7 +147,7 @@ asterisk_mbox==0.5.0 # homeassistant.components.upnp # homeassistant.components.media_player.dlna_dmr -async-upnp-client==0.12.5 +async-upnp-client==0.12.6 # homeassistant.components.light.avion # avion==0.7 From 17d0fe02c7ae261dd020bcb8bad36c41f1285c9b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 18 Oct 2018 11:06:32 +0200 Subject: [PATCH 55/56] Update snapcast to 2.0.9 (#17573) --- homeassistant/components/media_player/snapcast.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/media_player/snapcast.py b/homeassistant/components/media_player/snapcast.py index fca440df783..cfe2f997295 100644 --- a/homeassistant/components/media_player/snapcast.py +++ b/homeassistant/components/media_player/snapcast.py @@ -17,7 +17,7 @@ from homeassistant.const import ( STATE_PLAYING, STATE_UNKNOWN) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['snapcast==2.0.8'] +REQUIREMENTS = ['snapcast==2.0.9'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 7f8cec584b0..a088fb696d3 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1364,7 +1364,7 @@ smappy==0.2.16 # smbus-cffi==0.5.1 # homeassistant.components.media_player.snapcast -snapcast==2.0.8 +snapcast==2.0.9 # homeassistant.components.sensor.socialblade socialbladeclient==0.2 From cd90bb4161be87afd5e726b05f5e99bd926e3012 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 18 Oct 2018 13:58:58 +0200 Subject: [PATCH 56/56] Bumped version to 0.80.3 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 54d1550ebe9..502a120a33c 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 80 -PATCH_VERSION = '2' +PATCH_VERSION = '3' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3)