Skip to content

Commit

Permalink
Merge pull request #12609 from home-assistant/release-0-64
Browse files Browse the repository at this point in the history
0.64.0
  • Loading branch information
balloob authored Feb 25, 2018
2 parents 38da81c + 6c614df commit 5dcf92f
Show file tree
Hide file tree
Showing 468 changed files with 11,447 additions and 5,726 deletions.
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ omit =
homeassistant/components/arduino.py
homeassistant/components/*/arduino.py

homeassistant/components/bmw_connected_drive.py
homeassistant/components/*/bmw_connected_drive.py

homeassistant/components/android_ip_webcam.py
homeassistant/components/*/android_ip_webcam.py

Expand All @@ -38,6 +41,9 @@ omit =
homeassistant/components/asterisk_mbox.py
homeassistant/components/*/asterisk_mbox.py

homeassistant/components/august.py
homeassistant/components/*/august.py

homeassistant/components/axis.py
homeassistant/components/*/axis.py

Expand Down Expand Up @@ -205,6 +211,9 @@ omit =
homeassistant/components/skybell.py
homeassistant/components/*/skybell.py

homeassistant/components/smappee.py
homeassistant/components/*/smappee.py

homeassistant/components/tado.py
homeassistant/components/*/tado.py

Expand Down Expand Up @@ -462,6 +471,7 @@ omit =
homeassistant/components/media_player/vizio.py
homeassistant/components/media_player/vlc.py
homeassistant/components/media_player/volumio.py
homeassistant/components/media_player/xiaomi_tv.py
homeassistant/components/media_player/yamaha.py
homeassistant/components/media_player/yamaha_musiccast.py
homeassistant/components/media_player/ziggo_mediabox_xl.py
Expand Down Expand Up @@ -551,8 +561,10 @@ omit =
homeassistant/components/sensor/etherscan.py
homeassistant/components/sensor/fastdotcom.py
homeassistant/components/sensor/fedex.py
homeassistant/components/sensor/filesize.py
homeassistant/components/sensor/fitbit.py
homeassistant/components/sensor/fixer.py
homeassistant/components/sensor/folder.py
homeassistant/components/sensor/fritzbox_callmonitor.py
homeassistant/components/sensor/fritzbox_netmonitor.py
homeassistant/components/sensor/gearbest.py
Expand Down Expand Up @@ -617,6 +629,7 @@ omit =
homeassistant/components/sensor/sochain.py
homeassistant/components/sensor/sonarr.py
homeassistant/components/sensor/speedtest.py
homeassistant/components/sensor/spotcrime.py
homeassistant/components/sensor/steam_online.py
homeassistant/components/sensor/supervisord.py
homeassistant/components/sensor/swiss_hydrological_data.py
Expand Down
11 changes: 9 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Ensure Docker script files uses LF to support Docker for Windows.
setup_docker_prereqs eol=lf
/virtualization/Docker/scripts/* eol=lf
# Ensure "git config --global core.autocrlf input" before you clone
* text eol=lf
*.py whitespace=error

*.ico binary
*.jpg binary
*.png binary
*.zip binary
*.mp3 binary
7 changes: 7 additions & 0 deletions CODEOWNERS
100644 → 100755
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ homeassistant/components/hassio.py @home-assistant/hassio

# Individual components
homeassistant/components/alarm_control_panel/egardia.py @jeroenterheerdt
homeassistant/components/bmw_connected_drive.py @ChristianKuehnel
homeassistant/components/camera/yi.py @bachya
homeassistant/components/climate/ephember.py @ttroy50
homeassistant/components/climate/eq3btsmart.py @rytilahti
Expand All @@ -54,7 +55,10 @@ homeassistant/components/history_graph.py @andrey-git
homeassistant/components/light/tplink.py @rytilahti
homeassistant/components/light/yeelight.py @rytilahti
homeassistant/components/media_player/kodi.py @armills
homeassistant/components/media_player/mediaroom.py @dgomes
homeassistant/components/media_player/monoprice.py @etsinko
homeassistant/components/media_player/sonos.py @amelchio
homeassistant/components/media_player/xiaomi_tv.py @fattdev
homeassistant/components/media_player/yamaha_musiccast.py @jalmeroth
homeassistant/components/plant.py @ChristianKuehnel
homeassistant/components/sensor/airvisual.py @bachya
Expand All @@ -63,16 +67,19 @@ homeassistant/components/sensor/irish_rail_transport.py @ttroy50
homeassistant/components/sensor/miflora.py @danielhiversen @ChristianKuehnel
homeassistant/components/sensor/pollen.py @bachya
homeassistant/components/sensor/sytadin.py @gautric
homeassistant/components/sensor/sql.py @dgomes
homeassistant/components/sensor/tibber.py @danielhiversen
homeassistant/components/sensor/waqi.py @andrey-git
homeassistant/components/switch/rainmachine.py @bachya
homeassistant/components/switch/tplink.py @rytilahti
homeassistant/components/xiaomi_aqara.py @danielhiversen @syssi

homeassistant/components/*/axis.py @kane610
homeassistant/components/*/bmw_connected_drive.py @ChristianKuehnel
homeassistant/components/*/broadlink.py @danielhiversen
homeassistant/components/hive.py @Rendili @KJonline
homeassistant/components/*/hive.py @Rendili @KJonline
homeassistant/components/homekit/* @cdce8p
homeassistant/components/*/deconz.py @kane610
homeassistant/components/*/rfxtrx.py @danielhiversen
homeassistant/components/velux.py @Julius2342
Expand Down
21 changes: 17 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,23 @@
import inspect

from homeassistant.const import __version__, __short_version__
from setup import (
PROJECT_NAME, PROJECT_LONG_DESCRIPTION, PROJECT_COPYRIGHT, PROJECT_AUTHOR,
PROJECT_GITHUB_USERNAME, PROJECT_GITHUB_REPOSITORY, GITHUB_PATH,
GITHUB_URL)

PROJECT_NAME = 'Home Assistant'
PROJECT_PACKAGE_NAME = 'homeassistant'
PROJECT_AUTHOR = 'The Home Assistant Authors'
PROJECT_COPYRIGHT = ' 2013-2018, {}'.format(PROJECT_AUTHOR)
PROJECT_LONG_DESCRIPTION = ('Home Assistant is an open-source '
'home automation platform running on Python 3. '
'Track and control all devices at home and '
'automate control. '
'Installation in less than a minute.')
PROJECT_GITHUB_USERNAME = 'home-assistant'
PROJECT_GITHUB_REPOSITORY = 'home-assistant'

GITHUB_PATH = '{}/{}'.format(
PROJECT_GITHUB_USERNAME, PROJECT_GITHUB_REPOSITORY)
GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH)


sys.path.insert(0, os.path.abspath('_ext'))
sys.path.insert(0, os.path.abspath('../homeassistant'))
Expand Down
53 changes: 29 additions & 24 deletions homeassistant/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import voluptuous as vol

from homeassistant import (
core, config as conf_util, loader, components as core_components)
core, config as conf_util, config_entries, loader,
components as core_components)
from homeassistant.components import persistent_notification
from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE
from homeassistant.setup import async_setup_component
Expand All @@ -35,13 +36,13 @@


def from_config_dict(config: Dict[str, Any],
hass: Optional[core.HomeAssistant]=None,
config_dir: Optional[str]=None,
enable_log: bool=True,
verbose: bool=False,
skip_pip: bool=False,
log_rotate_days: Any=None,
log_file: Any=None) \
hass: Optional[core.HomeAssistant] = None,
config_dir: Optional[str] = None,
enable_log: bool = True,
verbose: bool = False,
skip_pip: bool = False,
log_rotate_days: Any = None,
log_file: Any = None) \
-> Optional[core.HomeAssistant]:
"""Try to configure Home Assistant from a configuration dictionary.
Expand All @@ -68,12 +69,12 @@ def from_config_dict(config: Dict[str, Any],
@asyncio.coroutine
def async_from_config_dict(config: Dict[str, Any],
hass: core.HomeAssistant,
config_dir: Optional[str]=None,
enable_log: bool=True,
verbose: bool=False,
skip_pip: bool=False,
log_rotate_days: Any=None,
log_file: Any=None) \
config_dir: Optional[str] = None,
enable_log: bool = True,
verbose: bool = False,
skip_pip: bool = False,
log_rotate_days: Any = None,
log_file: Any = None) \
-> Optional[core.HomeAssistant]:
"""Try to configure Home Assistant from a configuration dictionary.
Expand Down Expand Up @@ -123,9 +124,13 @@ def async_from_config_dict(config: Dict[str, Any],
new_config[key] = value or {}
config = new_config

hass.config_entries = config_entries.ConfigEntries(hass, config)
yield from hass.config_entries.async_load()

# Filter out the repeating and common config section [homeassistant]
components = set(key.split(' ')[0] for key in config.keys()
if key != core.DOMAIN)
components.update(hass.config_entries.async_domains())

# setup components
# pylint: disable=not-an-iterable
Expand Down Expand Up @@ -163,11 +168,11 @@ def async_from_config_dict(config: Dict[str, Any],


def from_config_file(config_path: str,
hass: Optional[core.HomeAssistant]=None,
verbose: bool=False,
skip_pip: bool=True,
log_rotate_days: Any=None,
log_file: Any=None):
hass: Optional[core.HomeAssistant] = None,
verbose: bool = False,
skip_pip: bool = True,
log_rotate_days: Any = None,
log_file: Any = None):
"""Read the configuration file and try to start all the functionality.
Will add functionality to 'hass' parameter if given,
Expand All @@ -188,10 +193,10 @@ def from_config_file(config_path: str,
@asyncio.coroutine
def async_from_config_file(config_path: str,
hass: core.HomeAssistant,
verbose: bool=False,
skip_pip: bool=True,
log_rotate_days: Any=None,
log_file: Any=None):
verbose: bool = False,
skip_pip: bool = True,
log_rotate_days: Any = None,
log_file: Any = None):
"""Read the configuration file and try to start all the functionality.
Will add functionality to 'hass' parameter.
Expand Down Expand Up @@ -219,7 +224,7 @@ def async_from_config_file(config_path: str,


@core.callback
def async_enable_logging(hass: core.HomeAssistant, verbose: bool=False,
def async_enable_logging(hass: core.HomeAssistant, verbose: bool = False,
log_rotate_days=None, log_file=None) -> None:
"""Set up the logging.
Expand Down
7 changes: 7 additions & 0 deletions homeassistant/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import homeassistant.config as conf_util
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.service import extract_entity_ids
from homeassistant.helpers import intent
from homeassistant.const import (
ATTR_ENTITY_ID, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE,
SERVICE_HOMEASSISTANT_STOP, SERVICE_HOMEASSISTANT_RESTART,
Expand Down Expand Up @@ -154,6 +155,12 @@ def async_handle_turn_service(service):
ha.DOMAIN, SERVICE_TURN_ON, async_handle_turn_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_TOGGLE, async_handle_turn_service)
hass.helpers.intent.async_register(intent.ServiceIntentHandler(
intent.INTENT_TURN_ON, ha.DOMAIN, SERVICE_TURN_ON, "Turned on {}"))
hass.helpers.intent.async_register(intent.ServiceIntentHandler(
intent.INTENT_TURN_OFF, ha.DOMAIN, SERVICE_TURN_OFF, "Turned off {}"))
hass.helpers.intent.async_register(intent.ServiceIntentHandler(
intent.INTENT_TOGGLE, ha.DOMAIN, SERVICE_TOGGLE, "Toggled {}"))

@asyncio.coroutine
def async_handle_core_service(call):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/abode.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import asyncio
import logging
from functools import partial
from requests.exceptions import HTTPError, ConnectTimeout

import voluptuous as vol

Expand All @@ -17,7 +18,6 @@
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.entity import Entity
from requests.exceptions import HTTPError, ConnectTimeout

REQUIREMENTS = ['abodepy==0.12.2']

Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/alarm_control_panel/canary.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def state(self):
return STATE_ALARM_ARMED_HOME
elif mode.name == LOCATION_MODE_NIGHT:
return STATE_ALARM_ARMED_NIGHT
else:
return None
return None

@property
def device_state_attributes(self):
Expand Down
8 changes: 3 additions & 5 deletions homeassistant/components/alarm_control_panel/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ def state(self):
trigger_time) < dt_util.utcnow():
if self._disarm_after_trigger:
return STATE_ALARM_DISARMED
else:
self._state = self._previous_state
return self._state
self._state = self._previous_state
return self._state

if self._state in SUPPORTED_PENDING_STATES and \
self._within_pending_time(self._state):
Expand All @@ -187,8 +186,7 @@ def _active_state(self):
"""Get the current state."""
if self.state == STATE_ALARM_PENDING:
return self._previous_state
else:
return self._state
return self._state

def _pending_time(self, state):
"""Get the pending time."""
Expand Down
8 changes: 3 additions & 5 deletions homeassistant/components/alarm_control_panel/manual_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ def state(self):
trigger_time) < dt_util.utcnow():
if self._disarm_after_trigger:
return STATE_ALARM_DISARMED
else:
self._state = self._previous_state
return self._state
self._state = self._previous_state
return self._state

if self._state in SUPPORTED_PENDING_STATES and \
self._within_pending_time(self._state):
Expand All @@ -223,8 +222,7 @@ def _active_state(self):
"""Get the current state."""
if self.state == STATE_ALARM_PENDING:
return self._previous_state
else:
return self._state
return self._state

def _pending_time(self, state):
"""Get the pending time."""
Expand Down
Loading

0 comments on commit 5dcf92f

Please sign in to comment.