Compare commits

...

14 Commits
0.59 ... 0.59.2

Author SHA1 Message Date
Paulus Schoutsen
fa324dce9c Merge pull request #10990 from home-assistant/release-0-59-2
0.59.2
2017-12-05 22:17:27 -08:00
Paulus Schoutsen
56c694b477 Revert pychromecast update (#10989)
* Revert pychromecast update

* Update cast.py
2017-12-05 22:11:23 -08:00
Craig J. Ward
3f764f1981 Reload closest store on api menu request (#10962)
* reload closest store on api request

* revert change from debugging
2017-12-05 22:11:22 -08:00
William Scanlon
63d6734612 Allow chime to work for wink siren/chime (#10961)
* Allow Wink siren/chimes to work

* Updated requirements_all.txt
2017-12-05 22:11:22 -08:00
Erik Eriksson
f9743c29cd Upgrade tellduslive library version (closes https://github.com/home-assistant/home-assistant/issues/10922) (#10950) 2017-12-05 22:11:22 -08:00
Mateusz Drab
bdb7a29586 Fix linksys_ap.py by inheriting DeviceScanner (#10947)
As per issue #8638, the class wasn't inheriting from DeviceScanner, this commit patches it up.
2017-12-05 22:11:21 -08:00
Andrey
22c36f0ad3 Require FF43 for latest js (#10941)
* Require FF43 for latest js

`Array.prototype.includes` added in Firefox 43

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes

* Update __init__.py
2017-12-05 22:11:20 -08:00
Paulus Schoutsen
fd6373c7aa Version bump to 0.59.2 2017-12-05 22:10:47 -08:00
Paulus Schoutsen
015cdd155c Merge pull request #10936 from home-assistant/release-0-59-1
0.59.1
2017-12-03 20:08:04 -08:00
Craig J. Ward
d4e603cc6a Dominos no order fix (#10935)
* check for none

* fix error from no store being set

* typo

* Lint

* fix default as per notes. Lint fix and make closest store None not False

* update default
2017-12-03 19:36:49 -08:00
Paulus Schoutsen
7ae374e11f Update frontend to 20171204.0 (#10934) 2017-12-03 19:36:49 -08:00
Will Boyce
292b403dc3 fix ios component config generation (#10923)
Fixes: #19020
2017-12-03 19:36:49 -08:00
Daniel Perna
b815898ddb Fix Notifications for Android TV (#10798)
* Fixed icon path, added dynamic icon

* Addressing requested changes

* Using DEFAULT_ICON

* Using CONF_ICON from const

* Getting hass_frontend path via import

* Lint

* Using embedded 1px transparent icon

* woof -.-

* Lint
2017-12-03 19:36:48 -08:00
Paulus Schoutsen
b1855f1d1d Version bump to 0.59.1 2017-12-03 19:36:41 -08:00
11 changed files with 69 additions and 49 deletions

View File

@@ -11,7 +11,8 @@ import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.device_tracker import DOMAIN, PLATFORM_SCHEMA
from homeassistant.components.device_tracker import (
DOMAIN, PLATFORM_SCHEMA, DeviceScanner)
from homeassistant.const import (
CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_VERIFY_SSL)
@@ -38,7 +39,7 @@ def get_scanner(hass, config):
return None
class LinksysAPDeviceScanner(object):
class LinksysAPDeviceScanner(DeviceScanner):
"""This class queries a Linksys Access Point."""
def __init__(self, config):

View File

@@ -58,7 +58,8 @@ CONFIG_SCHEMA = vol.Schema({
vol.Required(ATTR_PHONE): cv.string,
vol.Required(ATTR_ADDRESS): cv.string,
vol.Optional(ATTR_SHOW_MENU): cv.boolean,
vol.Optional(ATTR_ORDERS): vol.All(cv.ensure_list, [_ORDERS_SCHEMA]),
vol.Optional(ATTR_ORDERS, default=[]): vol.All(
cv.ensure_list, [_ORDERS_SCHEMA]),
}),
}, extra=vol.ALLOW_EXTRA)
@@ -81,7 +82,8 @@ def setup(hass, config):
order = DominosOrder(order_info, dominos)
entities.append(order)
component.add_entities(entities)
if entities:
component.add_entities(entities)
# Return boolean to indicate that initialization was successfully.
return True
@@ -93,7 +95,8 @@ class Dominos():
def __init__(self, hass, config):
"""Set up main service."""
conf = config[DOMAIN]
from pizzapi import Address, Customer, Store
from pizzapi import Address, Customer
from pizzapi.address import StoreException
self.hass = hass
self.customer = Customer(
conf.get(ATTR_FIRST_NAME),
@@ -105,7 +108,10 @@ class Dominos():
*self.customer.address.split(','),
country=conf.get(ATTR_COUNTRY))
self.country = conf.get(ATTR_COUNTRY)
self.closest_store = Store()
try:
self.closest_store = self.address.closest_store()
except StoreException:
self.closest_store = None
def handle_order(self, call):
"""Handle ordering pizza."""
@@ -123,29 +129,32 @@ class Dominos():
from pizzapi.address import StoreException
try:
self.closest_store = self.address.closest_store()
return True
except StoreException:
self.closest_store = False
self.closest_store = None
return False
def get_menu(self):
"""Return the products from the closest stores menu."""
if self.closest_store is False:
self.update_closest_store()
if self.closest_store is None:
_LOGGER.warning('Cannot get menu. Store may be closed')
return
return []
else:
menu = self.closest_store.get_menu()
product_entries = []
menu = self.closest_store.get_menu()
product_entries = []
for product in menu.products:
item = {}
if isinstance(product.menu_data['Variants'], list):
variants = ', '.join(product.menu_data['Variants'])
else:
variants = product.menu_data['Variants']
item['name'] = product.name
item['variants'] = variants
product_entries.append(item)
for product in menu.products:
item = {}
if isinstance(product.menu_data['Variants'], list):
variants = ', '.join(product.menu_data['Variants'])
else:
variants = product.menu_data['Variants']
item['name'] = product.name
item['variants'] = variants
product_entries.append(item)
return product_entries
return product_entries
class DominosProductListView(http.HomeAssistantView):
@@ -192,7 +201,7 @@ class DominosOrder(Entity):
@property
def state(self):
"""Return the state either closed, orderable or unorderable."""
if self.dominos.closest_store is False:
if self.dominos.closest_store is None:
return 'closed'
else:
return 'orderable' if self._orderable else 'unorderable'
@@ -217,6 +226,11 @@ class DominosOrder(Entity):
def order(self):
"""Create the order object."""
from pizzapi import Order
from pizzapi.address import StoreException
if self.dominos.closest_store is None:
raise StoreException
order = Order(
self.dominos.closest_store,
self.dominos.customer,

View File

@@ -23,7 +23,7 @@ from homeassistant.const import CONF_NAME, EVENT_THEMES_UPDATED
from homeassistant.core import callback
from homeassistant.loader import bind_hass
REQUIREMENTS = ['home-assistant-frontend==20171130.0', 'user-agents==1.1.0']
REQUIREMENTS = ['home-assistant-frontend==20171204.0', 'user-agents==1.1.0']
DOMAIN = 'frontend'
DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log']
@@ -583,9 +583,9 @@ def _is_latest(js_option, request):
family_min_version = {
'Chrome': 50, # Probably can reduce this
'Firefox': 41, # Destructuring added in 41
'Firefox': 43, # Array.protopype.includes added in 43
'Opera': 40, # Probably can reduce this
'Edge': 14, # Maybe can reduce this
'Edge': 14, # Array.protopype.includes added in 14
'Safari': 10, # many features not supported by 9
}
version = family_min_version.get(useragent.browser.family)

View File

@@ -264,7 +264,7 @@ class iOSIdentifyDeviceView(HomeAssistantView):
# return self.json_message(humanize_error(request.json, ex),
# HTTP_BAD_REQUEST)
data[ATTR_LAST_SEEN_AT] = datetime.datetime.now()
data[ATTR_LAST_SEEN_AT] = datetime.datetime.now().isoformat()
name = data.get(ATTR_DEVICE_ID)

View File

@@ -20,7 +20,9 @@ from homeassistant.const import (
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
REQUIREMENTS = ['pychromecast==1.0.2']
# Do not upgrade to 1.0.2, it breaks a bunch of stuff
# https://github.com/home-assistant/home-assistant/issues/10926
REQUIREMENTS = ['pychromecast==0.8.2']
_LOGGER = logging.getLogger(__name__)

View File

@@ -4,8 +4,9 @@ Notifications for Android TV notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.nfandroidtv/
"""
import os
import logging
import io
import base64
import requests
import voluptuous as vol
@@ -31,6 +32,9 @@ DEFAULT_TRANSPARENCY = 'default'
DEFAULT_COLOR = 'grey'
DEFAULT_INTERRUPT = False
DEFAULT_TIMEOUT = 5
DEFAULT_ICON = (
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApo'
'cMXEAAAAASUVORK5CYII=')
ATTR_DURATION = 'duration'
ATTR_POSITION = 'position'
@@ -110,16 +114,13 @@ class NFAndroidTVNotificationService(BaseNotificationService):
self._default_color = color
self._default_interrupt = interrupt
self._timeout = timeout
self._icon_file = os.path.join(
os.path.dirname(__file__), '..', 'frontend', 'www_static', 'icons',
'favicon-192x192.png')
self._icon_file = io.BytesIO(base64.b64decode(DEFAULT_ICON))
def send_message(self, message="", **kwargs):
"""Send a message to a Android TV device."""
_LOGGER.debug("Sending notification to: %s", self._target)
payload = dict(filename=('icon.png',
open(self._icon_file, 'rb'),
payload = dict(filename=('icon.png', self._icon_file,
'application/octet-stream',
{'Expires': '0'}), type='0',
title=kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT),
@@ -129,7 +130,7 @@ class NFAndroidTVNotificationService(BaseNotificationService):
transparency='%i' % TRANSPARENCIES.get(
self._default_transparency),
offset='0', app=ATTR_TITLE_DEFAULT, force='true',
interrupt='%i' % self._default_interrupt)
interrupt='%i' % self._default_interrupt,)
data = kwargs.get(ATTR_DATA)
if data:

View File

@@ -24,7 +24,7 @@ APPLICATION_NAME = 'Home Assistant'
DOMAIN = 'tellduslive'
REQUIREMENTS = ['tellduslive==0.10.3']
REQUIREMENTS = ['tellduslive==0.10.4']
_LOGGER = logging.getLogger(__name__)

View File

@@ -28,7 +28,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.config import load_yaml_config_file
from homeassistant.util.json import load_json, save_json
REQUIREMENTS = ['python-wink==1.7.0', 'pubnubsub-handler==1.0.2']
REQUIREMENTS = ['python-wink==1.7.1', 'pubnubsub-handler==1.0.2']
_LOGGER = logging.getLogger(__name__)
@@ -460,10 +460,11 @@ def setup(hass, config):
sirens_to_set.append(siren)
for siren in sirens_to_set:
_man = siren.wink.device_manufacturer()
if (service.service != SERVICE_SET_AUTO_SHUTOFF and
service.service != SERVICE_ENABLE_SIREN and
siren.wink.device_manufacturer() != 'dome'):
_LOGGER.error("Service only valid for Dome sirens.")
(_man != 'dome' and _man != 'wink')):
_LOGGER.error("Service only valid for Dome or Wink sirens.")
return
if service.service == SERVICE_ENABLE_SIREN:
@@ -494,10 +495,11 @@ def setup(hass, config):
component = EntityComponent(_LOGGER, DOMAIN, hass)
sirens = []
has_dome_siren = False
has_dome_or_wink_siren = False
for siren in pywink.get_sirens():
if siren.device_manufacturer() == "dome":
has_dome_siren = True
_man = siren.device_manufacturer()
if _man == "dome" or _man == "wink":
has_dome_or_wink_siren = True
_id = siren.object_id() + siren.name()
if _id not in hass.data[DOMAIN]['unique_ids']:
sirens.append(WinkSirenDevice(siren, hass))
@@ -514,7 +516,7 @@ def setup(hass, config):
descriptions.get(SERVICE_ENABLE_SIREN),
schema=ENABLED_SIREN_SCHEMA)
if has_dome_siren:
if has_dome_or_wink_siren:
hass.services.register(DOMAIN, SERVICE_SET_SIREN_TONE,
service_handle,

View File

@@ -2,7 +2,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 59
PATCH_VERSION = '0'
PATCH_VERSION = '2'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 4, 2)

View File

@@ -331,7 +331,7 @@ hipnotify==1.0.8
holidays==0.8.1
# homeassistant.components.frontend
home-assistant-frontend==20171130.0
home-assistant-frontend==20171204.0
# homeassistant.components.camera.onvif
http://github.com/tgaugry/suds-passworddigest-py3/archive/86fc50e39b4d2b8997481967d6a7fe1c57118999.zip#suds-passworddigest-py3==0.1.2a
@@ -623,7 +623,7 @@ pybbox==0.0.5-alpha
# pybluez==0.22
# homeassistant.components.media_player.cast
pychromecast==1.0.2
pychromecast==0.8.2
# homeassistant.components.media_player.cmus
pycmus==0.1.0
@@ -883,7 +883,7 @@ python-velbus==2.0.11
python-vlc==1.1.2
# homeassistant.components.wink
python-wink==1.7.0
python-wink==1.7.1
# homeassistant.components.sensor.swiss_public_transport
python_opendata_transport==0.0.3
@@ -1063,7 +1063,7 @@ tellcore-net==0.3
tellcore-py==1.1.2
# homeassistant.components.tellduslive
tellduslive==0.10.3
tellduslive==0.10.4
# homeassistant.components.sensor.temper
temperusb==1.5.3

View File

@@ -74,7 +74,7 @@ hbmqtt==0.9.1
holidays==0.8.1
# homeassistant.components.frontend
home-assistant-frontend==20171130.0
home-assistant-frontend==20171204.0
# homeassistant.components.influxdb
# homeassistant.components.sensor.influxdb