mirror of
https://github.com/home-assistant/core.git
synced 2025-09-25 12:59:29 +00:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7818c98c67 | ||
![]() |
e12222697c | ||
![]() |
58f28f177d | ||
![]() |
6030e419c5 | ||
![]() |
8d2a784831 | ||
![]() |
5dc841ecae | ||
![]() |
584bfbaa76 | ||
![]() |
0f140751b2 | ||
![]() |
6aa9844f8f | ||
![]() |
177594f02c | ||
![]() |
3f841a36a5 | ||
![]() |
80ae02cc49 | ||
![]() |
421b2962c6 | ||
![]() |
bde5a9ef01 | ||
![]() |
b79886ad85 | ||
![]() |
f083abbed1 | ||
![]() |
4dd8423b9b | ||
![]() |
8ba2ab567e | ||
![]() |
3d821b9148 | ||
![]() |
04720175b9 | ||
![]() |
93ad7b2e45 | ||
![]() |
9b12dd66e4 |
@@ -16,6 +16,7 @@ variables:
|
||||
value: '0.3'
|
||||
- group: docker
|
||||
- group: wheels
|
||||
- group: github
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -141,3 +142,45 @@ jobs:
|
||||
-r https://github.com/home-assistant/hassio-homeassistant \
|
||||
-t machine --docker-hub homeassistant
|
||||
displayName: 'Build Release'
|
||||
|
||||
|
||||
- job: 'ReleasePublish'
|
||||
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('Release'))
|
||||
dependsOn:
|
||||
- 'Release'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
git jq
|
||||
|
||||
git config --global user.name "Pascal Vizeli"
|
||||
git config --global user.email "pvizeli@syshack.ch"
|
||||
git config --global credential.helper store
|
||||
|
||||
echo "https://$(githubToken):x-oauth-basic@github.com" > $HOME\.git-credentials
|
||||
displayName: 'Install requirements'
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
version="$(Build.SourceBranchName)"
|
||||
|
||||
git clone https://github.com/home-assistant/hassio-version
|
||||
cd hassio-version
|
||||
|
||||
dev_version="$(jq --raw-output '.homeassistant.default' dev.json)"
|
||||
beta_version="$(jq --raw-output '.homeassistant.default' beta.json)"
|
||||
stable_version="$(jq --raw-output '.homeassistant.default' stable.json)"
|
||||
|
||||
if [[ "$version" =~ b ]]; then
|
||||
sed -i "s|$dev_version|$version|g" dev.json
|
||||
sed -i "s|$beta_version|$version|g" beta.json
|
||||
else
|
||||
sed -i "s|$dev_version|$version|g" dev.json
|
||||
sed -i "s|$beta_version|$version|g" beta.json
|
||||
sed -i "s|$stable_version|$version|g" stable.json
|
||||
fi
|
||||
|
||||
git commit -am "Bump Home Assistant $version"
|
||||
git push
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"name": "Home Assistant Frontend",
|
||||
"documentation": "https://www.home-assistant.io/components/frontend",
|
||||
"requirements": [
|
||||
"home-assistant-frontend==20190510.0"
|
||||
"home-assistant-frontend==20190514.0"
|
||||
],
|
||||
"dependencies": [
|
||||
"api",
|
||||
|
@@ -72,7 +72,7 @@ async def handle_webhook(hass, webhook_id, request):
|
||||
data = WEBHOOK_SCHEMA(dict(await request.post()))
|
||||
except vol.MultipleInvalid as error:
|
||||
return web.Response(
|
||||
body=error.error_message,
|
||||
text=error.error_message,
|
||||
status=HTTP_UNPROCESSABLE_ENTITY
|
||||
)
|
||||
|
||||
|
@@ -53,7 +53,6 @@ TYPE_SENSOR = PREFIX_TYPES + 'SENSOR'
|
||||
TYPE_DOOR = PREFIX_TYPES + 'DOOR'
|
||||
TYPE_TV = PREFIX_TYPES + 'TV'
|
||||
TYPE_SPEAKER = PREFIX_TYPES + 'SPEAKER'
|
||||
TYPE_MEDIA = PREFIX_TYPES + 'MEDIA'
|
||||
|
||||
SERVICE_REQUEST_SYNC = 'request_sync'
|
||||
HOMEGRAPH_URL = 'https://homegraph.googleapis.com/'
|
||||
@@ -89,7 +88,7 @@ DOMAIN_TO_GOOGLE_TYPES = {
|
||||
input_boolean.DOMAIN: TYPE_SWITCH,
|
||||
light.DOMAIN: TYPE_LIGHT,
|
||||
lock.DOMAIN: TYPE_LOCK,
|
||||
media_player.DOMAIN: TYPE_MEDIA,
|
||||
media_player.DOMAIN: TYPE_SWITCH,
|
||||
scene.DOMAIN: TYPE_SCENE,
|
||||
script.DOMAIN: TYPE_SCENE,
|
||||
switch.DOMAIN: TYPE_SWITCH,
|
||||
|
@@ -55,8 +55,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
|
||||
_LOGGER.warning(
|
||||
"The honeywell component is deprecated for EU (i.e. non-US) systems, "
|
||||
"this functionality will be removed in version 0.96.")
|
||||
_LOGGER.warning(
|
||||
"this functionality will be removed in version 0.96. "
|
||||
"Please switch to the evohome component, "
|
||||
"see: https://home-assistant.io/components/evohome")
|
||||
|
||||
|
@@ -58,7 +58,7 @@ async def handle_webhook(hass, webhook_id, request):
|
||||
data = WEBHOOK_SCHEMA(dict(await request.post()))
|
||||
except vol.MultipleInvalid as error:
|
||||
return web.Response(
|
||||
body=error.error_message,
|
||||
text=error.error_message,
|
||||
status=HTTP_UNPROCESSABLE_ENTITY
|
||||
)
|
||||
|
||||
@@ -76,7 +76,7 @@ async def handle_webhook(hass, webhook_id, request):
|
||||
location_name
|
||||
)
|
||||
return web.Response(
|
||||
body='Setting location to {}'.format(location_name),
|
||||
text='Setting location to {}'.format(location_name),
|
||||
status=HTTP_OK
|
||||
)
|
||||
|
||||
|
@@ -81,7 +81,7 @@ def registration_context(registration: Dict) -> Context:
|
||||
|
||||
def empty_okay_response(headers: Dict = None, status: int = 200) -> Response:
|
||||
"""Return a Response with empty JSON object and a 200."""
|
||||
return Response(body='{}', status=status, content_type='application/json',
|
||||
return Response(text='{}', status=status, content_type='application/json',
|
||||
headers=headers)
|
||||
|
||||
|
||||
|
@@ -145,7 +145,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
# Only create sensors for monitored properties
|
||||
for condition in monitored_conditions:
|
||||
dev.append(NetatmoSensor(
|
||||
data, module_name, condition))
|
||||
data, module_name, condition.lower()))
|
||||
|
||||
for module_name, _ in not_handled.items():
|
||||
_LOGGER.error('Module name: "%s" not found', module_name)
|
||||
|
@@ -164,27 +164,28 @@ class ONVIFHassCamera(Camera):
|
||||
|
||||
system_date = dt_util.utcnow()
|
||||
device_time = await devicemgmt.GetSystemDateAndTime()
|
||||
cdate = device_time.UTCDateTime
|
||||
cam_date = dt.datetime(cdate.Date.Year, cdate.Date.Month,
|
||||
cdate.Date.Day, cdate.Time.Hour,
|
||||
cdate.Time.Minute, cdate.Time.Second,
|
||||
0, dt_util.UTC)
|
||||
if device_time:
|
||||
cdate = device_time.UTCDateTime
|
||||
cam_date = dt.datetime(cdate.Date.Year, cdate.Date.Month,
|
||||
cdate.Date.Day, cdate.Time.Hour,
|
||||
cdate.Time.Minute, cdate.Time.Second,
|
||||
0, dt_util.UTC)
|
||||
|
||||
_LOGGER.debug("Camera date/time: %s",
|
||||
cam_date)
|
||||
_LOGGER.debug("Camera date/time: %s",
|
||||
cam_date)
|
||||
|
||||
_LOGGER.debug("System date/time: %s",
|
||||
system_date)
|
||||
_LOGGER.debug("System date/time: %s",
|
||||
system_date)
|
||||
|
||||
dt_diff = cam_date - system_date
|
||||
dt_diff_seconds = dt_diff.total_seconds()
|
||||
dt_diff = cam_date - system_date
|
||||
dt_diff_seconds = dt_diff.total_seconds()
|
||||
|
||||
if dt_diff_seconds > 5:
|
||||
_LOGGER.warning("The date/time on the camera is '%s', "
|
||||
"which is different from the system '%s', "
|
||||
"this could lead to authentication issues",
|
||||
cam_date,
|
||||
system_date)
|
||||
if dt_diff_seconds > 5:
|
||||
_LOGGER.warning("The date/time on the camera is '%s', "
|
||||
"which is different from the system '%s', "
|
||||
"this could lead to authentication issues",
|
||||
cam_date,
|
||||
system_date)
|
||||
|
||||
_LOGGER.debug("Obtaining input uri")
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"name": "Onvif",
|
||||
"documentation": "https://www.home-assistant.io/components/onvif",
|
||||
"requirements": [
|
||||
"onvif-zeep-async==0.1.3"
|
||||
"onvif-zeep-async==0.2.0"
|
||||
],
|
||||
"dependencies": [
|
||||
"ffmpeg"
|
||||
|
@@ -73,7 +73,6 @@ async def async_migrate_entry(hass, entry):
|
||||
|
||||
# Remove old entity entry.
|
||||
registry.async_remove(entity_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# Format old unique_id.
|
||||
unique_id = format_unique_id(entry.data[CONF_TOKEN], unique_id)
|
||||
|
@@ -66,7 +66,7 @@ class ZestimateDataSensor(Entity):
|
||||
self.data = None
|
||||
self.address = None
|
||||
self._state = None
|
||||
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return the ZPID."""
|
||||
|
@@ -27,6 +27,7 @@ class OnOffChannel(ZigbeeChannel):
|
||||
"""Initialize OnOffChannel."""
|
||||
super().__init__(cluster, device)
|
||||
self._state = None
|
||||
self._off_listener = None
|
||||
|
||||
@callback
|
||||
def cluster_command(self, tsn, command_id, args):
|
||||
@@ -48,9 +49,12 @@ class OnOffChannel(ZigbeeChannel):
|
||||
on_time = args[1]
|
||||
# 0 is always accept 1 is only accept when already on
|
||||
if should_accept == 0 or (should_accept == 1 and self._state):
|
||||
if self._off_listener is not None:
|
||||
self._off_listener()
|
||||
self._off_listener = None
|
||||
self.attribute_updated(self.ON_OFF, True)
|
||||
if on_time > 0:
|
||||
async_call_later(
|
||||
self._off_listener = async_call_later(
|
||||
self.device.hass,
|
||||
(on_time / 10), # value is in 10ths of a second
|
||||
self.set_to_off
|
||||
@@ -61,6 +65,7 @@ class OnOffChannel(ZigbeeChannel):
|
||||
@callback
|
||||
def set_to_off(self, *_):
|
||||
"""Set the state to off."""
|
||||
self._off_listener = None
|
||||
self.attribute_updated(self.ON_OFF, False)
|
||||
|
||||
@callback
|
||||
|
@@ -93,6 +93,8 @@ class ZHAGateway:
|
||||
|
||||
init_tasks = []
|
||||
for device in self.application_controller.devices.values():
|
||||
if device.nwk == 0x0000:
|
||||
continue
|
||||
init_tasks.append(self.async_device_initialized(device, False))
|
||||
await asyncio.gather(*init_tasks)
|
||||
|
||||
|
@@ -142,8 +142,8 @@ class ZhaDeviceEntity(ZhaEntity):
|
||||
"""Get the latest battery reading from channels cache."""
|
||||
battery = await self._battery_channel.get_attribute_value(
|
||||
'battery_percentage_remaining')
|
||||
if battery is not None:
|
||||
# per zcl specs battery percent is reported at 200% ¯\_(ツ)_/¯
|
||||
# per zcl specs battery percent is reported at 200% ¯\_(ツ)_/¯
|
||||
if battery is not None and battery != -1:
|
||||
battery = battery / 2
|
||||
battery = int(round(battery))
|
||||
self._device_state_attributes['battery_level'] = battery
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"documentation": "https://www.home-assistant.io/components/zha",
|
||||
"requirements": [
|
||||
"bellows-homeassistant==0.7.3",
|
||||
"zha-quirks==0.0.12",
|
||||
"zha-quirks==0.0.13",
|
||||
"zigpy-deconz==0.1.4",
|
||||
"zigpy-homeassistant==0.3.3",
|
||||
"zigpy-xbee-homeassistant==0.2.1"
|
||||
|
@@ -24,6 +24,13 @@ def pass_through_formatter(value):
|
||||
return value
|
||||
|
||||
|
||||
def illuminance_formatter(value):
|
||||
"""Convert Illimination data."""
|
||||
if value is None:
|
||||
return None
|
||||
return round(pow(10, ((value - 1) / 10000)), 1)
|
||||
|
||||
|
||||
def temperature_formatter(value):
|
||||
"""Convert temperature data."""
|
||||
if value is None:
|
||||
@@ -58,6 +65,7 @@ FORMATTER_FUNC_REGISTRY = {
|
||||
TEMPERATURE: temperature_formatter,
|
||||
PRESSURE: pressure_formatter,
|
||||
ELECTRICAL_MEASUREMENT: active_power_formatter,
|
||||
ILLUMINANCE: illuminance_formatter,
|
||||
GENERIC: pass_through_formatter,
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"""Constants used by Home Assistant components."""
|
||||
MAJOR_VERSION = 0
|
||||
MINOR_VERSION = 93
|
||||
PATCH_VERSION = '0b2'
|
||||
PATCH_VERSION = '1'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
REQUIRED_PYTHON_VER = (3, 5, 3)
|
||||
|
@@ -563,7 +563,7 @@ hole==0.3.0
|
||||
holidays==0.9.10
|
||||
|
||||
# homeassistant.components.frontend
|
||||
home-assistant-frontend==20190510.0
|
||||
home-assistant-frontend==20190514.0
|
||||
|
||||
# homeassistant.components.zwave
|
||||
homeassistant-pyozw==0.1.4
|
||||
@@ -797,7 +797,7 @@ oemthermostat==1.1
|
||||
onkyo-eiscp==1.2.4
|
||||
|
||||
# homeassistant.components.onvif
|
||||
onvif-zeep-async==0.1.3
|
||||
onvif-zeep-async==0.2.0
|
||||
|
||||
# homeassistant.components.openevse
|
||||
openevsewifi==0.4
|
||||
@@ -1851,7 +1851,7 @@ zengge==0.2
|
||||
zeroconf==0.22.0
|
||||
|
||||
# homeassistant.components.zha
|
||||
zha-quirks==0.0.12
|
||||
zha-quirks==0.0.13
|
||||
|
||||
# homeassistant.components.zhong_hong
|
||||
zhong_hong_hvac==1.0.9
|
||||
|
@@ -145,7 +145,7 @@ hdate==0.8.7
|
||||
holidays==0.9.10
|
||||
|
||||
# homeassistant.components.frontend
|
||||
home-assistant-frontend==20190510.0
|
||||
home-assistant-frontend==20190514.0
|
||||
|
||||
# homeassistant.components.homekit_controller
|
||||
homekit[IP]==0.14.0
|
||||
|
@@ -147,7 +147,7 @@ DEMO_DEVICES = [{
|
||||
'action.devices.traits.Modes'
|
||||
],
|
||||
'type':
|
||||
'action.devices.types.MEDIA',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
@@ -162,7 +162,7 @@ DEMO_DEVICES = [{
|
||||
'action.devices.traits.Modes'
|
||||
],
|
||||
'type':
|
||||
'action.devices.types.MEDIA',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
@@ -171,7 +171,7 @@ DEMO_DEVICES = [{
|
||||
'name': 'Lounge room'
|
||||
},
|
||||
'traits': ['action.devices.traits.OnOff', 'action.devices.traits.Modes'],
|
||||
'type': 'action.devices.types.MEDIA',
|
||||
'type': 'action.devices.types.SWITCH',
|
||||
'willReportState': False
|
||||
}, {
|
||||
'id':
|
||||
@@ -182,7 +182,7 @@ DEMO_DEVICES = [{
|
||||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Volume'],
|
||||
'type':
|
||||
'action.devices.types.MEDIA',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@@ -686,7 +686,7 @@ async def test_device_class_cover(hass, device_class, google_type):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("device_class,google_type", [
|
||||
('non_existing_class', 'action.devices.types.MEDIA'),
|
||||
('non_existing_class', 'action.devices.types.SWITCH'),
|
||||
('speaker', 'action.devices.types.SPEAKER'),
|
||||
('tv', 'action.devices.types.TV'),
|
||||
])
|
||||
|
@@ -139,7 +139,7 @@ async def async_test_pressure(hass, device_info):
|
||||
async def async_test_illuminance(hass, device_info):
|
||||
"""Test illuminance sensor."""
|
||||
await send_attribute_report(hass, device_info["cluster"], 0, 10)
|
||||
assert_state(hass, device_info, '10', 'lx')
|
||||
assert_state(hass, device_info, '1.0', 'lx')
|
||||
|
||||
|
||||
async def async_test_metering(hass, device_info):
|
||||
|
Reference in New Issue
Block a user