Skip to content
Merged

0.79.0 #16940

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
99f7b7f
Version bump to 0.79.0dev0
balloob Sep 10, 2018
d2d715f
Upgrade wakeonlan to 1.1.6 (#16512)
fabaff Sep 10, 2018
e96635b
bugfix - incorrect camera type and missing sensors when multiple neta…
vikramgorla Sep 10, 2018
f858938
Make the Qnap sensor more resilient if server is not reachable (#16445)
mrosseel Sep 10, 2018
dcd7b9a
Fix insteon Hub v1 support (#16472)
teharris1 Sep 10, 2018
cfe5db4
Fail fetch auth providers if onboarding required (#16454)
balloob Sep 10, 2018
a059cc8
Update PyRMVtransport version (#16547)
cgtobi Sep 11, 2018
ee69664
Isort preparations (#16555)
scop Sep 11, 2018
6b08e6e
Fix arlo intilization when no base station available (#16529)
zellux Sep 11, 2018
20f6cb7
Replace api_password in Camera.Push (#16339)
dgomes Sep 11, 2018
50fb594
Store notifications in component. Add ws endpoint for fetching. (#16503)
jeradM Sep 11, 2018
9583947
Long-lived access token (#16453)
awarecan Sep 11, 2018
4e3faf6
Fix typo (#16556)
balloob Sep 11, 2018
0db13a9
Add websocket commands for refresh tokens (#16559)
balloob Sep 11, 2018
3f06b4e
Update translations
balloob Sep 11, 2018
629c4a0
Update frontend to 20180911.0
balloob Sep 11, 2018
06af764
Fix invalid state (#16558)
balloob Sep 11, 2018
188f5de
Fixes an OpenUV bug with the scan interval (#16570)
bachya Sep 11, 2018
6bd120f
Bump pyeconet (#16571)
Sep 12, 2018
e2465da
yr: use async syntax (#16563)
Danielhiversen Sep 12, 2018
34d369b
Return if refresh token is current used one in WS API (#16575)
awarecan Sep 12, 2018
601f2df
Notifications for Android TV: Add fontsize and sending images (#16565)
danielperna84 Sep 12, 2018
beed82a
Upgrade pytest to 3.8.0 and pytest-timeout to 1.3.2 (#16489)
scop Sep 12, 2018
117ea9e
Refactor zha/async_device_initialized(). (#16485)
Adminiuga Sep 12, 2018
501f2b0
Update fan.zha platform. (#16551)
Adminiuga Sep 12, 2018
77026a2
Increasing python-websockets' version number (#16578)
zoe1337 Sep 12, 2018
453cbb7
Update frontend to 20180912.0
balloob Sep 12, 2018
ff78a5b
Track refresh token last usage information (#16408)
awarecan Sep 12, 2018
4efe863
Hangouts help "page" and little bugfix (#16464)
hobbypunk90 Sep 12, 2018
308b7fb
Add retry limit for chromecast connection (#16471)
awarecan Sep 12, 2018
2682d26
Konnected component feature updates (#16479)
heythisisnate Sep 12, 2018
3824582
Add config entry to iOS (#16580)
balloob Sep 12, 2018
cb542a9
Switchmate (#16395)
Danielhiversen Sep 12, 2018
d0aeb90
Update pyhomematic to 0.1.48 (#16588)
danielperna84 Sep 12, 2018
1586d30
Fix broken bluetooth tracker (#16589)
awarecan Sep 13, 2018
f2203e5
Add configure_reporting() method to zha component (#16487)
Adminiuga Sep 13, 2018
7a52bbd
Allow only_cache parameter in zha.safe_read() (#16553)
Adminiuga Sep 13, 2018
901dd9a
Update tibber lib version (#16590)
Danielhiversen Sep 13, 2018
aec134c
xiaomi lib 0.10.0 (#16591)
Danielhiversen Sep 13, 2018
f43d9ba
Support for the Quirky Nimbus (#16520)
Sep 13, 2018
f63dba5
Multiple tag managers for Wireless Sensor Tags. (#16353)
sergeymaysak Sep 13, 2018
e59ba28
Add Huawei LTE router platform, device tracker, and sensor (#16498)
scop Sep 13, 2018
d076251
Changing z-wave brightness calculation to respect 0x01 and 0x02 byte …
Harvtronix Sep 13, 2018
67b5b5b
Add myself to CODEOWNERS for upcloud (#16599)
scop Sep 14, 2018
05c0717
Add websocket list APIs for the registries (#16597)
balloob Sep 14, 2018
72e746d
MQTT config entry (#16594)
balloob Sep 14, 2018
481f6e0
Upgrade python-twitch-client to 0.6.0 (#16602)
fabaff Sep 14, 2018
e82e75b
Improve precision of timer ticks (#16598)
amelchio Sep 14, 2018
7705666
Rewrite bluetooth le (#16592)
pvizeli Sep 14, 2018
0d0bda9
Switch components.sensor.zha to await syntax. (#16619)
Adminiuga Sep 14, 2018
9c1a539
Adding support for RTDSContactSensor and RTDSMotionSensor in Tahoma ……
christopheBfr Sep 14, 2018
8ce2d70
fix bug where momentary switch with activation low does not reset (#1…
heythisisnate Sep 14, 2018
1ca09ea
Extracting zoneminder to a new library (#16527)
rohankapoorcom Sep 15, 2018
0c945d8
Add @rohankapoorcom to CODEOWNERS for the zoneminder platform (#16627)
rohankapoorcom Sep 15, 2018
e054e4d
Small huawei_lte improvements (#16626)
scop Sep 15, 2018
00918af
Upgrade pwmled to 1.3.0 (#16624)
soldag Sep 15, 2018
19514ea
Clean up MjpegCamera by removing unnused hass object in __init__ (#16…
rohankapoorcom Sep 15, 2018
cc38981
Update developer doc links to developers.home-assistant.io (#16622)
scop Sep 15, 2018
34deaf8
Add valid_window=1 to TOTP verify (#16625)
awarecan Sep 15, 2018
05922ac
Add new devices to HomematicIP Cloud (#16636)
worm-ee Sep 15, 2018
9c9df79
New EDP re:dy component (#16426)
abmantis Sep 15, 2018
baeb791
Upgrade Switchmate lib (#16637)
Danielhiversen Sep 16, 2018
2002497
Upgrade zeroconf to 0.21.0 (#16647)
tadly Sep 16, 2018
a1e6e04
Update pyhomematic to 0.1.49 (#16649)
danielperna84 Sep 16, 2018
5e3e441
Upgrade holidays to 0.9.7 (#16651)
fabaff Sep 17, 2018
fea1c92
Fix link to docs (#16652)
fabaff Sep 17, 2018
44fdfdf
Log raw result of configure_reporting() command. (#16655)
Adminiuga Sep 17, 2018
3e0c6c1
Rework timer delays (#16650)
amelchio Sep 17, 2018
201fd4a
Add config entries to connection class (#16618)
balloob Sep 17, 2018
1c25100
Add zha device entity (#14579)
damarco Sep 17, 2018
849a93e
Update translations
balloob Sep 15, 2018
b825786
Clean up device update, add via-hub (#16659)
balloob Sep 17, 2018
41ac2a3
Bump frontend to 20180917.0
balloob Sep 17, 2018
4b30cbb
Update translations
balloob Sep 17, 2018
25712f1
Jewish calendar sensor (#16393)
tsvi Sep 17, 2018
27d50d3
Fixes an AirVisual bug where response data is missing (#16673)
bachya Sep 17, 2018
a7325eb
Suppress traceback and log error (#16669)
fabaff Sep 18, 2018
72419a1
Fix Ecovacs vacuums showing "None" for name (#16654)
OverloadUT Sep 18, 2018
d2246d5
Fix test
fabaff Sep 18, 2018
cba3a5b
Upgrade paho-mqtt to 1.4.0 (#16688)
fabaff Sep 18, 2018
2a85ed7
Streamline log messages (#16243)
Sep 18, 2018
1913d07
Upgrade zeroconf to 0.21.1 (#16687)
fabaff Sep 18, 2018
8e7f783
Added velbus counter sensors, updated to py-velbus 2.0.20 (#16683)
cereal2nd Sep 18, 2018
56b0d2e
Added support for Starling Bank (#16522)
dullage Sep 18, 2018
b7ef4dd
Netdata configuration change: Allows multiple elements per group (#16…
reefab Sep 18, 2018
7f462ba
Upgrade mypy to 0.630 (#16674)
scop Sep 19, 2018
d376049
Use one regex for Hass.io URL check (#16710)
pvizeli Sep 19, 2018
da108f1
bump frontend to 20180919.0
balloob Sep 19, 2018
0121e3c
Remove usage of "run_until_complete" (#16617)
smurfix Sep 19, 2018
227a1b9
More isort preparations (#16633)
scop Sep 19, 2018
d4b7057
Use posargs in tox lint env (#16646)
scop Sep 19, 2018
3160fa5
Make pylint report non-LF linefeeds per the style guidelines (#16601)
scop Sep 19, 2018
a1c524d
Config flow tradfri (#16665)
balloob Sep 19, 2018
6e4a6cc
SnmpSensor: Fix async_update (#16679) (#16716)
mtdcr Sep 19, 2018
60dfd68
MyQ Open State Fix (#16681)
geekofweek Sep 19, 2018
da88267
Save disabled_by in entity registry (#16699)
cgarwood Sep 19, 2018
258beb9
Upgrading librouteros version (#16718)
kunago Sep 20, 2018
27eede7
Add unique_id to mqtt_json light (#16721)
nikolaykasyanov Sep 20, 2018
fcb84d9
On-demand update of swiss public transport sensor (#16723)
vikramgorla Sep 20, 2018
dfe38b4
Upgrade youtube_dl to 2018.09.18 (#16729)
fabaff Sep 20, 2018
d3658c4
Upgrade zeroconf to 0.21.2 (#16730)
fabaff Sep 20, 2018
aa76353
Met.no weather platform (#16582)
Danielhiversen Sep 20, 2018
3a45481
Handle chromecast CONNECTION_STATUS_DISCONNECTED event (#16732)
awarecan Sep 20, 2018
3500547
Upgrade keyring to 15.1.0 (#16734)
fabaff Sep 20, 2018
d1acb03
Upgrade netdisco to 2.1.0 (#16735)
awarecan Sep 20, 2018
93af3c5
Avoid calling yr update every second for a minute ones every hour (#1…
Danielhiversen Sep 20, 2018
39ea9a8
Upgrade shodan to 1.10.2 (#16736)
fabaff Sep 20, 2018
fc6cc22
Bump frontend to 20180920.0
balloob Sep 20, 2018
874225d
Merge branch 'master' into dev
balloob Sep 20, 2018
e58836f
Add subscription info endpoint (#16727)
balloob Sep 20, 2018
c6ccbed
Small cleanup for slack (#16743)
pvizeli Sep 20, 2018
3ea8c25
light.zha: Catch exceptions for all commands. (#16752)
Adminiuga Sep 20, 2018
03de658
Changed save_on_change to default to False (#16744)
zoe1337 Sep 20, 2018
092c146
Add option to disable specific integrations (#16757)
balloob Sep 20, 2018
78b6439
Use pysonos for Sonos media player (#16753)
amelchio Sep 20, 2018
90c18d1
deCONZ add via_hub attribute for device registry (#16760)
Kane610 Sep 21, 2018
c475a87
Upgrade pysonos to 0.0.2 (#16761)
amelchio Sep 21, 2018
df67093
Fix faulty color temp crashing google (#16758)
balloob Sep 21, 2018
98b92c7
Add Call Data Log platform. Mailboxes no longer require media (#16579)
PhracturedBlue Sep 21, 2018
3d1c8ee
Implement support for complex templates in script delays (#16442)
rohankapoorcom Sep 21, 2018
aeaf694
Add Logi Circle component, camera and sensor platform (#16540)
evanjd Sep 21, 2018
9fdf123
Zha switch schedule update state (#16621)
Adminiuga Sep 21, 2018
3bfe9e7
Add Carbon Monoxide HomeKit Sensor (#16664)
cdce8p Sep 21, 2018
a0a54df
Add unique_id to mqtt camera (#16569)
bieniu Sep 21, 2018
3e59ffb
Add tradfri device info (#16768)
balloob Sep 21, 2018
d5813cf
Make rest sensor and binary sensor more efficient (#14484)
exxamalte Sep 21, 2018
2131717
Refactored units and icons for the Dyson sensors (#14550)
glpatcern Sep 21, 2018
8b42d0c
Add confirmation to Cast/Sonos/iOS config entries (#16769)
balloob Sep 21, 2018
7fe0d8b
deCONZ cover support (#16759)
Kane610 Sep 21, 2018
18d37ff
GeoJSON platform (#16610)
exxamalte Sep 21, 2018
ee3f17d
Bump gtts-token to 1.1.2 (#16775)
edif30 Sep 21, 2018
41bb476
Upgrade restrictedpython to 4.0b5 (#16779)
fabaff Sep 21, 2018
e9c7fe1
Upgrade bimmer_connected to 0.5.2 (#16780)
gerard33 Sep 22, 2018
5613816
Fix Windows loop (#16737)
balloob Sep 22, 2018
eec6722
Fix return to base logic for neato (#16776)
dshokouhi Sep 22, 2018
cfd1aec
Update Tibber lib (#16795)
Danielhiversen Sep 22, 2018
94d38a1
Bump pybotvac to 0.0.10 (#16799)
dshokouhi Sep 23, 2018
0d681b0
Bump zm-py up to 0.0.2 (#16800)
rohankapoorcom Sep 23, 2018
eca1f05
Bump sucks (Ecovacs) lib to 0.9.3 (#16803)
OverloadUT Sep 23, 2018
127395a
Upgrade zeroconf to 0.21.3 (#16789)
tadly Sep 23, 2018
539b86e
Add Tuya cover state (#16709)
huangyupeng Sep 23, 2018
eaee551
Add configurable host for bbox routers (#16778)
pbiester Sep 23, 2018
e90abf1
Set botvac state when offline (#16805)
dshokouhi Sep 23, 2018
2258c56
Handle netgear_lte connection errors (#16806)
amelchio Sep 23, 2018
329d9df
Improve opentherm_gw state detection (#16809)
mvn23 Sep 23, 2018
564ad7e
Rework chromecast fix (#16804)
awarecan Sep 23, 2018
4fd2f77
Add linky sensor (#16468)
tiste Sep 24, 2018
a5cb4e6
Use pyspcwebgw for SPC component (#16214)
mbrrg Sep 24, 2018
5ee4718
Remove discovered MQTT Switch device when discovery topic is cleared …
emontnemery Sep 24, 2018
ad47ece
Allow split component definitions in packages (#16177)
thomasloven Sep 24, 2018
7a77951
Add Notify MFA module (#16314)
awarecan Sep 24, 2018
1f74ada
Broadlink service name (#16345)
Danielhiversen Sep 24, 2018
33d6c99
Add Python 3.7 classifier (#16645)
scop Sep 24, 2018
589554a
Allow soundtouch to play https content too (#16713)
robin13 Sep 24, 2018
dc1534c
Fix some unhandled exceptions due to missing null checks (#16812)
OverloadUT Sep 24, 2018
b2a9e20
Update frontend to 20180924.0
balloob Sep 24, 2018
d4b239d
Update translations
balloob Sep 24, 2018
3e2a9af
Another update translations
balloob Sep 24, 2018
0bd94d8
Remove unused translation key
balloob Sep 24, 2018
c352b6f
Version bump to 0.79.0b0
balloob Sep 24, 2018
7d68ec1
Merge branch 'dev' into rc
balloob Sep 24, 2018
4c32ad3
Don't warn but info when on dev mode (#16831)
balloob Sep 25, 2018
0431e38
Bump zm-py to 0.0.3 (#16835)
rohankapoorcom Sep 25, 2018
356040d
Support old tradfri config format (#16841)
balloob Sep 25, 2018
b9043ef
Allow MQTT discovery (#16842)
balloob Sep 25, 2018
345c886
Add unique ID and device info to Nest camera (#16846)
balloob Sep 25, 2018
61a2d09
Bumped version to 0.79.0b1
balloob Sep 25, 2018
e375b63
Update frontend to 20180926.0
balloob Sep 26, 2018
3aaf619
Update translations
balloob Sep 26, 2018
cf0d0fb
Device Registry Support for iOS Sensors (#16862)
cgarwood Sep 26, 2018
ff9377d
Fix MQTT discovery (#16864)
balloob Sep 26, 2018
824e594
Make ring sync again (#16866)
balloob Sep 26, 2018
7b68f34
Bumped version to 0.79.0b2
balloob Sep 26, 2018
71333a1
Bump frontend to 20180927.0
balloob Sep 27, 2018
51dbc98
Update translations
balloob Sep 27, 2018
7597e30
Add unique_id to Nest Sensors (#16869)
cgarwood Sep 26, 2018
b7e03f6
Prevent discovered Tradfri while already configured (#16891)
balloob Sep 26, 2018
fb39641
Handle exception handling websocket command (#16927)
balloob Sep 27, 2018
7bfe0e1
Bumped version to 0.79.0b3
balloob Sep 27, 2018
f476d78
Version bump to 0.79.0
balloob Sep 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ omit =

homeassistant/components/asterisk_mbox.py
homeassistant/components/*/asterisk_mbox.py
homeassistant/components/*/asterisk_cdr.py

homeassistant/components/august.py
homeassistant/components/*/august.py
Expand Down Expand Up @@ -92,6 +93,9 @@ omit =
homeassistant/components/ecobee.py
homeassistant/components/*/ecobee.py

homeassistant/components/edp_redy.py
homeassistant/components/*/edp_redy.py

homeassistant/components/egardia.py
homeassistant/components/*/egardia.py

Expand Down Expand Up @@ -123,6 +127,7 @@ omit =
homeassistant/components/hangouts/const.py
homeassistant/components/hangouts/hangouts_bot.py
homeassistant/components/hangouts/hangups_utils.py
homeassistant/components/hangouts/intents.py
homeassistant/components/*/hangouts.py

homeassistant/components/hdmi_cec.py
Expand All @@ -140,6 +145,9 @@ omit =
homeassistant/components/homematicip_cloud.py
homeassistant/components/*/homematicip_cloud.py

homeassistant/components/huawei_lte.py
homeassistant/components/*/huawei_lte.py

homeassistant/components/hydrawise.py
homeassistant/components/*/hydrawise.py

Expand Down Expand Up @@ -183,6 +191,9 @@ omit =
homeassistant/components/linode.py
homeassistant/components/*/linode.py

homeassistant/components/logi_circle.py
homeassistant/components/*/logi_circle.py

homeassistant/components/lutron.py
homeassistant/components/*/lutron.py

Expand Down Expand Up @@ -684,6 +695,7 @@ omit =
homeassistant/components/sensor/kwb.py
homeassistant/components/sensor/lacrosse.py
homeassistant/components/sensor/lastfm.py
homeassistant/components/sensor/linky.py
homeassistant/components/sensor/linux_battery.py
homeassistant/components/sensor/loopenergy.py
homeassistant/components/sensor/luftdaten.py
Expand Down Expand Up @@ -740,6 +752,7 @@ omit =
homeassistant/components/sensor/sonarr.py
homeassistant/components/sensor/speedtest.py
homeassistant/components/sensor/spotcrime.py
homeassistant/components/sensor/starlingbank.py
homeassistant/components/sensor/steam_online.py
homeassistant/components/sensor/supervisord.py
homeassistant/components/sensor/swiss_hydrological_data.py
Expand Down Expand Up @@ -813,6 +826,7 @@ omit =
homeassistant/components/weather/bom.py
homeassistant/components/weather/buienradar.py
homeassistant/components/weather/darksky.py
homeassistant/components/weather/met.py
homeassistant/components/weather/metoffice.py
homeassistant/components/weather/openweathermap.py
homeassistant/components/weather/zamg.py
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

**Related issue (if applicable):** fixes #<home-assistant issue number goes here>

**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

## Example entry for `configuration.yaml` (if applicable):
```yaml
Expand All @@ -15,7 +15,7 @@
- [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**

If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)
- [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
- [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
Expand Down
7 changes: 7 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ homeassistant/components/sensor/airvisual.py @bachya
homeassistant/components/sensor/filter.py @dgomes
homeassistant/components/sensor/gearbest.py @HerrHofrat
homeassistant/components/sensor/irish_rail_transport.py @ttroy50
homeassistant/components/sensor/jewish_calendar.py @tsvi
homeassistant/components/sensor/miflora.py @danielhiversen @ChristianKuehnel
homeassistant/components/sensor/nsw_fuel_station.py @nickw444
homeassistant/components/sensor/pollen.py @bachya
Expand All @@ -97,6 +98,8 @@ homeassistant/components/*/eight_sleep.py @mezz64
homeassistant/components/hive.py @Rendili @KJonline
homeassistant/components/*/hive.py @Rendili @KJonline
homeassistant/components/homekit/* @cdce8p
homeassistant/components/huawei_lte.py @scop
homeassistant/components/*/huawei_lte.py @scop
homeassistant/components/knx.py @Julius2342
homeassistant/components/*/knx.py @Julius2342
homeassistant/components/konnected.py @heythisisnate
Expand All @@ -117,9 +120,13 @@ homeassistant/components/*/tesla.py @zabuldon
homeassistant/components/tellduslive.py @molobrakos @fredrike
homeassistant/components/*/tellduslive.py @molobrakos @fredrike
homeassistant/components/*/tradfri.py @ggravlingen
homeassistant/components/upcloud.py @scop
homeassistant/components/*/upcloud.py @scop
homeassistant/components/velux.py @Julius2342
homeassistant/components/*/velux.py @Julius2342
homeassistant/components/*/xiaomi_aqara.py @danielhiversen @syssi
homeassistant/components/*/xiaomi_miio.py @rytilahti @syssi
homeassistant/components/zoneminder.py @rohankapoorcom
homeassistant/components/*/zoneminder.py @rohankapoorcom

homeassistant/scripts/check_config.py @kellerza
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ The process is straight-forward.
- Ensure tests work.
- Create a Pull Request against the [**dev**](https://github.com/home-assistant/home-assistant/tree/dev) branch of Home Assistant.

Still interested? Then you should take a peek at the [developer documentation](https://home-assistant.io/developers/) to get more details.
Still interested? Then you should take a peek at the [developer documentation](https://developers.home-assistant.io/) to get more details.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Featured integrations

|screenshot-components|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://home-assistant.io/developers/architecture/>`__ and the `section on creating your own
components <https://home-assistant.io/developers/creating_components/>`__.
The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/en/architecture_index.html>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/en/creating_component_index.html>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Indices and tables
* :ref:`modindex`
* :ref:`search`

.. _Home Assistant developers: https://home-assistant.io/developers/
.. _Home Assistant developers: https://developers.home-assistant.io/
71 changes: 38 additions & 33 deletions homeassistant/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import subprocess
import sys
import threading

from typing import List, Dict, Any # noqa pylint: disable=unused-import


Expand All @@ -20,15 +19,19 @@
)


def attempt_use_uvloop() -> None:
def set_loop() -> None:
"""Attempt to use uvloop."""
import asyncio

try:
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except ImportError:
pass
if sys.platform == 'win32':
asyncio.set_event_loop(asyncio.ProactorEventLoop())
else:
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())


def validate_python() -> None:
Expand Down Expand Up @@ -240,59 +243,47 @@ def cmdline() -> List[str]:
return [arg for arg in sys.argv if arg != '--daemon']


def setup_and_run_hass(config_dir: str,
args: argparse.Namespace) -> int:
async def setup_and_run_hass(config_dir: str,
args: argparse.Namespace) -> int:
"""Set up HASS and run."""
from homeassistant import bootstrap
from homeassistant import bootstrap, core

# Run a simple daemon runner process on Windows to handle restarts
if os.name == 'nt' and '--runner' not in sys.argv:
nt_args = cmdline() + ['--runner']
while True:
try:
subprocess.check_call(nt_args)
sys.exit(0)
except subprocess.CalledProcessError as exc:
if exc.returncode != RESTART_EXIT_CODE:
sys.exit(exc.returncode)
hass = core.HomeAssistant()

if args.demo_mode:
config = {
'frontend': {},
'demo': {}
} # type: Dict[str, Any]
hass = bootstrap.from_config_dict(
config, config_dir=config_dir, verbose=args.verbose,
bootstrap.async_from_config_dict(
config, hass, config_dir=config_dir, verbose=args.verbose,
skip_pip=args.skip_pip, log_rotate_days=args.log_rotate_days,
log_file=args.log_file, log_no_color=args.log_no_color)
else:
config_file = ensure_config_file(config_dir)
print('Config directory:', config_dir)
hass = bootstrap.from_config_file(
config_file, verbose=args.verbose, skip_pip=args.skip_pip,
await bootstrap.async_from_config_file(
config_file, hass, verbose=args.verbose, skip_pip=args.skip_pip,
log_rotate_days=args.log_rotate_days, log_file=args.log_file,
log_no_color=args.log_no_color)

if hass is None:
return -1

if args.open_ui:
# Imported here to avoid importing asyncio before monkey patch
from homeassistant.util.async_ import run_callback_threadsafe

def open_browser(_: Any) -> None:
"""Open the web interface in a browser."""
if hass.config.api is not None: # type: ignore
if hass.config.api is not None:
import webbrowser
webbrowser.open(hass.config.api.base_url) # type: ignore
webbrowser.open(hass.config.api.base_url)

run_callback_threadsafe(
hass.loop,
hass.bus.async_listen_once,
EVENT_HOMEASSISTANT_START, open_browser
)

return hass.start()
return await hass.async_run()


def try_to_restart() -> None:
Expand Down Expand Up @@ -347,7 +338,20 @@ def main() -> int:
monkey_patch.disable_c_asyncio()
monkey_patch.patch_weakref_tasks()

attempt_use_uvloop()
set_loop()

# Run a simple daemon runner process on Windows to handle restarts
if os.name == 'nt' and '--runner' not in sys.argv:
nt_args = cmdline() + ['--runner']
while True:
try:
subprocess.check_call(nt_args)
sys.exit(0)
except KeyboardInterrupt:
sys.exit(0)
except subprocess.CalledProcessError as exc:
if exc.returncode != RESTART_EXIT_CODE:
sys.exit(exc.returncode)

args = get_arguments()

Expand All @@ -366,11 +370,12 @@ def main() -> int:
if args.pid_file:
write_pid(args.pid_file)

exit_code = setup_and_run_hass(config_dir, args)
from homeassistant.util.async_ import asyncio_run
exit_code = asyncio_run(setup_and_run_hass(config_dir, args))
if exit_code == RESTART_EXIT_CODE and not args.runner:
try_to_restart()

return exit_code
return exit_code # type: ignore # mypy cannot yet infer it


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions homeassistant/auth/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from datetime import timedelta

ACCESS_TOKEN_EXPIRATION = timedelta(minutes=30)
MFA_SESSION_EXPIRATION = timedelta(minutes=5)
6 changes: 2 additions & 4 deletions homeassistant/auth/mfa_modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Plugable auth modules for Home Assistant."""
from datetime import timedelta
import importlib
import logging
import types
Expand All @@ -23,8 +22,6 @@
vol.Optional(CONF_ID): str,
}, extra=vol.ALLOW_EXTRA)

SESSION_EXPIRATION = timedelta(minutes=5)

DATA_REQS = 'mfa_auth_module_reqs_processed'

_LOGGER = logging.getLogger(__name__)
Expand All @@ -34,6 +31,7 @@ class MultiFactorAuthModule:
"""Multi-factor Auth Module of validation function."""

DEFAULT_TITLE = 'Unnamed auth module'
MAX_RETRY_TIME = 3

def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None:
"""Initialize an auth module."""
Expand Down Expand Up @@ -84,7 +82,7 @@ async def async_is_user_setup(self, user_id: str) -> bool:
"""Return whether user is setup."""
raise NotImplementedError

async def async_validation(
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
raise NotImplementedError
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/auth/mfa_modules/insecure_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def async_is_user_setup(self, user_id: str) -> bool:
return True
return False

async def async_validation(
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
for data in self._data:
Expand Down
Loading