0.17.1 (#1771)
* We need to allow extra keys on top level componenet config fixes #1756 * Add comment about location of hass (fixes #1723) * Fix for MQTT config validation on the protocol field. (#1765) * Update frontend with weblink fix * Fix for light service validation. (#1770) Incorrect validation tested if passed value was a list instead of a member of the list. * Accept group without entities in configuration. (#1768) * Accept group without entities in configuration. People seem to use these as placeholders for future expansion of their home automation dreams, and we used to accept them. We still have to specify at least one of 'name', 'view' or 'icon' so that the group is parsed as a dictionary. * Also accept empty entities: key in a group. * Additional fix for empty entities value in a group config. * Version bump to 0.17.1pull/1778/head 0.17.1
parent
e97667aea0
commit
a41514ca50
|
@ -1,2 +1,2 @@
|
|||
"""DO NOT MODIFY. Auto-generated by build_frontend script."""
|
||||
VERSION = "4062ab87999fd5e382074ba9d7a880d7"
|
||||
VERSION = "c2932592a6946e955ddc46f31409b81f"
|
||||
|
|
|
@ -3658,7 +3658,7 @@ e.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceE
|
|||
text-transform: capitalize;
|
||||
line-height: 40px;
|
||||
margin-left: 16px;
|
||||
}</style><template><state-badge state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-badge><a href="[[stateObj.entityDisplay]]" target="_blank" class="name" id="link">[[stateObj.entityDisplay]]</a></template></dom-module><dom-module id="ha-entities-card" assetpath="cards/"><style is="custom-style" include="iron-flex"></style><style>.states {
|
||||
}</style><template><state-badge state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-badge><a href="[[stateObj.state]]" target="_blank" class="name" id="link">[[stateObj.entityDisplay]]</a></template></dom-module><dom-module id="ha-entities-card" assetpath="cards/"><style is="custom-style" include="iron-flex"></style><style>.states {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
.state {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 89a1723f9f5fdaf5b144222b82b73995200ed339
|
||||
Subproject commit ac311416a99f41abbe98142ccac5f84f77d88296
|
|
@ -39,7 +39,7 @@ def _conf_preprocess(value):
|
|||
return value
|
||||
|
||||
_SINGLE_GROUP_CONFIG = vol.Schema(vol.All(_conf_preprocess, {
|
||||
vol.Required(CONF_ENTITIES): cv.entity_ids,
|
||||
vol.Optional(CONF_ENTITIES): vol.Any(None, cv.entity_ids),
|
||||
CONF_VIEW: bool,
|
||||
CONF_NAME: str,
|
||||
CONF_ICON: cv.icon,
|
||||
|
@ -145,7 +145,7 @@ def setup(hass, config):
|
|||
"""Setup all groups found definded in the configuration."""
|
||||
for object_id, conf in config.get(DOMAIN, {}).items():
|
||||
name = conf.get(CONF_NAME, object_id)
|
||||
entity_ids = conf[CONF_ENTITIES]
|
||||
entity_ids = conf.get(CONF_ENTITIES) or []
|
||||
icon = conf.get(CONF_ICON)
|
||||
view = conf.get(CONF_VIEW)
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ LIGHT_TURN_ON_SCHEMA = vol.Schema({
|
|||
ATTR_XY_COLOR: vol.All(vol.ExactSequence((cv.small_float, cv.small_float)),
|
||||
vol.Coerce(tuple)),
|
||||
ATTR_COLOR_TEMP: vol.All(int, vol.Range(min=154, max=500)),
|
||||
ATTR_FLASH: [FLASH_SHORT, FLASH_LONG],
|
||||
ATTR_EFFECT: [EFFECT_COLORLOOP, EFFECT_RANDOM, EFFECT_WHITE],
|
||||
ATTR_FLASH: vol.In([FLASH_SHORT, FLASH_LONG]),
|
||||
ATTR_EFFECT: vol.In([EFFECT_COLORLOOP, EFFECT_RANDOM, EFFECT_WHITE]),
|
||||
})
|
||||
|
||||
LIGHT_TURN_OFF_SCHEMA = vol.Schema({
|
||||
|
|
|
@ -90,7 +90,7 @@ CONFIG_SCHEMA = vol.Schema({
|
|||
vol.Optional(CONF_PASSWORD): cv.string,
|
||||
vol.Optional(CONF_CERTIFICATE): cv.isfile,
|
||||
vol.Optional(CONF_PROTOCOL, default=DEFAULT_PROTOCOL):
|
||||
[PROTOCOL_31, PROTOCOL_311],
|
||||
vol.All(cv.string, vol.In([PROTOCOL_31, PROTOCOL_311])),
|
||||
vol.Optional(CONF_EMBEDDED): _HBMQTT_CONFIG_SCHEMA,
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
|
|
@ -65,7 +65,7 @@ CONFIG_SCHEMA = vol.Schema({
|
|||
vol.Optional(ATTR_DEBUG, default=False): cv.boolean,
|
||||
vol.Optional(ATTR_DUMMY, default=False): cv.boolean,
|
||||
}),
|
||||
})
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
||||
def setup(hass, config):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# coding: utf-8
|
||||
"""Constants used by Home Assistant components."""
|
||||
|
||||
__version__ = "0.17.0"
|
||||
__version__ = "0.17.1"
|
||||
REQUIRED_PYTHON_VER = (3, 4)
|
||||
|
||||
PLATFORM_FORMAT = '{}.{}'
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# This is a simple service file for systems with systemd to tun HA as user.
|
||||
#
|
||||
# For details please check https://home-assistant.io/getting-started/autostart/
|
||||
#
|
||||
[Unit]
|
||||
Description=Home Assistant for %i
|
||||
After=network.target
|
||||
|
@ -9,6 +11,7 @@ Type=simple
|
|||
User=%i
|
||||
# Enable the following line if you get network-related HA errors during boot
|
||||
#ExecStartPre=/usr/bin/sleep 60
|
||||
# Use `whereis hass` to determine the path of hass
|
||||
ExecStart=/usr/bin/hass
|
||||
SendSIGKILL=no
|
||||
|
||||
|
|
|
@ -58,6 +58,17 @@ class TestMQTT(unittest.TestCase):
|
|||
}
|
||||
})
|
||||
|
||||
def test_setup_protocol_validation(self):
|
||||
"""Test for setup failure if connection to broker is missing."""
|
||||
with mock.patch('paho.mqtt.client.Client'):
|
||||
self.hass.config.components = []
|
||||
assert _setup_component(self.hass, mqtt.DOMAIN, {
|
||||
mqtt.DOMAIN: {
|
||||
mqtt.CONF_BROKER: 'test-broker',
|
||||
mqtt.CONF_PROTOCOL: 3.1,
|
||||
}
|
||||
})
|
||||
|
||||
def test_publish_calls_service(self):
|
||||
"""Test the publishing of call to services."""
|
||||
self.hass.bus.listen_once(EVENT_CALL_SERVICE, self.record_calls)
|
||||
|
|
|
@ -226,6 +226,7 @@ class TestComponentsGroup(unittest.TestCase):
|
|||
'view': True,
|
||||
},
|
||||
'test_group': 'hello.world,sensor.happy',
|
||||
'empty_group': {'name': 'Empty Group', 'entities': None},
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue