Merge pull request #26276 from home-assistant/rc

0.98.1
This commit is contained in:
Paulus Schoutsen 2019-08-29 16:03:33 -07:00 committed by GitHub
commit d1219d0b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 96 additions and 27 deletions

View File

@ -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"

View File

@ -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"
},

View File

@ -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"],

View File

@ -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",
],
}

View File

@ -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"
}
}
}
}

View File

@ -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"
},

View File

@ -76,8 +76,16 @@ class HomematicipGenericDevice(Entity):
def _async_device_changed(self, *args, **kwargs):
"""Handle device state changes."""
# 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:

View File

@ -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": {

View File

@ -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"],

View File

@ -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"
}
}

View File

@ -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

View File

@ -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()

View File

@ -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"
}
}
}
}
}

View File

@ -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,

View File

@ -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"
}
},

View File

@ -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
)

View File

@ -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)

View File

@ -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."""

View File

@ -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