Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f8f05c4
Enable sisyphus to recover from bad DNS without restart (#32846)
jkeljo Apr 2, 2020
23e0916
Fix netatmo device unavailable and services (#33509)
cgtobi Apr 2, 2020
314bc07
UniFi - Make POE control switches configurable (#32781)
Kane610 Apr 2, 2020
4ebbabc
Unsub dispatcher when removing entity from hass (#33510)
balloob Apr 2, 2020
590e714
Ensure harmony hub is ready before importing (#33537)
bdraco Apr 2, 2020
457d439
Fix MQTT cleanup regression from #32184. (#33532)
emontnemery Apr 2, 2020
1d2713b
Clarify light reproduce state deprecation warning (#33531)
MartinHjelmare Apr 2, 2020
b10319f
Convert TTS tests to async (#33517)
balloob Apr 2, 2020
30fd995
Add remote platform to directv (#32790)
ctalkington Apr 2, 2020
9fd0192
Remove extraneous parameter from AlarmDecoder services (#33516)
ajschmidt8 Apr 2, 2020
8b0a0ee
Don't write storage to disk while stopping (#33456)
dmulcahey Apr 2, 2020
1d89d22
Update pyotgw to 0.6b1 (#33529)
mvn23 Apr 2, 2020
39408ab
Add cover platform to Dynalite (#32594)
ziv1234 Apr 2, 2020
4caf65d
Add Rachio Flex Schedules (#33533)
brg468 Apr 2, 2020
4b2c45e
Add melcloud AtaDevice vane control (#32672)
Apr 2, 2020
6afe6ac
Mark new gate device class as 2FA (#33541)
balloob Apr 2, 2020
b719a77
Bump pyipp to 0.8.2 (#33544)
ctalkington Apr 2, 2020
36a606f
Bump HAP-python to 2.8.0 (#33539)
bdraco Apr 2, 2020
201e958
Use mock storage for MQTT tests (#33553)
dmulcahey Apr 2, 2020
8fbdc70
Fix uncaught exceptions for mqtt (#33547)
ziv1234 Apr 2, 2020
3db9d6a
Fix template light returning NULL in color or temperature (#33498)
alistairg Apr 2, 2020
f2dad79
fixed uncaught exceptions for tradfri (#33550)
ziv1234 Apr 2, 2020
a30e217
Add support to the Econet integration for new attributes: lower_temp,…
richardpowellus Apr 2, 2020
9165ea5
Revert "Add support to the Econet integration for new attributes: low…
bdraco Apr 2, 2020
3df46cd
Remove MQTT state vacuum value_template support. (#33536)
emontnemery Apr 2, 2020
55870ae
Temporary Plex play_media workaround (#33542)
jjlawren Apr 2, 2020
cb058ff
Add config entry for Flu Near You (#32858)
bachya Apr 2, 2020
e641043
Use backend-provided fan speed presets for Xiaomi vacuums, bum… (#32850)
rytilahti Apr 2, 2020
08c9ceb
[ci skip] Translation update
homeassistant Apr 3, 2020
2b0bdd5
Update to pyipp==0.8.3 (#33554)
ctalkington Apr 3, 2020
f25321e
Use homekit service callbacks for lights to resolve out of sync state…
bdraco Apr 3, 2020
081b822
Add support for Vizio sound mode (#33200)
raman325 Apr 3, 2020
2065039
Rachio Async fixes (#33549)
brg468 Apr 3, 2020
d98171e
Plex followup to #33542 (#33558)
jjlawren Apr 3, 2020
d2cd557
Add missing flow_title to doorbird (#33557)
bdraco Apr 3, 2020
83cc871
Add force_update to timer integration (#31646)
akasma74 Apr 3, 2020
aef06a3
Directly call write state 2 (#33513)
balloob Apr 3, 2020
ae22b51
Add vera config entries support (#29880)
vangorra Apr 3, 2020
d1c1aa5
Identify cameras in error logs for generic and mjpeg cameras (#33561)
azogue Apr 3, 2020
2d751c1
Upgrade luftdaten to 0.6.4 (#33564)
fabaff Apr 3, 2020
b5c89b4
Bump gios library to version 0.1.1 (#33569)
bieniu Apr 3, 2020
eccab37
Upgrade Mastodon.py to 1.5.1 (#33243)
fabaff Apr 3, 2020
730d90f
Fix browsing regression (#33572)
Jc2k Apr 3, 2020
62835f0
Fix asuswrt network failure startup (#33485)
ollo69 Apr 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ omit =
homeassistant/components/flic/binary_sensor.py
homeassistant/components/flock/notify.py
homeassistant/components/flume/*
homeassistant/components/flunearyou/__init__.py
homeassistant/components/flunearyou/sensor.py
homeassistant/components/flux_led/light.py
homeassistant/components/folder/sensor.py
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ homeassistant/components/usgs_earthquakes_feed/* @exxamalte
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/velbus/* @Cereal2nd @brefra
homeassistant/components/velux/* @Julius2342
homeassistant/components/vera/* @vangorra
homeassistant/components/versasense/* @flamm3blemuff1n
homeassistant/components/version/* @fabaff
homeassistant/components/vesync/* @markperdue @webdjoe
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/abode/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def async_added_to_hass(self):
)

signal = f"abode_camera_capture_{self.entity_id}"
async_dispatcher_connect(self.hass, signal, self.capture)
self.async_on_remove(async_dispatcher_connect(self.hass, signal, self.capture))

def capture(self):
"""Request a new image capture."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/abode/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def async_added_to_hass(self):
await super().async_added_to_hass()

signal = f"abode_trigger_automation_{self.entity_id}"
async_dispatcher_connect(self.hass, signal, self.trigger)
self.async_on_remove(async_dispatcher_connect(self.hass, signal, self.trigger))

def turn_on(self, **kwargs):
"""Enable the automation."""
Expand Down
8 changes: 5 additions & 3 deletions homeassistant/components/aftership/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,16 @@ def icon(self):

async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self._force_update
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self._force_update
)
)

async def _force_update(self):
"""Force update of data."""
await self.async_update(no_throttle=True)
await self.async_update_ha_state()
self.async_write_ha_state()

@Throttle(MIN_TIME_BETWEEN_UPDATES)
async def async_update(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airvisual/.translations/ko.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"config": {
"abort": {
"already_configured": "\uc774 API \ud0a4\ub294 \uc774\ubbf8 \uc0ac\uc6a9 \uc911\uc785\ub2c8\ub2e4."
"already_configured": "\uc88c\ud45c\uac12\uc774 \uc774\ubbf8 \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4"
},
"error": {
"invalid_api_key": "\uc798\ubabb\ub41c API \ud0a4"
Expand Down
6 changes: 4 additions & 2 deletions homeassistant/components/alarmdecoder/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ def __init__(self, auto_bypass, code_arm_required):

async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_PANEL_MESSAGE, self._message_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_PANEL_MESSAGE, self._message_callback
)
)

def _message_callback(self, message):
Expand Down
24 changes: 16 additions & 8 deletions homeassistant/components/alarmdecoder/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,28 @@ def __init__(

async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_ZONE_FAULT, self._fault_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_ZONE_FAULT, self._fault_callback
)
)

self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_ZONE_RESTORE, self._restore_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_ZONE_RESTORE, self._restore_callback
)
)

self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_RFX_MESSAGE, self._rfx_message_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_RFX_MESSAGE, self._rfx_message_callback
)
)

self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_REL_MESSAGE, self._rel_message_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_REL_MESSAGE, self._rel_message_callback
)
)

@property
Expand Down
6 changes: 4 additions & 2 deletions homeassistant/components/alarmdecoder/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ def __init__(self, hass):

async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_PANEL_MESSAGE, self._message_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_PANEL_MESSAGE, self._message_callback
)
)

def _message_callback(self, message):
Expand Down
6 changes: 0 additions & 6 deletions homeassistant/components/alarmdecoder/services.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
alarm_keypress:
description: Send custom keypresses to the alarm.
fields:
entity_id:
description: Name of the alarm control panel to trigger.
example: 'alarm_control_panel.downstairs'
keypress:
description: 'String to send to the alarm panel.'
example: '*71'

alarm_toggle_chime:
description: Send the alarm the toggle chime command.
fields:
entity_id:
description: Name of the alarm control panel to trigger.
example: 'alarm_control_panel.downstairs'
code:
description: A required code to toggle the alarm control panel chime with.
example: 1234
10 changes: 4 additions & 6 deletions homeassistant/components/alert/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Support for repeating alerts when conditions are met."""
import asyncio
from datetime import timedelta
import logging

Expand Down Expand Up @@ -144,9 +143,8 @@ async def async_handle_alert_service(service_call):
DOMAIN, SERVICE_TOGGLE, async_handle_alert_service, schema=ALERT_SERVICE_SCHEMA
)

tasks = [alert.async_update_ha_state() for alert in entities]
if tasks:
await asyncio.wait(tasks)
for alert in entities:
alert.async_write_ha_state()

return True

Expand Down Expand Up @@ -318,13 +316,13 @@ async def async_turn_on(self, **kwargs):
"""Async Unacknowledge alert."""
_LOGGER.debug("Reset Alert: %s", self._name)
self._ack = False
await self.async_update_ha_state()
self.async_write_ha_state()

async def async_turn_off(self, **kwargs):
"""Async Acknowledge alert."""
_LOGGER.debug("Acknowledged Alert: %s", self._name)
self._ack = True
await self.async_update_ha_state()
self.async_write_ha_state()

async def async_toggle(self, **kwargs):
"""Async toggle alert."""
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/android_ip_webcam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ def async_ipcam_update(host):
return
self.async_schedule_update_ha_state(True)

async_dispatcher_connect(self.hass, SIGNAL_UPDATE_DATA, async_ipcam_update)
self.async_on_remove(
async_dispatcher_connect(self.hass, SIGNAL_UPDATE_DATA, async_ipcam_update)
)

@property
def should_poll(self):
Expand Down
12 changes: 11 additions & 1 deletion homeassistant/components/anthemav/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
)
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -60,7 +64,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
def async_anthemav_update_callback(message):
"""Receive notification from transport that new data exists."""
_LOGGER.debug("Received update callback from AVR: %s", message)
hass.async_create_task(device.async_update_ha_state())
async_dispatcher_send(hass, DOMAIN)

avr = await anthemav.Connection.create(
host=host, port=port, update_callback=async_anthemav_update_callback
Expand All @@ -87,6 +91,12 @@ def __init__(self, avr, name):
def _lookup(self, propname, dval=None):
return getattr(self.avr.protocol, propname, dval)

async def async_added_to_hass(self):
"""When entity is added to hass."""
self.async_on_remove(
async_dispatcher_connect(self.hass, DOMAIN, self.async_write_ha_state)
)

@property
def supported_features(self):
"""Flag media player features that are supported."""
Expand Down
6 changes: 4 additions & 2 deletions homeassistant/components/aqualogic/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ def icon(self):

async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self.async_update_callback
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self.async_update_callback
)
)

@callback
Expand Down
12 changes: 4 additions & 8 deletions homeassistant/components/aqualogic/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def __init__(self, processor, switch_type):
"aux_6": States.AUX_6,
"aux_7": States.AUX_7,
}[switch_type]
self._unsub_disp = None

@property
def name(self):
Expand Down Expand Up @@ -101,11 +100,8 @@ def turn_off(self, **kwargs):

async def async_added_to_hass(self):
"""Register callbacks."""
self._unsub_disp = self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self.async_write_ha_state
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self.async_write_ha_state
)
)

async def async_will_remove_from_hass(self):
"""When entity will be removed from hass."""
self._unsub_disp()
self._unsub_disp = None
18 changes: 13 additions & 5 deletions homeassistant/components/arcam_fmj/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,22 @@ def _stopped(host):
if host == self._state.client.host:
self.async_schedule_update_ha_state(force_refresh=True)

self.hass.helpers.dispatcher.async_dispatcher_connect(SIGNAL_CLIENT_DATA, _data)
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_CLIENT_DATA, _data
)
)

self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_CLIENT_STARTED, _started
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_CLIENT_STARTED, _started
)
)

self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_CLIENT_STOPPED, _stopped
self.async_on_remove(
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_CLIENT_STOPPED, _stopped
)
)

async def async_update(self):
Expand Down
6 changes: 5 additions & 1 deletion homeassistant/components/arlo/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ def icon(self):

async def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(self.hass, SIGNAL_UPDATE_ARLO, self._update_callback)
self.async_on_remove(
async_dispatcher_connect(
self.hass, SIGNAL_UPDATE_ARLO, self._update_callback
)
)

@callback
def _update_callback(self):
Expand Down
12 changes: 4 additions & 8 deletions homeassistant/components/arlo/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,19 @@ def __init__(self, hass, camera, device_info):
self._ffmpeg_arguments = device_info.get(CONF_FFMPEG_ARGUMENTS)
self._last_refresh = None
self.attrs = {}
self._unsub_disp = None

def camera_image(self):
"""Return a still image response from the camera."""
return self._camera.last_image_from_cache

async def async_added_to_hass(self):
"""Register callbacks."""
self._unsub_disp = async_dispatcher_connect(
self.hass, SIGNAL_UPDATE_ARLO, self.async_write_ha_state
self.async_on_remove(
async_dispatcher_connect(
self.hass, SIGNAL_UPDATE_ARLO, self.async_write_ha_state
)
)

async def async_will_remove_from_hass(self):
"""When entity will be removed from hass."""
self._unsub_disp()
self._unsub_disp = None

async def handle_async_mjpeg_stream(self, request):
"""Generate an HTTP MJPEG stream from the camera."""
video = await self.hass.async_add_executor_job(
Expand Down
6 changes: 5 additions & 1 deletion homeassistant/components/arlo/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ def name(self):

async def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(self.hass, SIGNAL_UPDATE_ARLO, self._update_callback)
self.async_on_remove(
async_dispatcher_connect(
self.hass, SIGNAL_UPDATE_ARLO, self._update_callback
)
)

@callback
def _update_callback(self):
Expand Down
Loading