From 04d2dbb57366148cbf855bd224b7df390bd8c515 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 29 Aug 2019 12:32:15 -0700 Subject: [PATCH 1/8] Add translations --- .../components/adguard/.translations/fr.json | 11 ++++++++--- homeassistant/components/axis/.translations/fr.json | 1 + .../components/deconz/.translations/en.json | 11 +++++++++++ .../components/deconz/.translations/fr.json | 2 ++ .../components/life360/.translations/en.json | 1 + .../components/plaato/.translations/fr.json | 13 ++++++++++++- .../components/unifi/.translations/en.json | 12 ++++++++++++ homeassistant/components/wemo/.translations/fr.json | 5 +++++ 8 files changed, 52 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/adguard/.translations/fr.json b/homeassistant/components/adguard/.translations/fr.json index 7a58c396345..6543ddd50bc 100644 --- a/homeassistant/components/adguard/.translations/fr.json +++ b/homeassistant/components/adguard/.translations/fr.json @@ -1,13 +1,15 @@ { "config": { "abort": { - "existing_instance_updated": "La configuration existante a \u00e9t\u00e9 mise \u00e0 jour." + "existing_instance_updated": "La configuration existante a \u00e9t\u00e9 mise \u00e0 jour.", + "single_instance_allowed": "Une seule configuration d'AdGuard Home est autoris\u00e9e." }, "error": { "connection_error": "\u00c9chec de connexion." }, "step": { "hassio_confirm": { + "description": "Voulez-vous configurer Home Assistant pour qu'il se connecte \u00e0 AdGuard Home fourni par le module compl\u00e9mentaire Hass.io: {addon} ?", "title": "AdGuard Home via le module compl\u00e9mentaire Hass.io" }, "user": { @@ -16,8 +18,11 @@ "password": "Mot de passe", "port": "Port", "ssl": "AdGuard Home utilise un certificat SSL", - "username": "Nom d'utilisateur" - } + "username": "Nom d'utilisateur", + "verify_ssl": "AdGuard Home utilise un certificat appropri\u00e9" + }, + "description": "Configurez votre instance AdGuard Home pour permettre la surveillance et le contr\u00f4le.", + "title": "Liez votre AdGuard Home." } }, "title": "AdGuard Home" diff --git a/homeassistant/components/axis/.translations/fr.json b/homeassistant/components/axis/.translations/fr.json index e85fceaf463..24afb4a226c 100644 --- a/homeassistant/components/axis/.translations/fr.json +++ b/homeassistant/components/axis/.translations/fr.json @@ -8,6 +8,7 @@ }, "error": { "already_configured": "L'appareil est d\u00e9j\u00e0 configur\u00e9", + "already_in_progress": "Le flux de configuration de l'appareil est d\u00e9j\u00e0 en cours.", "device_unavailable": "L'appareil n'est pas disponible", "faulty_credentials": "Mauvaises informations d'identification de l'utilisateur" }, diff --git a/homeassistant/components/deconz/.translations/en.json b/homeassistant/components/deconz/.translations/en.json index dd8f1cc4026..57da3c706a0 100644 --- a/homeassistant/components/deconz/.translations/en.json +++ b/homeassistant/components/deconz/.translations/en.json @@ -40,5 +40,16 @@ } }, "title": "deCONZ Zigbee gateway" + }, + "options": { + "step": { + "async_step_deconz_devices": { + "data": { + "allow_clip_sensor": "Allow deCONZ CLIP sensors", + "allow_deconz_groups": "Allow deCONZ light groups" + }, + "description": "Configure visibility of deCONZ device types" + } + } } } \ No newline at end of file diff --git a/homeassistant/components/deconz/.translations/fr.json b/homeassistant/components/deconz/.translations/fr.json index 3d658ca00b0..9b98914314a 100644 --- a/homeassistant/components/deconz/.translations/fr.json +++ b/homeassistant/components/deconz/.translations/fr.json @@ -2,7 +2,9 @@ "config": { "abort": { "already_configured": "Ce pont est d\u00e9j\u00e0 configur\u00e9", + "already_in_progress": "Le flux de configuration pour le pont est d\u00e9j\u00e0 en cours.", "no_bridges": "Aucun pont deCONZ n'a \u00e9t\u00e9 d\u00e9couvert", + "not_deconz_bridge": "Pas un pont deCONZ", "one_instance_only": "Le composant prend uniquement en charge une instance deCONZ", "updated_instance": "Instance deCONZ mise \u00e0 jour avec la nouvelle adresse d'h\u00f4te" }, diff --git a/homeassistant/components/life360/.translations/en.json b/homeassistant/components/life360/.translations/en.json index 2c187ba0470..e6017339b73 100644 --- a/homeassistant/components/life360/.translations/en.json +++ b/homeassistant/components/life360/.translations/en.json @@ -10,6 +10,7 @@ "error": { "invalid_credentials": "Invalid credentials", "invalid_username": "Invalid username", + "unexpected": "Unexpected error communicating with Life360 server", "user_already_configured": "Account has already been configured" }, "step": { diff --git a/homeassistant/components/plaato/.translations/fr.json b/homeassistant/components/plaato/.translations/fr.json index 091c680be4c..d710886b84b 100644 --- a/homeassistant/components/plaato/.translations/fr.json +++ b/homeassistant/components/plaato/.translations/fr.json @@ -1,7 +1,18 @@ { "config": { "abort": { + "not_internet_accessible": "Votre instance de Home Assistant doit \u00eatre accessible depuis Internet pour recevoir les messages de Plaato Airlock.", "one_instance_allowed": "Une seule instance est n\u00e9cessaire." - } + }, + "create_entry": { + "default": "Pour envoyer des \u00e9v\u00e9nements \u00e0 Home Assistant, vous devez configurer la fonction Webhook dans Plaato Airlock. \n\n Remplissez les informations suivantes: \n\n - URL: ` {webhook_url} ` \n - M\u00e9thode: POST \n\n Voir [la documentation] ( {docs_url} ) pour plus de d\u00e9tails." + }, + "step": { + "user": { + "description": "\u00cates-vous s\u00fbr de vouloir installer le Plaato Airlock ?", + "title": "Configurer le Webhook Plaato" + } + }, + "title": "Plaato Airlock" } } \ No newline at end of file diff --git a/homeassistant/components/unifi/.translations/en.json b/homeassistant/components/unifi/.translations/en.json index 3686148fdb6..2025bad6246 100644 --- a/homeassistant/components/unifi/.translations/en.json +++ b/homeassistant/components/unifi/.translations/en.json @@ -22,5 +22,17 @@ } }, "title": "UniFi Controller" + }, + "options": { + "step": { + "device_tracker": { + "data": { + "detection_time": "Time in seconds from last seen until considered away", + "track_clients": "Track network clients", + "track_devices": "Track network devices (Ubiquiti devices)", + "track_wired_clients": "Include wired network clients" + } + } + } } } \ No newline at end of file diff --git a/homeassistant/components/wemo/.translations/fr.json b/homeassistant/components/wemo/.translations/fr.json index c1c8830cb25..08b55e2366a 100644 --- a/homeassistant/components/wemo/.translations/fr.json +++ b/homeassistant/components/wemo/.translations/fr.json @@ -1,7 +1,12 @@ { "config": { + "abort": { + "no_devices_found": "Aucun p\u00e9riph\u00e9rique Wemo trouv\u00e9 sur le r\u00e9seau.", + "single_instance_allowed": "Une seule configuration de Wemo est possible." + }, "step": { "confirm": { + "description": "Voulez-vous configurer Wemo?", "title": "Wemo" } }, From 5f850a7dc7b7452640d8d2d6ccb6f9377b18398b Mon Sep 17 00:00:00 2001 From: Eliseo Martelli Date: Thu, 29 Aug 2019 21:36:21 +0200 Subject: [PATCH 2/8] Update sensor.py (#26209) --- homeassistant/components/qbittorrent/sensor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/qbittorrent/sensor.py b/homeassistant/components/qbittorrent/sensor.py index a257b0e317a..2900496a01e 100644 --- a/homeassistant/components/qbittorrent/sensor.py +++ b/homeassistant/components/qbittorrent/sensor.py @@ -41,7 +41,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( ) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): +def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the qBittorrent sensors.""" from qbittorrent.client import Client, LoginRequired @@ -62,7 +62,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= sensor = QBittorrentSensor(sensor_type, client, name, LoginRequired) dev.append(sensor) - async_add_entities(dev, True) + add_entities(dev, True) def format_speed(speed): @@ -105,7 +105,7 @@ class QBittorrentSensor(Entity): """Return the unit of measurement of this entity, if any.""" return self._unit_of_measurement - async def async_update(self): + def update(self): """Get the latest data from qBittorrent and updates the state.""" try: data = self.client.sync() @@ -113,7 +113,6 @@ class QBittorrentSensor(Entity): except RequestException: _LOGGER.error("Connection lost") self._available = False - return except self._exception: _LOGGER.error("Invalid authentication") return From 069e762da0c81f3f7097156314968015f57300c2 Mon Sep 17 00:00:00 2001 From: SukramJ Date: Wed, 28 Aug 2019 22:38:20 +0200 Subject: [PATCH 3/8] Fix for 0.98: Don't update disabled entities (Homematic IP Cloud) (#26236) * Homematic IP Cloud Fix: Don't update disabled entities * Added enabled to entity.py * Update test for enabled * Update entity.py --- homeassistant/components/homematicip_cloud/device.py | 12 ++++++++++-- homeassistant/helpers/entity.py | 5 +++++ tests/helpers/test_entity.py | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/homematicip_cloud/device.py b/homeassistant/components/homematicip_cloud/device.py index b086eaa29c7..71855d7c3f5 100644 --- a/homeassistant/components/homematicip_cloud/device.py +++ b/homeassistant/components/homematicip_cloud/device.py @@ -76,8 +76,16 @@ class HomematicipGenericDevice(Entity): def _async_device_changed(self, *args, **kwargs): """Handle device state changes.""" - _LOGGER.debug("Event %s (%s)", self.name, self._device.modelType) - self.async_schedule_update_ha_state() + # Don't update disabled entities + if self.enabled: + _LOGGER.debug("Event %s (%s)", self.name, self._device.modelType) + self.async_schedule_update_ha_state() + else: + _LOGGER.debug( + "Device Changed Event for %s (%s) not fired. Entity is disabled.", + self.name, + self._device.modelType, + ) @property def name(self) -> str: diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index bd96e1bafdb..91562b9046d 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -229,6 +229,11 @@ class Entity: # are used to perform a very specific function. Overwriting these may # produce undesirable effects in the entity's operation. + @property + def enabled(self): + """Return if the entity is enabled in the entity registry.""" + return self.registry_entry is None or not self.registry_entry.disabled + @callback def async_set_context(self, context): """Set the context the entity currently operates under.""" diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index 3c89a5c6537..18cedf1c46a 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -552,8 +552,10 @@ async def test_disabled_in_entity_registry(hass): await hass.async_block_till_done() assert entry2 != entry assert ent.registry_entry == entry2 + assert ent.enabled is True entry3 = registry.async_update_entity("hello.world", disabled_by="user") await hass.async_block_till_done() assert entry3 != entry2 assert ent.registry_entry == entry3 + assert ent.enabled is False From bb52e1736499fc995a5439fdd2b2a4d52511d261 Mon Sep 17 00:00:00 2001 From: "David F. Mulcahey" Date: Thu, 29 Aug 2019 15:44:53 -0400 Subject: [PATCH 4/8] Fix ZHA state restore by always restoring last seen on devices (#26271) * fix state restore by always restoring last seen * cleanup --- homeassistant/components/zha/core/gateway.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/zha/core/gateway.py b/homeassistant/components/zha/core/gateway.py index 9cf93b56581..3d8c3e8fd90 100644 --- a/homeassistant/components/zha/core/gateway.py +++ b/homeassistant/components/zha/core/gateway.py @@ -304,6 +304,8 @@ class ZHAGateway: manufacturer=zha_device.manufacturer, model=zha_device.model, ) + entry = self.zha_storage.async_get_or_create(zha_device) + zha_device.async_update_last_seen(entry.last_seen) return zha_device @callback @@ -356,10 +358,6 @@ class ZHAGateway: ) await self._async_device_joined(device, zha_device) - # This is real traffic from a device so lets update last seen on the entry - entry = self.zha_storage.async_get_or_create(zha_device) - zha_device.async_update_last_seen(entry.last_seen) - device_info = async_get_device_info( self._hass, zha_device, self.ha_device_registry ) From 5676f6fb86abbbaa6d34784cede1bc8b618a6d24 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 29 Aug 2019 13:06:34 -0700 Subject: [PATCH 5/8] Bumped version to 0.98.1 --- homeassistant/components/tuya/switch.py | 7 ++++++- homeassistant/const.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tuya/switch.py b/homeassistant/components/tuya/switch.py index 9c021766637..a0d262aa085 100644 --- a/homeassistant/components/tuya/switch.py +++ b/homeassistant/components/tuya/switch.py @@ -26,11 +26,12 @@ class TuyaSwitch(TuyaDevice, SwitchDevice): """Init Tuya switch device.""" super().__init__(tuya) self.entity_id = ENTITY_ID_FORMAT.format(tuya.object_id()) + self._is_on = False @property def is_on(self): """Return true if switch is on.""" - return self.tuya.state() + return self._is_on def turn_on(self, **kwargs): """Turn the switch on.""" @@ -39,3 +40,7 @@ class TuyaSwitch(TuyaDevice, SwitchDevice): def turn_off(self, **kwargs): """Turn the device off.""" self.tuya.turn_off() + + def update(self): + """Update switch device.""" + self._is_on = self.tuya.state() diff --git a/homeassistant/const.py b/homeassistant/const.py index 9a9b098aabb..2f2546378db 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 98 -PATCH_VERSION = "0" +PATCH_VERSION = "1" __short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) __version__ = "{}.{}".format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 6, 0) From 015adbbac0539cdcd8ceb7c7d6bbf838c1b0a2cf Mon Sep 17 00:00:00 2001 From: mbo18 Date: Thu, 29 Aug 2019 22:22:52 +0200 Subject: [PATCH 6/8] Fix missing DarkSky mdi icon (#26274) * Fix missing DarkSky mdi icon Fix mdi icon for DarkSky * fix icon * Update weather.py --- homeassistant/components/darksky/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/darksky/sensor.py b/homeassistant/components/darksky/sensor.py index e5886ae5e59..0f33935c66c 100644 --- a/homeassistant/components/darksky/sensor.py +++ b/homeassistant/components/darksky/sensor.py @@ -193,7 +193,7 @@ SENSOR_TYPES = { "%", "%", "%", - "mdi:weather-partlycloudy", + "mdi:weather-partly-cloudy", ["currently", "hourly", "daily"], ], "humidity": [ @@ -380,11 +380,11 @@ CONDITION_PICTURES = { "cloudy": ["/static/images/darksky/weather-cloudy.svg", "mdi:weather-cloudy"], "partly-cloudy-day": [ "/static/images/darksky/weather-partlycloudy.svg", - "mdi:weather-partlycloudy", + "mdi:weather-partly-cloudy", ], "partly-cloudy-night": [ "/static/images/darksky/weather-cloudy.svg", - "mdi:weather-partlycloudy", + "mdi:weather-partly-cloudy", ], } From 5413cbd19572a5b1c0bf7cc124c23de6c50d5471 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 29 Aug 2019 13:22:29 -0700 Subject: [PATCH 7/8] Fix partly cloudy (#26277) --- homeassistant/components/buienradar/sensor.py | 10 +++++----- homeassistant/components/mysensors/sensor.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/buienradar/sensor.py b/homeassistant/components/buienradar/sensor.py index 72da5164dab..841cc428bac 100644 --- a/homeassistant/components/buienradar/sensor.py +++ b/homeassistant/components/buienradar/sensor.py @@ -108,11 +108,11 @@ SENSOR_TYPES = { "rainchance_3d": ["Rainchance 3d", "%", "mdi:weather-pouring"], "rainchance_4d": ["Rainchance 4d", "%", "mdi:weather-pouring"], "rainchance_5d": ["Rainchance 5d", "%", "mdi:weather-pouring"], - "sunchance_1d": ["Sunchance 1d", "%", "mdi:weather-partlycloudy"], - "sunchance_2d": ["Sunchance 2d", "%", "mdi:weather-partlycloudy"], - "sunchance_3d": ["Sunchance 3d", "%", "mdi:weather-partlycloudy"], - "sunchance_4d": ["Sunchance 4d", "%", "mdi:weather-partlycloudy"], - "sunchance_5d": ["Sunchance 5d", "%", "mdi:weather-partlycloudy"], + "sunchance_1d": ["Sunchance 1d", "%", "mdi:weather-partly-cloudy"], + "sunchance_2d": ["Sunchance 2d", "%", "mdi:weather-partly-cloudy"], + "sunchance_3d": ["Sunchance 3d", "%", "mdi:weather-partly-cloudy"], + "sunchance_4d": ["Sunchance 4d", "%", "mdi:weather-partly-cloudy"], + "sunchance_5d": ["Sunchance 5d", "%", "mdi:weather-partly-cloudy"], "windforce_1d": ["Wind force 1d", "Bft", "mdi:weather-windy"], "windforce_2d": ["Wind force 2d", "Bft", "mdi:weather-windy"], "windforce_3d": ["Wind force 3d", "Bft", "mdi:weather-windy"], diff --git a/homeassistant/components/mysensors/sensor.py b/homeassistant/components/mysensors/sensor.py index 8eaf336e9ba..a7d1cad98fa 100644 --- a/homeassistant/components/mysensors/sensor.py +++ b/homeassistant/components/mysensors/sensor.py @@ -14,7 +14,7 @@ SENSORS = { "V_DIMMER": ["%", "mdi:percent"], "V_PERCENTAGE": ["%", "mdi:percent"], "V_PRESSURE": [None, "mdi:gauge"], - "V_FORECAST": [None, "mdi:weather-partlycloudy"], + "V_FORECAST": [None, "mdi:weather-partly-cloudy"], "V_RAIN": [None, "mdi:weather-rainy"], "V_RAINRATE": [None, "mdi:weather-rainy"], "V_WIND": [None, "mdi:weather-windy"], From 1ca2f1906af7095a1f656761391187acb61130ee Mon Sep 17 00:00:00 2001 From: Robert Svensson Date: Thu, 29 Aug 2019 23:04:01 +0200 Subject: [PATCH 8/8] UniFi - dont schedule updates on disabled entities (#26278) * Dont schedule updates on disabled entities * Use entity enabled since it is available --- homeassistant/components/unifi/device_tracker.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/unifi/device_tracker.py b/homeassistant/components/unifi/device_tracker.py index c8024808e39..4845e9222ce 100644 --- a/homeassistant/components/unifi/device_tracker.py +++ b/homeassistant/components/unifi/device_tracker.py @@ -150,7 +150,9 @@ def update_items(controller, async_add_entities, tracked): for client_id in controller.api.clients: - if client_id in tracked and tracked[client_id].entity_id: + if client_id in tracked: + if not tracked[client_id].enabled: + continue LOGGER.debug( "Updating UniFi tracked client %s (%s)", tracked[client_id].entity_id, @@ -183,7 +185,9 @@ def update_items(controller, async_add_entities, tracked): for device_id in controller.api.devices: - if device_id in tracked and tracked[device_id].entity_id: + if device_id in tracked: + if not tracked[device_id].enabled: + continue LOGGER.debug( "Updating UniFi tracked device %s (%s)", tracked[device_id].entity_id,