Skip to content

Commit

Permalink
Merge pull request #16742 from home-assistant/rc
Browse files Browse the repository at this point in the history
0.78.1
  • Loading branch information
balloob committed Sep 20, 2018
2 parents 9e59fc5 + c7d5f76 commit 0d0d5c8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from homeassistant.helpers.discovery import async_load_platform, async_discover
import homeassistant.util.dt as dt_util

REQUIREMENTS = ['netdisco==2.0.0']
REQUIREMENTS = ['netdisco==2.1.0']

DOMAIN = 'discovery'

Expand Down
23 changes: 18 additions & 5 deletions homeassistant/components/media_player/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ async def async_set_cast_info(self, cast_info):

if self._chromecast is not None:
if old_cast_info.host_port == cast_info.host_port:
# Nothing connection-related updated
_LOGGER.debug("No connection related update: %s",
cast_info.host_port)
return
await self._async_disconnect()

Expand Down Expand Up @@ -403,7 +404,12 @@ async def _async_disconnect(self):

await self.hass.async_add_job(self._chromecast.disconnect)

# Invalidate some attributes
self._invalidate()

self.async_schedule_update_ha_state()

def _invalidate(self):
"""Invalidate some attributes."""
self._chromecast = None
self.cast_status = None
self.media_status = None
Expand All @@ -412,8 +418,6 @@ async def _async_disconnect(self):
self._status_listener.invalidate()
self._status_listener = None

self.async_schedule_update_ha_state()

# ========== Callbacks ==========
def new_cast_status(self, cast_status):
"""Handle updates of the cast status."""
Expand All @@ -428,7 +432,16 @@ def new_media_status(self, media_status):

def new_connection_status(self, connection_status):
"""Handle updates of connection status."""
from pychromecast.socket_client import CONNECTION_STATUS_CONNECTED
from pychromecast.socket_client import CONNECTION_STATUS_CONNECTED, \
CONNECTION_STATUS_DISCONNECTED

_LOGGER.debug("Received cast device connection status: %s",
connection_status.status)
if connection_status.status == CONNECTION_STATUS_DISCONNECTED:
self._available = False
self._invalidate()
self.schedule_update_ha_state()
return

new_available = connection_status.status == CONNECTION_STATUS_CONNECTED
if new_available != self._available:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/snmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ async def async_update(self):
if value is None:
value = STATE_UNKNOWN
elif self._value_template is not None:
value = self._value_template.render_with_possible_json_value(
value = self._value_template.async_render_with_possible_json_value(
value, STATE_UNKNOWN)

self._state = value
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 78
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)
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ ndms2_client==0.0.4
netdata==0.1.2

# homeassistant.components.discovery
netdisco==2.0.0
netdisco==2.1.0

# homeassistant.components.sensor.neurio_energy
neurio==0.3.1
Expand Down

0 comments on commit 0d0d5c8

Please sign in to comment.