Compare commits

...

573 Commits

Author SHA1 Message Date
Paulus Schoutsen
3e7699b886 Merge pull request #30096 from home-assistant/rc
0.103.3
2019-12-20 21:28:49 +01:00
Paulus Schoutsen
d448ed9f6d Bump ring to 0.2.5 (#30103) 2019-12-20 20:44:46 +01:00
springstan
f229cf2796 Bump starlingbank to 3.2 (#30098) 2019-12-20 20:44:46 +01:00
Pascal Vizeli
5def51835e Fix v2 2019-12-20 17:10:04 +00:00
Pascal Vizeli
12f1a322a7 Fix test 2019-12-20 16:20:10 +00:00
Fazli Sapuan
488f26d55b Fix homekit handling of 0 light brightness and fan speed (#29962)
* Fix homekit handling of 0 light brightness and fan speed

* Update homekit tests for new initial brightness/speed value
2019-12-20 16:08:08 +00:00
Wim Haanstra
20a0557be7 Fix failure in transform method (#30023)
* Fix failure in transform method

* Fix formatting issue
2019-12-20 16:07:07 +00:00
omriasta
e58291015c Patch rachio (#30031)
* fix binary sensor offline/online

fixed self._handle_update on line 66 to produce args, kwargs.
Updated the binary sensor to check the correct index in the tuple.

* Fixed Standby switch

Set standby switch to poll in order to get status when homeassistant starts up.
Updated the index for the switch to get the status from the tuple.
2019-12-20 16:05:28 +00:00
Pascal Vizeli
e6a27983d3 Bump version 0.103.3 2019-12-20 14:16:39 +00:00
Franck Nijhof
939ca63cbc Fix update port and api key on deconz discovery config entry u… (#30088)
* Fix update port and api key on discovery config entry update

* Remove coroutine from _update_entry
2019-12-20 14:15:45 +00:00
Paulus Schoutsen
50714fbedf Merge pull request #30064 from home-assistant/rc
0.103.2
2019-12-19 08:03:47 +01:00
Paulus Schoutsen
c9de5b9fef Bumped version to 0.103.2 2019-12-19 07:53:38 +01:00
Paulus Schoutsen
aae80dca1c Fix recursion 2019-12-19 07:53:32 +01:00
Paulus Schoutsen
82a5c23c9c Merge pull request #30056 from home-assistant/rc
0.103.1
2019-12-18 22:15:02 +01:00
Paulus Schoutsen
952b21facc Bumped version to 0.103.1 2019-12-18 21:24:39 +01:00
Aaron Bach
9f64656603 Bump simplisafe-python to 5.3.6 (#30055) 2019-12-18 21:23:57 +01:00
Andrew Onyshchuk
6d06cec0e0 Fix support for legacy Z-Wave thermostats (#29955)
This brings back support for Z-Wave thermostats
of SETPOINT_THERMOSTAT specific device class.
Such devices don't have COMMAND_CLASS_THERMOSTAT_MODE
and are now handled separately.
2019-12-18 21:19:59 +01:00
Chris Mandich
9836e78120 Fix loading flume integration (#29926)
* Fix https://github.com/home-assistant/home-assistant/issues/29853

* Run script.gen_requirements

* Update to store Token File in config directory

* Update to store Token File in config directory

* Update to store Token File in config directory
2019-12-18 21:18:49 +01:00
Justin Bassett
f1d22db009 Fix mobile app device identifiers (#29920)
Fix identifiers when updating device registration.
2019-12-18 21:18:49 +01:00
Anders Melchiorsen
24c87638e6 Support entity_id: all in lifx.set_state (#29919) 2019-12-18 21:18:48 +01:00
springstan
9b65d83e28 Fix setup error for logbook (#29908)
* Fix setup error by moving an import back into the setup function

* Revert c741664d4d

* Add homekit as after_dependency to logbook manifest.json
2019-12-18 21:18:10 +01:00
springstan
29e412a6c4 Fix setup for tank_utility component (#29902) 2019-12-18 21:17:26 +01:00
Aaron Bach
a466ae0279 Bump aioambient to 1.0.2 (#29850) 2019-12-18 21:17:25 +01:00
Paulus Schoutsen
628a148944 Install requirements of after_dependencies when loading integrations (#29491)
* Install requirements of after_dependencies when loading integrations

* Fix smartthings test
2019-12-18 21:17:24 +01:00
Paulus Schoutsen
87164e2129 Bumped version to 0.103.0 2019-12-11 15:55:23 +01:00
Pascal Vizeli
ce041f131e Remove uvloop event policy (#29835)
* Remove uvloop event policy

* Clean tests

* Fix lint

* Cleanup statment
2019-12-11 15:55:09 +01:00
Robert Svensson
2fb36d3dea UniFi - Handle disabled switches (#29824) 2019-12-11 15:55:09 +01:00
Robert Svensson
4dd1c51186 UniFi - honor detection time when UniFi wire bug happens (#29820) 2019-12-11 15:55:08 +01:00
Robert Svensson
4c9c22bc3a Add more logging to help future debug situations (#29800) 2019-12-11 15:55:07 +01:00
springstan
0cb9d0746a Add user-agent to fix dwd_weather_warnings setup error (#29596)
* Added dummy user-agent to http request to fix setup error

* Replace dummy user-agent with the user-agent of the global home assistant session

* Adjust comment and rename user-agent constant
2019-12-11 15:52:10 +01:00
Paulus Schoutsen
302d5d66ab Bumped version to 0.103.0b1 2019-12-10 13:05:22 +01:00
Brett T. Warden
807badea93 Bump Roku to 4.0.0 (#29809) 2019-12-10 13:05:17 +01:00
Bram Kragten
d53c6be50a Updated frontend to 20191204.1 (#29787) 2019-12-10 13:05:16 +01:00
Pascal Vizeli
19920e48ba HomeAssistant-pyozw 0.1.7 (#29743) 2019-12-10 13:04:07 +01:00
Nikolay Vasilchuk
70fe5d3238 Fix unit_of_measurement for Starline temperature sensors (#29740) 2019-12-10 13:04:06 +01:00
Robert Svensson
f7015703bb Only update disabled_by when enabled default and entity enabled states differ (#29643) 2019-12-10 13:04:05 +01:00
Santobert
90de5652b9 Change source of device_info (#29570) 2019-12-10 13:04:04 +01:00
Ville Skyttä
2d6599fdd2 Huawei LTE device tracker fixes (#29551)
* Include MAC address in device state attributes for absent devices too

* Use MAC address as default name whether device is connected or not

* Fix initialization of known entities

Closes https://github.com/home-assistant/home-assistant/issues/29354
2019-12-10 13:04:03 +01:00
Malte Franken
d9280330a6 Bump georss_generic_client to 0.3 (#29532)
* bump version of georss_generic_client library

* updated requirements
2019-12-10 13:04:02 +01:00
tetienne
a4fc4bb281 Increase somfy SCAN_INTERVAL (#29524)
- There was too many errors 504
2019-12-10 13:04:01 +01:00
David K
22e7ece315 Limit available heat/cool modes for HomeKit thermostats (#28586)
* Limit available heat/cool modes for HomeKit thermostats.
The Home app only shows appropriate modes (heat/cool/auto) for the device. Depending on the climate integration, disabling the auto start might be needed.

* Include improved mapping for HVAC modes in tests
2019-12-10 13:04:01 +01:00
Paulus Schoutsen
f10076a4ad Bumped version to 0.103.0b0 2019-12-04 22:52:20 -08:00
Paulus Schoutsen
1646aab36d Version bump to 0.103.0dev0 2019-12-04 22:51:53 -08:00
Paulus Schoutsen
6885167fcc Merge remote-tracking branch 'origin/master' into dev 2019-12-04 22:51:08 -08:00
Daniel Perna
c6ac2a5705 Update pyhomematic (#29477) 2019-12-04 22:50:18 -08:00
Rohan Kapoor
b2d5de6a79 Switch iperf3 to generate a new client every time it runs a test (#29495)
* Switch iperf3 to generate a new client every time it runs a test

* Add myself to CODEOWNERS

* Fix imperative mood
2019-12-04 22:49:26 -08:00
Paulus Schoutsen
dad11f8208 Fix tests & lint 2019-12-04 22:47:40 -08:00
Paulus Schoutsen
28e9f1d0b8 Fix deconz import 2019-12-04 21:57:08 -08:00
Paulus Schoutsen
41440d4f1b Fix litejet tests 2019-12-04 21:47:35 -08:00
springstan
52926f1961 Move imports to top for canary (#29449) 2019-12-04 21:30:22 -08:00
springstan
d70ad369de Move imports to top for asuswrt (#29436) 2019-12-04 21:24:20 -08:00
springstan
f874a9df13 Move imports to top for clementine (#29437) 2019-12-04 21:24:08 -08:00
springstan
69ae469148 Move imports to top for deluge (#29438) 2019-12-04 21:23:56 -08:00
springstan
4c0f73a2b9 Move imports to top for datadog (#29440) 2019-12-04 21:23:17 -08:00
springstan
2773328134 Move imports to top for directv (#29441) 2019-12-04 21:23:05 -08:00
springstan
5ee20b61b3 Move imports to top for doorbird (#29442) 2019-12-04 21:22:51 -08:00
springstan
27200865ee Move imports to top for dlink (#29443) 2019-12-04 21:22:37 -08:00
springstan
50ee0c6727 Move imports to top for dunehd (#29444) 2019-12-04 21:22:27 -08:00
springstan
f2a08c438b Move imports to top for duke_energy (#29445) 2019-12-04 21:22:14 -08:00
Anders Melchiorsen
94297e96cb Update eternalegypt to 0.0.11 (#29446) 2019-12-04 21:22:03 -08:00
springstan
b2cce05405 Move imports to top for eight_sleep (#29447) 2019-12-04 21:21:50 -08:00
springstan
85e188db52 Move imports to top for egardia (#29448) 2019-12-04 21:21:40 -08:00
springstan
10759b7ca6 Move imports to top for enphase_envoy (#29450) 2019-12-04 21:21:25 -08:00
springstan
0158f29e4e Move imports to top for envisalink (#29457) 2019-12-04 21:21:12 -08:00
springstan
5586f40ab0 Move imports to top for enocean (#29451) 2019-12-04 21:20:26 -08:00
springstan
cdf53aed93 Move imports to top for enigma2 (#29452) 2019-12-04 21:20:11 -08:00
springstan
f422cdbfef Move imports to top for eq3btsmart (#29456) 2019-12-04 21:20:01 -08:00
springstan
06a156c091 Move imports to top for emby (#29453) 2019-12-04 21:19:43 -08:00
Ville Skyttä
ebc9d17558 Fix setup of Huawei LTE for which we can't get a MAC address (#29455)
Closes https://github.com/home-assistant/home-assistant/issues/29188
2019-12-04 21:19:25 -08:00
springstan
6c863a8948 Move imports to top for sonarr (#29462) 2019-12-04 21:18:57 -08:00
springstan
58ba6052e2 Move imports to top for environment_canada (#29458) 2019-12-04 21:18:52 -08:00
springstan
a4ac5dc6b8 Move imports to top for entur_public_transport (#29459) 2019-12-04 21:18:29 -08:00
springstan
24878f109c Move imports to top for solaredge (#29463) 2019-12-04 21:18:12 -08:00
springstan
dbd231b3a0 Move imports to top for somfy_mylink (#29464) 2019-12-04 21:17:45 -08:00
springstan
270d97d789 Move imports to top for daikin (#29490) 2019-12-04 21:17:33 -08:00
springstan
89c7629215 Move imports to top for deconz (#29489) 2019-12-04 21:17:18 -08:00
springstan
8647ba3dd5 Move imports to top for emulated_hue (#29488) 2019-12-04 21:16:51 -08:00
springstan
f5550509d4 Move imports to top for geo_json_events (#29486) 2019-12-04 21:16:25 -08:00
springstan
bbe57d6673 Move imports to top for history (#29484) 2019-12-04 21:15:39 -08:00
springstan
95de802fbd Move imports to top for hlk_sw16 (#29483) 2019-12-04 21:15:18 -08:00
springstan
3e634aaf5d Move imports to top for logi_circle (#29482) 2019-12-04 21:14:57 -08:00
springstan
81e4e9e26b Move imports to top for mailgun (#29480) 2019-12-04 21:14:39 -08:00
springstan
12e1c695ca Move imports to top for mfi (#29479) 2019-12-04 21:14:26 -08:00
springstan
7df4c1e676 Move imports to top for mhz19 (#29478) 2019-12-04 21:14:03 -08:00
springstan
653e0078a4 Move imports to top for skybell (#29475) 2019-12-04 21:13:49 -08:00
springstan
c6066d8b98 Move imports to top for ring (#29474) 2019-12-04 21:13:28 -08:00
springstan
c02d551cd5 Move imports to top for random (#29473) 2019-12-04 21:13:05 -08:00
springstan
d9661b408b Move imports to top for rainmachine (#29472) 2019-12-04 21:12:44 -08:00
springstan
c6b8d35c16 Move imports to top for ps4 (#29471) 2019-12-04 21:12:26 -08:00
springstan
43665466f5 Move imports to top for point (#29470) 2019-12-04 21:12:09 -08:00
springstan
96cf20ad81 Move imports to top for zoneminder (#29468) 2019-12-04 21:11:30 -08:00
springstan
72995f6ce6 Move imports to top for tuya (#29467) 2019-12-04 21:11:13 -08:00
springstan
5573504508 Move imports to top for litejet (#29481) 2019-12-04 21:08:22 -08:00
Bram Kragten
b829c46e18 Updated frontend to 20191204.0 (#29461) 2019-12-04 11:28:23 -08:00
springstan
a2a3c50555 Move imports to top for danfoss_air (#29435) 2019-12-04 20:27:51 +01:00
springstan
f8d607bdf5 Move imports to top for fixer (#29430)
* Move imports to top for fixer

* Only import FixerioException instead of all exceptions
2019-12-04 17:08:22 +01:00
springstan
0d1a389602 Move imports to top for etherscan (#29426) 2019-12-04 15:21:18 +01:00
springstan
af18c668d2 Move imports to top for familyhub (#29427) 2019-12-04 15:20:50 +01:00
springstan
4b6a2496c7 Move imports to top for fastdotcom (#29428) 2019-12-04 15:20:14 +01:00
springstan
12791a687b Move imports to top for fints (#29429) 2019-12-04 15:19:03 +01:00
springstan
c6ad57eb2b Move imports to top for fleetgo (#29431) 2019-12-04 15:15:30 +01:00
springstan
9bb6bcad70 Move imports to top for gearbest (#29432) 2019-12-04 15:14:46 +01:00
springstan
bef1c00b49 Move imports to top for hunterdouglas_powerview (#29420) 2019-12-04 14:15:39 +01:00
springstan
c880f09714 Move imports to top for horizon (#29419)
* Move imports to top for horizon

* Fix Pylint redefining name keys
2019-12-04 14:15:17 +01:00
springstan
46c306685d Move imports to top for hikvision (#29417) 2019-12-04 14:14:49 +01:00
springstan
c79e99318d Move imports to top for habitica (#29416) 2019-12-04 14:14:19 +01:00
springstan
d8dcf17cb5 Move imports to top for gstreamer (#29415) 2019-12-04 14:12:27 +01:00
springstan
4a7004b791 Move imports to top for greeneye_monitor (#29414) 2019-12-04 14:12:07 +01:00
springstan
88c1a630d8 Move imports to top for gpmdp (#29413) 2019-12-04 14:11:47 +01:00
springstan
95bc97fb6a Move imports to top for homeworks (#29418) 2019-12-04 14:11:14 +01:00
springstan
e6f7cbe53e Move imports to top for gitter (#29412) 2019-12-04 14:10:47 +01:00
springstan
6f5b59da15 Move imports to top for ialarm (#29422) 2019-12-04 14:10:15 +01:00
springstan
497674835b Move imports to top for ihc (#29425) 2019-12-04 14:09:57 +01:00
springstan
f4f4c695d9 Move imports to top for hydrawise (#29421) 2019-12-04 14:09:35 +01:00
springstan
c159ad52a4 Move imports to top for gogogate2 (#29411)
* Move imports to top for gogogate2

* Isorted imports
2019-12-04 14:09:04 +01:00
springstan
6c45c1969b Move imports to top for idteck_prox (#29423) 2019-12-04 14:08:01 +01:00
springstan
56b60577de Move imports to top for iglo (#29424) 2019-12-04 14:07:36 +01:00
Fabian Affolter
992d9273bb Upgrade psutil to 5.6.7 (#29407) 2019-12-04 11:45:56 +01:00
springstan
73e25296ca Move imports to top for joaoapps_join (#29402) 2019-12-04 11:18:05 +01:00
springstan
e04a208af0 Move imports to top for irish_rail_transport (#29401) 2019-12-04 11:17:38 +01:00
springstan
45c7c7a439 Move imports to top for keenetic-ndms2 (#29400) 2019-12-04 11:17:20 +01:00
springstan
a24e7832b5 Move imports to top for modem_callerid (#29396) 2019-12-04 11:16:58 +01:00
springstan
048068307d Move imports to top for microsoft (#29395) 2019-12-04 11:16:35 +01:00
springstan
518ca3afa7 Move imports to top for meteo_france (#29394) 2019-12-04 11:16:16 +01:00
springstan
849d8c885d Move imports to top for maxcube (#29393) 2019-12-04 11:15:53 +01:00
springstan
d79d9e0bfb Move imports to top for matrix (#29392) 2019-12-04 11:15:29 +01:00
springstan
c6fd8582a9 Move imports to top for lyft (#29391) 2019-12-04 11:14:35 +01:00
springstan
025c1a39a7 Move imports to top for lutron_caseta (#29390) 2019-12-04 11:14:07 +01:00
springstan
1a51590711 Move imports to top for lutron (#29389) 2019-12-04 11:13:46 +01:00
springstan
49232332a1 Move imports to top for luci (#29388) 2019-12-04 11:13:22 +01:00
springstan
695ec0c219 Move imports to top for london_underground (#29387) 2019-12-04 11:13:07 +01:00
springstan
7aab0d0aa0 Move imports to top for limitlessled (#29386) 2019-12-04 11:12:32 +01:00
springstan
cfe920079c Move imports to top for lightwave (#29385) 2019-12-04 11:12:03 +01:00
springstan
3dc629db08 Move imports to top for lg_netcast (#29384) 2019-12-04 11:11:42 +01:00
springstan
c3453be17b Move imports to top for lauch_library (#29383) 2019-12-04 11:11:21 +01:00
springstan
c0c1d68858 Move imports to top for iota (#29399) 2019-12-04 11:10:28 +01:00
springstan
1d65670a71 Move imports to top for kiwi (#29403) 2019-12-04 10:50:44 +01:00
springstan
fd107f2b2e Move imports to top for kwb (#29404) 2019-12-04 10:50:22 +01:00
springstan
2df189b58e Move imports to top for lacrosse (#29405) 2019-12-04 10:49:55 +01:00
springstan
09e2be02d3 Move imports to top for lametric (#29406) 2019-12-04 10:49:33 +01:00
Paulus Schoutsen
f6780c1fa2 Allow negative altitude in location updates (#29381) 2019-12-03 22:39:12 -08:00
HomeAssistant Azure
a1a131334a [ci skip] Translation update 2019-12-04 00:32:11 +00:00
springstan
0416e5b0fc Move imports to top for openhome (#29369) 2019-12-03 15:47:22 -08:00
springstan
3205afe74e Move imports to top for nuimo_controller (#29367) 2019-12-03 15:47:11 -08:00
springstan
bd1e5fce27 Move imports to top for noaa_tides (#29366) 2019-12-03 15:47:00 -08:00
springstan
3ddd20159c Move imports to top for nmbs (#29365) 2019-12-03 15:46:48 -08:00
springstan
564c468c26 Move imports to top for nmap_tracker (#29364) 2019-12-03 15:46:38 -08:00
springstan
bc635120fa Move imports to top for netio (#29363) 2019-12-03 15:46:26 -08:00
springstan
4130f2ff1a Move imports to top for netdata (#29362) 2019-12-03 15:46:16 -08:00
springstan
b462c539eb Move imports to top for n26 (#29357) 2019-12-03 15:46:07 -08:00
springstan
01bc1e4c66 Move imports to top for nad (#29358) 2019-12-03 15:45:56 -08:00
springstan
0e223662a9 Move imports to top for nanoleaf (#29359) 2019-12-03 15:45:46 -08:00
springstan
4989d1e7a9 Move imports to top for nederlandse_spoorwegen (#29360) 2019-12-03 15:45:36 -08:00
springstan
c9c41260b2 Move imports to top for nello (#29361) 2019-12-03 15:45:24 -08:00
springstan
be316af303 Move imports to top for mystrom (#29356) 2019-12-03 15:44:50 -08:00
springstan
9d213e70f0 Move imports to top for opensensemap (#29370) 2019-12-03 15:44:04 -08:00
Paulus Schoutsen
e26eebfc19 Remove cloud dependency from mobile_app (#29373) 2019-12-03 15:43:48 -08:00
Heine Furubotten
98b6905738 Upgrade enturclient to 0.2.1 (#29375) 2019-12-03 15:42:45 -08:00
springstan
bbf99c61fa Move imports to top for mycroft (#29355) 2019-12-03 15:42:21 -08:00
springstan
655780447c Move imports to top for nut (#29368) 2019-12-03 18:19:43 -05:00
springstan
f220c73e8f Move imports to top for orvibo (#29371) 2019-12-03 18:16:57 -05:00
springstan
f8ffcd6caf Move imports to top for opple (#29372) 2019-12-03 18:15:42 -05:00
Paulus Schoutsen
eef91f843d Rendering complex template objects to leave non-template values alone (#29353) 2019-12-03 14:15:45 -08:00
springstan
b1b784484e Move imports to top for owlet (#29352) 2019-12-03 14:13:37 -08:00
springstan
4f8200d15a Ignore state of climate entities in prometheus (#29346) 2019-12-03 12:54:25 -08:00
Luca Angemi
cae802f7ee Include telegram_bot message id for all messages (#29315)
* Include telegram_bot message id for all messages

* Update __init__.py
2019-12-03 12:51:45 -08:00
springstan
25b6740466 Move imports to top for pencom (#29348) 2019-12-03 19:02:09 +01:00
springstan
078e907178 Move imports to top for pushetta (#29332)
* Move imports to top for pushetta

* Make Pushetta.exceptions import lowercase and snakecase
2019-12-03 12:23:41 +01:00
Pascal Vizeli
e9647f8814 Update ozw 0.1.6 2019-12-03 10:51:46 +00:00
Pascal Vizeli
841ce8ade9 Fix uvloop warning (#29341) 2019-12-03 11:08:28 +01:00
Joakim Plate
26b63e73ad Add initial test suite for arcam_fmj integration (#29335)
* Add initial tests

* Adjust test

* Typo
2019-12-02 22:52:25 -08:00
Joakim Plate
4191d9ca8d Report unavailable entities to google (#28501)
* Report unavailable entites to google.

Entities should only removed when removed from HA. Removing a temporarily unavailable entity from google causes it to need to re-configured once it become available again.

* Fix test for unavailable entities
2019-12-02 22:14:16 -08:00
Paulus Schoutsen
32e04e1dce Lint 2019-12-02 22:08:19 -08:00
Joakim Plate
2569c4ae37 Google assistant storage of connected agents (#29158)
* Make async_report_state take agent_user_id

* Attempt to store synced agents

* Drop now not needed initialization

* Make sure cloud uses the all sync on changed preferences

* Some more places to use all version of sync

* Get the agent_user_id from the request context if available

* Minor cleanup

* Remove the old fixed agent_user_id for cloud

Instead pass along cloud_user where appropriate.

* async_delay_save takes a function

* Adjust test for delayed store

* Remove unused save function

* Add login check.
2019-12-02 22:05:59 -08:00
Andy Loughran
434b783b4c Update heatmiserv3 integration (#29006)
* Updated heatmiserV3 initial commit

* Fixing heatmiser component

* Updated codeowners and heatmiserV3 version

* Updating files as part of PR process

* Removed extra _LOGGER statements.

* Added in HVAC_MODE_OFF to allowed states to track whether heating on/off

* Handling PR comments

* Removed legacy tests

* fixing pylint errors

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Updated climate based on latest feedback

* Removed cast to int and update requirements

* Update requirements

* Updated heatmiser deps
2019-12-03 06:48:51 +01:00
HomeAssistant Azure
d5ee34e504 [ci skip] Translation update 2019-12-03 00:32:23 +00:00
Paulus Schoutsen
02d9ed5e36 Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
2019-12-02 16:23:12 -08:00
Marius
9587afc5ce delete incorrect "mdi:brightness-3" (#29309)
delete incorrect 'mdi:brightness-3' in final 
```
def icon(self):
        """Icon to use in the frontend, if any."""
        return MOON_ICONS.get(self.state, "mdi:brightness-3")
```

which still shows in the sensors attributes
2019-12-02 16:19:56 -08:00
Franck Nijhof
76aaf8b560 Improve WLED white value support for RGBW strips (#29312) 2019-12-02 16:12:18 -08:00
springstan
8f608608ed Move imports to top for radarr (#29322) 2019-12-02 16:11:22 -08:00
springstan
141fd1bffd Move imports to top for qwikswitch (#29328) 2019-12-02 16:11:10 -08:00
Alain Turbide
83b21651ce Add alexa check for "name" channelMetadata attribute (#29279)
* Added check for "name" channelMetada attribute

* Added/changed smart home media player tests for added value name in chanelMetadata payload section

* Since Alexa only expects a number/callSign/affiliate in the returned response, returning "name" is not technically valid.  Modified to return the value in the callSign field  instead since it's a text value. Since there is no returned channel number, cannot return a true numeric value in "channel" field
2019-12-02 16:10:44 -08:00
Abílio Costa
9811d63d78 Improve Alexa interface selection for binary sensors (#29120)
* Improve Alexa interface selection for binary sensors

This allows the sensor to work correctly as a contact or motion sensor
in alexa, if the user overrides its display category as such.

* add tests
2019-12-02 16:02:17 -08:00
springstan
9160d43a08 Move imports to top for rachio (#29323) 2019-12-03 00:59:13 +01:00
springstan
bacc549576 Move imports to top for plum_lightpad (#29324) 2019-12-03 00:58:18 +01:00
springstan
55ba956d3d Move imports to top for qbittorrent (#29325) 2019-12-03 00:57:47 +01:00
springstan
61cb0924db Move imports to top for qnap (#29326) 2019-12-03 00:56:58 +01:00
springstan
1adcdad5a4 Move imports to top for quantum_gateway (#29327) 2019-12-03 00:56:08 +01:00
springstan
372aa312e1 Move imports to top for prezzibenzina (#29329) 2019-12-03 00:54:17 +01:00
springstan
9868161821 Move imports to top for postnl (#29330) 2019-12-03 00:53:42 +01:00
springstan
8baba2e33d Move imports to top for python_script (#29331) 2019-12-03 00:53:04 +01:00
Felipe Martins Diel
5a24dbf599 Broadlink remote (#26528)
* Add broadlink remote control platform

* Fix order of the imports

* Add remote.py to .coveragerc

* Optimize MAC address validation

* Use storage helper class and improve code readability

* Add me to the manifest as a code owner

* Fix dosctring

* Add me to the code owners

* Remove storage schemas, rename storage keys and improve readability
2019-12-02 13:20:36 -08:00
NobleKangaroo
67498595e4 Add Emulated Hue code owner (#29319) 2019-12-02 21:29:31 +01:00
Raman Gupta
040fd9c258 Update service domains for xiaomi_miio from base domains to xiaomi_miio domain (#29134)
* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain

* update service names

* try to fix black error

* try black formatting again

* final black formatting attempt

* update service names to reflect platform

* fix typo
2019-12-02 11:49:39 -08:00
Paulus Schoutsen
ffaa0e572a Inline MQTT paho imports (#29177)
* Inline MQTT paho imports

* Address comments

* Fix patch paths

* Move other imports inline

* Fix test
2019-12-02 11:32:02 -08:00
Christian Ferbar
1804c6edc5 Clear miflora sensor state on exception (#29276)
* Clear state on exception

Clear state if querying the device fails. The state is then set to unknown, so it can be tracked if a miflora device isn't responding any more.

* Add available()

Signal valid data via available()
2019-12-02 11:24:16 -08:00
Paulus Schoutsen
9771826ed6 Add capability-attributes (#29306) 2019-12-02 11:15:50 -08:00
springstan
b28bc1d6fb Add name option to season sensor (#29302)
* Add name option to season sensor

* Changed DEFAULT_NAME from season to Season
2019-12-02 12:00:07 +01:00
NobleKangaroo
3f2b6bfaa4 Overhaul Emulated Hue (#28317)
* Emulated Hue Overhaul

* Fix erroneous merge

* Remove unused code

* Modernize string format
2019-12-01 21:00:22 -08:00
HomeAssistant Azure
19241f421b [ci skip] Translation update 2019-12-02 00:32:37 +00:00
Paulus Schoutsen
d1aa0cea97 Move intent registration to own integration (#29280)
* Move intent registration to own integration.

* Lint
2019-12-01 14:12:57 -08:00
Bram Kragten
d91dd68b31 Limit parallel requests to Philips Hue (#29189)
* Limit parallel requests to Philips Hue

* Fix tests

* Remove loop

* Update homeassistant/components/hue/bridge.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>
2019-12-01 13:24:16 -08:00
Ville Skyttä
a9baa24fda Improve naming and attrs of hostnameless Huawei LTE device tracker entities (#29281) 2019-12-01 20:58:31 +01:00
springstan
22225cea4d Move imports to top for seventeentrack (#29264)
* Move imports to top for seventeentrack

* Updated patch target path in test_sensor.py
2019-12-01 10:19:17 -07:00
Ville Skyttä
9927f6c17d Upgrade mypy to 0.750 (#29294)
https://mypy-lang.blogspot.com/2019/11/mypy-0.html
2019-12-01 17:58:26 +01:00
Andreas Oberritter
64628c1f70 Add ATEN PE component for ATEN eco PDUs (#27960)
* Add ATEN PE component for ATEN eco PDUs

* aten_pe: Require host configuration

* aten_pe: Do not import from other integrations

* aten_pe: Include unnamed outlets

* aten_pe: Avoid get() for config entries having default values

* aten_pe: Fix documentation URI

* aten_pe: Remove unused return value

* aten_pe: Update atenpdu lib to 0.2.0 for asyncio

* aten_pe: Raise exception if initialization fails

* aten_pe: Update atenpdu lib to 0.3.0 for improved exception handling
2019-12-01 17:46:12 +01:00
springstan
6c9291c7a6 Move imports to top for raspyrfm (#29284) 2019-12-01 15:25:57 +01:00
springstan
a0a348a200 Move imports to top for recswitch (#29285) 2019-12-01 15:24:48 +01:00
springstan
d0ed9b32ac Move imports to top for remote_rpi_gpio (#29286) 2019-12-01 15:24:11 +01:00
springstan
e2e53be5ac Move imports to top for ripple (#29287) 2019-12-01 15:23:18 +01:00
Daniel Høyer Iversen
3c9d2b552e Upgrade Tibber library (#29290) 2019-12-01 14:20:27 +01:00
springstan
8fbfb6bf8c Move imports to top for rocketchat (#29288) 2019-12-01 12:04:47 +01:00
springstan
84d6a5369f Move imports to top for raincloud (#29283) 2019-12-01 12:04:12 +01:00
springstan
9f649ed345 Move imports to top for roku (#29289) 2019-12-01 12:03:51 +01:00
Ville Skyttä
5c8a8a631c Add Huawei LTE binary sensor support, mobile connection sensor (#28226)
* Add Huawei LTE binary sensor support, mobile connection sensor

* Improve mobile connection sensor icon docstring

* Remove device class for permission to use a more descriptive icon
2019-11-30 22:09:08 -08:00
jjlawren
6a02c6540e Stop Plex config flow imports where more user input needed (#29241)
* Abort imports that require user interaction, update logs and tests

* Disable lint
2019-11-30 22:07:12 -08:00
springstan
c4c8a1ba2d Move imports to top for sense (#29258) 2019-11-30 21:35:45 -08:00
Bram Kragten
2bdf7fc8f5 Fix Hue linking with non ASCII chars in location (#29213)
* Fix Hue linking with non ASCII chars in location

* Use slugify
2019-11-30 21:33:11 -08:00
springstan
8908dba5b4 Add device trigger for alarm_control_panel (#29068)
* Added device trigger to alarm control panel

* Added supported features to check that device has certain trigger

* Fixed tests for device_trigger

* Fixed pylint error

* Removed pending trigger and removed trigger condition
2019-11-30 21:30:51 -08:00
Franck Nijhof
d5efd0b352 Fix Espalexa being detected as Hue Bridge (#29237) 2019-11-30 21:28:42 -08:00
Santobert
c0619944fa Neato reduce API calls (#29156)
* initial commit

* Fix a bug where some values are not available

* Workaround if git_robot_info() is not available
2019-11-30 21:26:44 -08:00
springstan
bb46918d2e Move imports to top for scsgate (#29257) 2019-11-30 21:24:54 -08:00
springstan
1560d84cd7 Move imports to top for sisyphus (#29252) 2019-11-30 21:24:38 -08:00
springstan
8da7f40736 Move imports to top for smarty (#29251) 2019-11-30 21:24:17 -08:00
springstan
bea5d18c4a Move imports to top for sochain (#29250) 2019-11-30 21:23:59 -08:00
springstan
6726c4c76b Move imports to top for spider (#29249) 2019-11-30 21:23:48 -08:00
springstan
9fbb345ce0 Move imports to top for tradfri (#29247) 2019-11-30 21:23:39 -08:00
springstan
93150f6f94 Move imports to top for sensehat (#29259) 2019-11-30 21:23:09 -08:00
springstan
f2b06d9abd Move imports to top for sht31 (#29260) 2019-11-30 21:22:53 -08:00
springstan
221db3a2dd Move imports to top for simplepush (#29261) 2019-11-30 21:22:33 -08:00
springstan
11b274989a Move imports to top for satel_integra (#29263) 2019-11-30 21:22:18 -08:00
springstan
4ceddc6d35 Move imports to top for sabnzbd (#29266) 2019-11-30 21:22:05 -08:00
springstan
3aff90c0ac Move imports to top for rpi_gpio_pwm (#29270) 2019-11-30 21:21:46 -08:00
springstan
453569a469 Move imports to top for russound_rio (#29267) 2019-11-30 21:21:40 -08:00
springstan
db2f53dfc1 Move imports to top for russound_rnet (#29268) 2019-11-30 21:21:28 -08:00
springstan
82d8c9c2ca Move imports to top for rova (#29269) 2019-11-30 21:21:08 -08:00
springstan
869e71f455 Move imports to top for rpi_rf (#29271) 2019-11-30 21:20:33 -08:00
springstan
7ad139bb63 Move imports to top for roomba (#29272) 2019-11-30 21:20:17 -08:00
springstan
96a28e59bc Move imports to top for route53 (#29273) 2019-11-30 21:19:28 -08:00
HomeAssistant Azure
aa9514b774 [ci skip] Translation update 2019-12-01 00:34:59 +00:00
springstan
5dbfa16e04 Move imports to top for simplisafe (#29262) 2019-11-30 17:16:05 -07:00
Wim Haanstra
bde453be47 Address DSMR Reader review notes (#29209)
* Fix review issues

* Remove None from get method

* No longer need logging import

* Give definition without name a default name
2019-11-30 16:23:03 +01:00
Pascal Vizeli
0ea91fbf2d Merge pull request #29234 from home-assistant/rc
Release 0.102.3
2019-11-30 11:58:54 +01:00
HomeAssistant Azure
8ae0d891e4 [ci skip] Translation update 2019-11-30 00:32:19 +00:00
springstan
4bec14b0f6 Move imports to top for swiss_public_transport (#29228)
* Move imports to top for swiss_public_transport

* Remove import of exceptions since only one exception is used
2019-11-29 22:16:14 +01:00
springstan
fbfbae8ad9 Move imports to top for swiss_hydrological_data (#29227) 2019-11-29 21:50:09 +01:00
springstan
39bf1b5f5d Move imports to top for stiebel_eltron (#29224) 2019-11-29 21:32:03 +01:00
springstan
7d90b1f9ec Move imports to top for streamlabswater (#29225) 2019-11-29 21:27:00 +01:00
springstan
93bb1a6816 Move imports to top for supla (#29226) 2019-11-29 21:26:23 +01:00
springstan
bbecd55c09 Move imports to top for synology (#29230) 2019-11-29 21:22:03 +01:00
springstan
c30dfac4ed Move imports to top for synologdsm (#29231) 2019-11-29 21:21:00 +01:00
springstan
e4b26dc02b Move imports to top for tahoma (#29232) 2019-11-29 21:19:49 +01:00
springstan
11331ad26e Move imports to top for starlingbank (#29233) 2019-11-29 21:18:52 +01:00
springstan
04bad4bc74 Move imports to top for switchbot (#29229) 2019-11-29 19:34:40 +01:00
Michaël Arnauts
e405398ca4 Allow turning off a tado water heater (#29221) 2019-11-29 19:22:22 +01:00
Pascal Vizeli
ec008ddbe4 Bump version 0.102.3 2019-11-29 17:48:08 +00:00
Bram Kragten
2d5d40ce0e Fix smartthings cloud webhook (#29219)
* Fix smartthings cloud webhook

* Update smartapp.py
2019-11-29 17:46:27 +00:00
Bram Kragten
4065c46046 Fix smartthings cloud webhook (#29219)
* Fix smartthings cloud webhook

* Update smartapp.py
2019-11-29 18:29:45 +01:00
springstan
392cdf49e6 Allow controlling Tado Hot Water Devices with temperature control (#29191) 2019-11-29 16:29:39 +01:00
tetienne
12155cb66e Fix somfy switch inherit from SwitchDevice instead of ToggleEntity (#29182) 2019-11-29 12:08:20 +01:00
Malte Franken
6126d05935 Migrate NSW Rural Fire Service integration to async library (#29181)
* use async integration library

* adapted unit tests

* removed unused constants

* relocated constants

* simplified generation of new entries

* small code fixes

* increased test coverage and removed unused code

* fixed comment

* simplified patch code
2019-11-29 12:06:21 +01:00
springstan
364d1cff40 Move imports to top for xiaomi (#29197) 2019-11-29 08:09:36 +01:00
springstan
e63bca4f32 Move imports to top for xiaomi_aqara (#29196) 2019-11-29 08:09:10 +01:00
michaeldavie
1322661ee0 Handle None when trucating long Environment Canada state values (#29208)
* Handle None when trucating long state values, add info message

* Black
2019-11-29 04:13:21 +01:00
springstan
1c824f5ca7 Move imports to top for ziggo_mediabox_xl (#29193) 2019-11-29 02:10:08 +01:00
springstan
e5aa050def Move imports to top for zhong_hong (#29194) 2019-11-29 02:09:03 +01:00
springstan
fe34ea1865 Move imports to top for zabbix (#29195) 2019-11-29 02:07:52 +01:00
springstan
66aae61fd5 Move imports to top for wirelesstag (#29198) 2019-11-29 02:03:14 +01:00
Fabian Affolter
0d30a6bcac Upgrade youtube_dl to 2019.11.28 (#29199) 2019-11-29 02:02:01 +01:00
springstan
25ad933d2d Move imports to top for vultr (#29200) 2019-11-29 02:00:40 +01:00
springstan
243e80459d Move imports to top for volvooncall (#29201) 2019-11-29 01:59:48 +01:00
springstan
0e4920d6a1 Move imports to top for tof (#29203)
* Move imports to top for tof

* Isorted imports
2019-11-29 01:58:56 +01:00
springstan
7b33e57e86 Move imports to top for tautulli (#29204) 2019-11-29 01:56:39 +01:00
springstan
5001dbdcfa Move imports to top for tapsaff (#29205) 2019-11-29 01:55:52 +01:00
springstan
e1fece48e1 Move imports to top for syncthru (#29206) 2019-11-29 01:54:42 +01:00
springstan
430061a159 Move imports to top for usgs_earthquakes_feed (#29202) 2019-11-29 01:53:49 +01:00
HomeAssistant Azure
8dc366c75b [ci skip] Translation update 2019-11-29 00:32:07 +00:00
Fabian Affolter
103b917bb2 Upgrade psutil to 5.6.6 (#29192) 2019-11-28 23:20:00 +01:00
guillempages
26e674b4c3 Resolve hosts for fritzbox_callmonitor (#28761)
* Resolve hosts for fritzbox_callmonitor

If the configuration supplied "host" is not an IP address, try resolving it

* always use gethostbyname

Instead of just checking whether it is an IP and if it isn't try to resolve; just resolve it; IPs will be returned unchanged, and hostnames will be resolved.

* Catch error if the hostname cannot be resolved

* Don't fallback to default host

If the hostname cannot be resolved; don't try to fallback; just print the error message.

* Fail setup if hostname cannot be resolved

If the hostname cannot be resolved, log an error and stop the setup;
no entities will be then created.
2019-11-28 21:14:20 +01:00
Wim Haanstra
daed314585 Dsmr reader (#28701)
* Added DSMR Reader platform

- Added DSMR Reader platform
- Updated codeowners for other components I added earlier

* Move sensor definitions to new file

* Sensor definitions in new file

* Add energy prices from MQTT

* lint fixes

* Black formatted some files

* Update .coveragerc

* Support transform methods on definitions

* Manifest mangled by Black, fixed

* Visual studio code reformatting dictionary error

* Fix issues with code, remove unrelated manifest changes

* Update CODEOWNERS
2019-11-28 20:30:24 +01:00
Paulus Schoutsen
b847d55077 Only create cloud user if cloud in use (#29150)
* Only create cloud user if cloud in use

* Pass context to alexa

* Update requirements

* Fix handing & design pattern for 0.30

* fix tests

* Fix lint & tests

* rename internal user
2019-11-28 14:23:59 +01:00
Pascal Vizeli
5d5d053bce Use github instead gitlab 2019-11-28 13:40:29 +01:00
tetienne
4e107a2bcf Add support for Somfy Camera Shutter (#29057) 2019-11-28 10:42:17 +01:00
jjlawren
9c9e9bc92a Bump plexwebsocket to 0.0.6 (#29175) 2019-11-27 22:40:08 -08:00
Joakim Plate
69991bf3a2 Move GoogleConfig initialization into setup of component (#29170) 2019-11-27 20:45:43 -08:00
Raman Gupta
3ecf5596ff update demo service domain and service description (#29164)
* update demo service domain and service description

* move DOMAIN and service name to const.py

* update per balloob's service name suggestion

* update service name in services.yaml

* update service name constant's name
2019-11-27 20:36:40 -08:00
Paulus Schoutsen
4cfd24a03a Fix mobile app device identifiers (#29173) 2019-11-27 20:27:22 -08:00
Dan Jones
665613e395 Add fan support to lutron_caseta (#29033)
* Adding lutron_caseta fan controller. Updated to pylutron 0.5.1

* Accidental import remain

* updating for black formatting

* Fix blank spaces

* Moving third party import

* update to 0.5.1 to pass checks

* fix deletion of new line

* Update fan.py

* Update with dev branch, update from comments, added mediumhigh
2019-11-28 02:45:36 +01:00
Raman Gupta
f1a4e212cc Update service domain for alarmdecoder from 'alarm_control_panel' to 'alarmdecoder' (#29127)
* update alarmdecoder service domain

* update alarmdecoder service name

* black formatting
2019-11-27 16:51:40 -08:00
Raman Gupta
88376bf363 move wemo services to wemo domain (#29135) 2019-11-27 16:49:12 -08:00
Raman Gupta
9fd058aa33 move soundtouch services to soundtouch domain (#29140) 2019-11-27 16:47:45 -08:00
HomeAssistant Azure
f6dd51a7fb [ci skip] Translation update 2019-11-28 00:32:18 +00:00
Raman Gupta
7ecd5b5e5a add services.yaml description for service (#29160) 2019-11-27 14:18:21 -08:00
Raman Gupta
ceb1528b50 Update bluetooth_tracker service name and domain from 'device_tracker' to 'bluetooth_tracker' (#29161)
* move service constants to const.py, update service domain, add service description

* update .coveragerc
2019-11-27 14:18:01 -08:00
Raman Gupta
b6d94bcc96 Change apns service domain and remove unused variable (#29165)
* change apns service domain and remove unused variable

* fix tests

* move DOMAIN to const.py and import DEVICE_TRACKER_DOMAIN from base component
2019-11-27 14:15:25 -08:00
Robert Svensson
bdb3eb1683 Handle case when device can be None (#29171) 2019-11-27 14:14:19 -08:00
jjlawren
88441d5f68 Reduce connection timeout to avoid config flow timeouts (#29172) 2019-11-27 14:14:01 -08:00
Raman Gupta
acc10c296e move import to top and add service definition for pilight (#29163)
* move import to top and add service definition for pilight

* move import above HA imports
2019-11-27 21:26:54 +01:00
Tsvi Mostovicz
d7a66e6e4c Return Jewish Calendar holiday type id support (#29168)
* Bring back holiday type id as a attribute to the holiday sensor

* Add test for holiday type id attribute
2019-11-27 20:52:03 +01:00
Brett T. Warden
fa1622fe8b Use roku.poweron method for media_player.turn_on (#29123)
Instead of using the roku.power method, which toggles power,
implement the media_player.turn_on command for the roku component
by calling the new roku.poweron method.

Fixes #28961, but depends on upstream
https://github.com/jcarbaugh/python-roku/pull/53
2019-11-27 18:19:10 +01:00
Raman Gupta
8ef8a314df Update service domain for ifttt from 'alarm_control_panel' to 'ifttt' (#29129)
* update service domain for ifttt

* update missed variable references
2019-11-27 18:17:56 +01:00
Raman Gupta
82fe409961 add services.yaml description for matrix service (#29159) 2019-11-27 18:15:15 +01:00
Raman Gupta
b274fcba05 Update service domain for harmony from 'remote' to 'harmony' (#29146)
* move harmoney services to harmony domain

* update service names
2019-11-27 18:14:46 +01:00
Raman Gupta
d577868190 move yamaha service to yamaha domain (#29142) 2019-11-27 18:13:54 +01:00
Raman Gupta
ef21fd2536 Update services.yaml for nuheat (#29133)
* update services.yaml for nuheat

* update tests

* black formatting
2019-11-27 15:20:40 +01:00
mvn23
fdf0793fdd Add opentherm_gw device support (#28722)
* Add opentherm_gw device support

* Add support for enabling/disabling of opentherm_gw entities

* Disable sensors by default, base climate entity_id on gw_id instead of friendly_name to guarantee uniqueness

* Remove platform name from unique_id
2019-11-27 08:14:41 -05:00
Raman Gupta
12ae8b025f move squeezebox service to squeezebox domain (#29141) 2019-11-27 13:54:00 +01:00
Raman Gupta
59939004bf Update service domain for mill from 'climate' to 'mill' (#29132) 2019-11-27 13:47:38 +01:00
Abílio Costa
a08df53dbc Add "gentle" mode for Xiaomi Roborock vacuum (#29004)
* Add "gentle" mode for Xiaomi Roborock vacuum

* fix tests
2019-11-27 13:46:13 +01:00
Tom Brien
8f05388bc5 Remove ios warning for no devices subscribed to ios.notify (#29153)
Since 2019.1 has launched there is a perfectly reasonable (in fact the standard) case where ios component is loaded (i.e. actionable notifications) but no devices are registed for the now defunct `ios.notify` service. As such, the log warning relating to this case is no longer relevant.
2019-11-27 13:35:38 +01:00
Raman Gupta
c80f284ca4 Update service domain for mysensors from 'switch' to 'mysensor… (#29147) 2019-11-27 13:31:40 +01:00
Raman Gupta
2d2ab452ca update envisalink service domain (#29126) 2019-11-27 11:27:48 +01:00
Raman Gupta
1681d36637 Update service domain for todoist from 'calendar' to 'todoist' (#29131)
* move todoist constants to const.py and update service domain

* update .coveragerc

* remove unused variable

* save file
2019-11-27 11:26:59 +01:00
Paulus Schoutsen
004476a1f8 Add intent integration to expose intent handle API (#29124)
* Add intent integration to expose intent handle API.

* Run hassfest + fix scaffolding

* Update __init__.py
2019-11-27 11:25:43 +01:00
Raman Gupta
ec61a86678 move service constants to const.py and move channels services to channels domain (#29139) 2019-11-27 11:23:52 +01:00
Raman Gupta
1f13809c6d Update service domain for lifx from 'light' to 'lifx' (#29136)
* update service domain for lifx custom services

* fix service name
2019-11-27 11:23:06 +01:00
Raman Gupta
9e882ef6b4 move wink service definitions from lock to wink domain (#29137) 2019-11-27 11:21:52 +01:00
Raman Gupta
5120181e0e move facebox service to facebox domain (#29151) 2019-11-27 11:20:24 +01:00
Raman Gupta
c72e230432 move songpal service to songpal domain (#29143) 2019-11-27 11:19:01 +01:00
Raman Gupta
0ff0ec7d3e move econet services to econet domain (#29149) 2019-11-27 11:18:21 +01:00
Raman Gupta
ff4d256893 move icloud services to icloud domain (#29144) 2019-11-27 11:16:53 +01:00
Raman Gupta
b8f03aa3be move neato service to neato domain (#29148) 2019-11-27 11:15:59 +01:00
Raman Gupta
975ee0ea7f Update service domain for elkm1 from 'alarm_control_panel' to 'elkm1' (#29128)
* move elkm1 services to elkm1 domain

* update missed variable references
2019-11-27 11:15:27 +01:00
Raman Gupta
b7896c7b6f move nuki service to nuki domain services.yaml and remove missing service (#29138) 2019-11-27 11:14:22 +01:00
Raman Gupta
fb9f561052 move html5 service to html5 domain (#29145) 2019-11-27 11:13:27 +01:00
Chris Caron
8933540950 bumped supported apprise version to 0.8.2 (#29125) 2019-11-26 20:18:43 -08:00
Ville Skyttä
5bc8ef962b Upgrade huawei-lte-api to 1.4.4 (#29130)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.4

Closes https://github.com/home-assistant/home-assistant/issues/28922
2019-11-26 20:18:24 -08:00
Ville Skyttä
738b3363d9 UpCloud updates (#28646)
* Upgrade upcloud-api to 0.4.5

* Fix UpCloud name spelling in manifest

* Update data at setup time for better initial states

* Clean up signal handlers on remove

* Signal data update on server start

To keep related binary sensor better up to date.

* Improve track_time_interval emulation for initial update
2019-11-26 20:17:14 -08:00
HomeAssistant Azure
2a7aac6afc [ci skip] Translation update 2019-11-27 00:32:16 +00:00
springstan
33c6ee80ad Move imports to top for traccar (#29116) 2019-11-26 16:07:12 -08:00
springstan
5eaafcfd7f Move imports to top for touchline (#29117) 2019-11-26 16:06:44 -08:00
springstan
4e96ca9486 Move imports to top for temper (#29118) 2019-11-26 16:02:50 -08:00
springstan
555190990a Move imports to top for tank_utility (#29119) 2019-11-26 16:02:36 -08:00
Joakim Plate
06231e7ac2 Move request sync logic into GoogleConfig (#28227)
* Move request sync logic into GoogleConfig

* Return http status code for request_sync same as cloud

* agent_user_id is not optional for async_sync_entities now

* No need in checking parameter here

* Adjust some things for cloud tests

* Adjust some more stuff for cloud tests

* Drop uneccessary else

* Black required change

* Let async_schedule_google_sync take agent_user_id

* Assert return value on api call

* Test old api key method

* Update homeassistant/components/google_assistant/helpers.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-11-26 22:47:13 +01:00
gjbadros
5f1b0fb15c Allow rest sensor list responses (#28835)
* Make rest sensor a little bit more flexible and allow the response to be a list with 0th element being a dictionary

* Black formatter wanted a different formatting

* Added test case for a list response with dict as 0th element

* Fixed lint error - it thinks a + STRING is an avoidance of using % sequences for log messages; I generally prefer explicit + rather than string juxtaposition for combining string literals, but sounds like that's not the standard

* Fixed test case -- I added it to the wrong scenario and need to use the one with json_attrs.
2019-11-26 22:10:58 +01:00
springstan
b72c6c4424 Update list of supported countries for Workday Sensor (#29000)
* Updated list of supported countries

* Added Honduras and Polish back to the list

* Added HND for Honduras to the list
2019-11-26 22:09:00 +01:00
Colin O'Dell
0849d42dc6 Remove the alarm_control_panel CODEOWNER (#29114)
Although I originally contributed this component, I no longer use it myself and haven't been following the internal development of HA, so I'm no longer a good person to review any further changes to this component.  I would therefore like to relinquish my CODEOWNER status over this component.
2019-11-26 21:57:45 +01:00
Evgeny
4ea47333d8 Update roomba bin state checking (#29030)
* Fixed bin full detection

* Refactored bin check

* Fix after pylint
2019-11-26 21:31:00 +01:00
Alex van den Hoogen
fe626f5669 Add Post Processing Jobs to NZBGet component (#29027)
* Added Post Processing Jobs to NZBGet component

In the current implementation of the NZBGet component there is no way of
knowing whether NZBGet is still in the Post Processing phase of a download
job. This can be very useful information. For instance when you want to
suspend the NZBGet service when all queue items have been completed.

This change adds that additional sensor.

* Renamed Count to Jobs in NZBGet component
2019-11-26 11:31:20 -08:00
sophof
078a7e446d Fix all entities triggering all observations in bayesian sensor (#28979)
* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list

* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list

* use get instead of direct keys for dict

* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list

* use get instead of direct keys for dict

* changed get back to []
2019-11-26 11:26:40 -08:00
Nikolay Vasilchuk
a37260faa9 StarLine integration (#27197)
* Device Tracker works

* Device Tracker works

* Binary Sensor

* Sensor

* Lock

* Switch and service

* New switches

* Update interval options

* WIP

* Translation errors

* Check online state

* WIP

* Move to aiohttp

* Some checks

* CI

* CI

* .coveragerc

* Black

* icon_for_signal_level test

* update_interval renamed to scan_interval

* async logic

* Fix cookie read

* Requirement starline

* Reformat

* Requirements updated

* ConfigEntryNotReady

* Requirement starline

* Lint fix

* Requirement starline

* available status

* Translations

* Expiration to config

* CI

* Linter fix

* Small renaming

* Update slnet token

* Starline version bump

* Fix updates

* Black

* Small fix

* Removed unused fields

* CI

* set_scan_interval service

* deps updated

* Horn switch

* Starline lib updated

* Starline lib updated

* Black

* Support multiple integrations

* Review

* async_will_remove_from_hass

* Deps updated

* Test config flow

* Requirements

* CI

* Review

* Review

* Review

* Review

* Review

* CI

* pylint fix

* Review

* Support "mayak" devices

* Icons removed

* Removed options_flow

* Removed options_flow test

* Removed options_flow test
2019-11-26 11:17:11 -08:00
Raman Gupta
c21650473a Update service domain for epson from 'media_player' to 'epson' (#29113)
* update .coveragerc, move epson constants to const.py, move epson cutsom service to epson domain

* Newline in services.yaml
2019-11-26 11:12:50 -08:00
Raman Gupta
9e01591cac Update service domain for blackbird from 'media_player' to 'blackbird' (#29112)
* move service constants to const.py, update blackbird custom service domain

* Readd bluesound services.yaml entries since it should be part of a different branch
2019-11-26 11:10:13 -08:00
Raman Gupta
2da37778af Update service domain for bluesound from 'media_player' to 'bluesound' (#29111)
* move service constants to const.py, move services to bluesound domain

* Remove bluesound services from media_player/services.yaml
2019-11-26 11:06:34 -08:00
rappenze
1c73ac5df8 Fix Vicare imports (#29071)
* fix import

* Update water_heater.py

* use ValueError

* use ValueError
2019-11-26 10:46:53 -08:00
Aaron Bach
2cdd8ad15e Add new properties and services for V3 SimpliSafe systems (#28997)
* Add new properties and services for V3 SimpliSafe systems

* Small semantic change

* Updated docstrings

* Semantics

* Streamlined adding V3 properties

* Re-add attribute

* Bump to 5.3.5

* Owner comments

* Correct coroutine name
2019-11-26 11:44:40 -07:00
springstan
595567ad82 Move imports to top for trafikverket_weatherstation (#29108) 2019-11-26 10:23:08 -08:00
springstan
c221fc5d22 Move imports to top for thinkingcleaner (#29110) 2019-11-26 10:22:57 -08:00
springstan
23d4445de3 Move imports to top for trackr (#29109) 2019-11-26 10:22:28 -08:00
springstan
a27d8570c8 Move imports to top for unifi_direct (#29106) 2019-11-26 10:12:00 -08:00
springstan
4119ade2af Move imports to top for travisci (#29107) 2019-11-26 10:11:43 -08:00
springstan
825ac36ee7 Move imports to top for uvc (#29072)
* Move imports to top for uvc

* Fixed linting error

* Renamed parameter in constructor to avoid redefining import
2019-11-26 10:11:10 -08:00
Quentame
9a388e2dd2 Move dominos imports at top-level (#29090) 2019-11-26 10:10:20 -08:00
Quentame
c84590b18c Move free_mobile imports at top-level (#29092) 2019-11-26 10:10:05 -08:00
Quentame
274508f8fd Move fortigate imports at top-level (#29093) 2019-11-26 10:09:52 -08:00
Quentame
915d23158d Move foobot imports at top-level (#29094) 2019-11-26 10:09:32 -08:00
Quentame
4107fd9a25 Move folder_watcher imports at top-level (#29095) 2019-11-26 10:09:20 -08:00
Quentame
7a04f0c0df Move flunearyou imports at top-level (#29096) 2019-11-26 10:09:10 -08:00
Quentame
a7c4abba98 Move flexit imports at top-level (#29097) 2019-11-26 10:08:53 -08:00
springstan
21ed87a773 Move imports to top for ubee (#29105) 2019-11-26 10:08:34 -08:00
springstan
03fe7cb347 Move imports to top for twilio_call (#29104) 2019-11-26 10:08:16 -08:00
springstan
33af72a54f Move imports to top for uptimerobot (#29103)
* Move imports to top for uptimerobot

* Move imports to top for twilio_call

* Revert twilio_call
2019-11-26 10:07:46 -08:00
Raman Gupta
499838d5a7 move service constants to const.py, move custom services to monoprice domain (#29099) 2019-11-26 10:07:29 -08:00
SukramJ
c1163283ff Add hvac_action to HomematicIP Cloud Climate (#28859)
* Add hvac_action to HomematicIP Cloud Climate

* update test data

* limit hvac action to radiator only

* add checks

* Fix test to match new conditions
2019-11-26 10:02:30 -08:00
springstan
d0c47dfee2 Move imports to top for webostv (#29102) 2019-11-26 09:49:14 -08:00
Raman Gupta
42ce5e8b07 Update service domain for local_file from 'camera' to 'local_file' (#28890)
* update service domain for local_file from camera to local_file

* remove service.yaml entry in camera component as part of change

* fix test

* move constants to const.py

* add local_file/const.py to .coveragerc

* remove local_file/const.py from .coveragerc since component has tests
2019-11-26 09:22:55 -08:00
Rami Mosleh
a5960830d7 Add host field to add_torrent service (#28653)
* Add host field to add_torrent service

* Code cleanup

* use name instead of host for service

* update add_torrent
2019-11-26 09:22:12 -08:00
Matthew Donoughe
f8a36499c1 Add serial to caseta devices (#28886)
* add model and serial to caseta devices

* use just serial for unique id

* add display name for entity registry

* remove caseta device model

* just store device

* state and device are the same
2019-11-26 09:06:14 -08:00
Hmmbob
9e971495f7 Update WazeRouteCalculator, add config options, fix subscription (#27963)
* Update WazeRouteCalculator to 0.11

* Update WazeRouteCalculator to 0.11

* Adding new config options to Waze

* Fixing avoid subscription option

* Update WazeRouteCalculator to 0.12

There was an error in the underlying lib

* Update WazeRouteCalculator to 0.12
2019-11-26 09:05:06 -08:00
Quentame
44e708f72b Move ee_brightbox imports at top-level (#29054)
* Move ee_brightbox imports at top-level

* Fix tests

* Fix : Commented out code
2019-11-26 08:59:55 -08:00
Quentame
78d5184186 Move icloud imports at top-level (#29089) 2019-11-26 08:59:42 -08:00
Austin Drummond
c47ed743f1 Fix HomeKit linked battery sensor crash (#28974)
* fix homekit linked battery sensor crash

* simplified missing linked battery

* fixed formatting

* Make if faster
2019-11-26 08:55:33 -08:00
Pascal Vizeli
f9571c9637 Fix Alexa tests (#29100) 2019-11-26 16:17:41 +01:00
Bendik Brenne
c538d899a2 Fix empty data attribute in sinch service call (#28253)
* Fix empty data attribute in sinch service call

* Simplified the PR as per @MartinHjelmare`s request.
2019-11-26 14:14:09 +01:00
Paulus Schoutsen
c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Tim McCormick
6c6a5c50a5 Fix digest auth rest sensors (#28153)
* Fix digest auth rest sensors

* Refactor to use request()

* Fix black complaints

* Don't rename data variable

Don't rename the data variable, appears several other sensors have been coded to rely on it

* Fix tests

test_setup_missing_schema:
Change the exception to check for to PlatformNotReady. With the change away from prepared statements, we no longer get the MissingSchema error during setup - we get it when we attempt to call the endpoint. Since the result is PlatformNotReady, which is what we want, and the error log clearly contains a note that the schema is incorrect I think this is fine.

test_setup_failed_connect & test_setup_timeout:
These aren't checking for minimum config, and they're not invoking the correct method to have the default config filled in. Therefore I've just added the correct minimum config so these can continue to test what they're there to test.

test_update_request_exception:
Testing a request exception with the assert on line 404! Excellent. Anyway, we've moved from using the requests Session object to the requests.request function - so the patch needed to be altered to ensure the RequestException was raised.

* Remove no longer needed import

* Fix binary sensor test in same way
2019-11-25 23:22:11 -08:00
ochlocracy
b0925e60d7 Explicitly include "Alexa" Interface in discovery response (#28218)
* Explicitly include Alexa Interface to discovery response.

* Updated cloud component test to reflect additional Alexa interface.

* Updated test for recently added SeekController.
2019-11-25 23:05:10 -08:00
Bas Nijholt
db425f5432 Simplify getting alias from tplink smartplug.context (#28696)
* tplink: simplify getting alias from smartplug.context

* add a doc-string to private property
2019-11-25 23:03:38 -08:00
Ville Skyttä
99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Barry Williams
afaa464142 If volume disabled do not enable support (#28635) 2019-11-25 22:34:45 -08:00
Shulyaka
1f72de108c google_assistant: support for humidity sensors (#28695) 2019-11-25 22:12:20 -08:00
Emeric
72ccc83651 Add uptime and number of reboot for bbox sensor (#28880)
* Add uptime and reboot for bbox sensor

* Use timestamp for uptime

* Fix black format
2019-11-25 21:34:13 -08:00
Adam Cheng
6e7b5b71f5 Add scale and offset to temperature values to Modbus Climate (#27045)
* Add scale and offset to temperature values

* fix (no-else-return)

* Update manifest.json

* Added codeowners
2019-11-25 20:59:01 -08:00
Dmitry Krasnoukhov
4881bc04d8 Allow to change MQTT climate hold mode (#28988) 2019-11-25 20:53:37 -08:00
springstan
5f4fc271d4 Fixed CONFIG_SCHEMA and getting data from the config (#28985) 2019-11-25 20:27:51 -08:00
Pedro Lamas
db0008e62c Allow templates in rest_command headers (#26099) 2019-11-25 19:39:56 -08:00
springstan
cc255da038 Move imports to top for ecovacs (#29017)
* Moved imports in ecovacs integration

* Imported sucks once, reused it multiple times
2019-11-25 18:01:48 -08:00
Michaël Arnauts
cc346e57e6 Cast the volume_level of a universal media_player to a float (#29045)
* Make sure to cast the volume_level of a universal media_player to a float

* Fix test that expects the wrong bahaviour

* Catch exception instead of checking for None
2019-11-25 18:01:24 -08:00
Quentame
8a413b152d Move esphome imports at top-level (#29064) 2019-11-25 18:00:58 -08:00
olijouve
87de5db535 Fix Onvif setup error: premature end of connection on GetStreamURI (#26781)
* Fix Onvif setup error with a premature end of connection on GetStreamUri wsdl call

Reconnect to onvif camera after getting profiles to fix this error :

[homeassistant.components.onvif.camera] Retrieving stream uri                                                                                                                                 
[zeep.asyncio.transport] HTTP Post to http://192.168.1.15/onvif/Media:                                                                                                                        
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
2019-09-20 01:08:51 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif                                                                                                                       
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 553, in write_bytes                                                                                                                                   
    await self.body.write(writer)                                                                                                                                                                                                    
  File "/usr/local/lib/python3.7/site-packages/aiohttp/payload.py", line 231, in write                                                                                                                                               
    await writer.write(self._value)                                                                                                                                                                                                  
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 101, in write                                                                                                                                           
    self._write(chunk)                                                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write                                                                                                                                           
    raise ConnectionResetError('Cannot write to closing transport')                                                                                                                                                                  
ConnectionResetError: Cannot write to closing transport                                                                                                                                                                              
                                                                                                                                                                                                                                     
The above exception was the direct cause of the following exception:                                                                                                                                                                 
                                                                                                                                                                                                                                     
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform                                                                                                                         
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)                                                                                                                                                                
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for                                                                                                                                                            
    return fut.result()                                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 110, in async_setup_platform                                                                                                                          
    await hass_camera.async_initialize()                                                                                                                                                                                             
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 168, in async_initialize                                                                                                                              
    await self.async_obtain_input_uri()                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 266, in async_obtain_input_uri                                                                                                                        
    stream_uri = await media_service.GetStreamUri(req)                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py", line 13, in send                                                                                                                                           
    options["address"], envelope, http_headers                                                                                                                                                                                       
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 107, in post_xml                                                                                                                                     
    response = await self.post(address, message, headers)                                                                                                                                                                            
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 95, in post                                                                                                                                          
    proxy=self.proxy,                                                                                                                                                                                                                
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 497, in _request                                                                                                                                             
    await resp.start(conn)                                                                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 844, in start                                                                                                                                         
    message, payload = await self._protocol.read()  # type: ignore  # noqa                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 588, in read                                                                                                                                                
    await self._waiter                                                                                                                                                                                                               
aiohttp.client_exceptions.ClientOSError: [Errno None] Can not write request body for http://192.168.1.15/onvif/Media

* Add code comment

* Update camera.py

* Lint.
2019-11-25 17:56:17 -08:00
Andrew Onyshchuk
f5c01cc30d Improve z-wave thermostat support (#27040)
* Improve z-wave thermostat support

Discover thermostat using COMMAND_CLASS_THERMOSTAT_MODE
so that it is a single entitiy in case there are multiple
setpoints. z-wave docs mention it is always present.
Add support for single/range target temperature depending
on the current thermostat mode.

* Remove debug print

* Refactor Z-Wave dynamic setpoint(s) selection

- use explicit mapping between modes and setpoints as defined in
Z-Wave specs
- add tests for away (2 setpoints) and heat eco (1 setpoint) modes

* Add non-standard thermostat mode aliases
2019-11-25 16:32:37 -08:00
HomeAssistant Azure
807de1aeb3 [ci skip] Translation update 2019-11-26 00:32:24 +00:00
Gil Peeters
0088995b98 Refactor template components to extract common routines (#27064)
* Added availability_template to Template Cover platform

* Added availability_template to Template Binary Sensor platform

* Added availability_template to Template Fan platform

* Added availability_template to Template Light platform

* Added availability_template to Template Sensor platform

* Added availability_template to Template Switch platform

* Added availability_template to Template Vacuum platform

* Added availability_template to Template Lock platform

* Added to test for invalid values in availability_template

* Black and Lint fix

* black formatting

* Added to test for invalid values in availability_template

* black

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* simplified exception handler

* Fixed Entity discovery big and coverage

* Added to test for invalid values in availability_template

* flake8

* fixed component ID in test

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* Made availability_template redering erorr more concise

* Cleaned template setup

* I'll remember to run black every time one of these days...

* Refactored Template initialisation

* Refactored Template initialisation

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fixed linting issues

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Removed 'Magic' string and removed duplicate code

* Removed 'Magic' string

* Removed 'Magic' string

* Brought contant into line

* Refactored availability_tempalte rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* Fixed tests (magic values and state checks)

* Fixed tests (magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Removed duplicate

* Clean up and remove debug

* Reverted Dev Container Change
2019-11-25 16:30:49 -08:00
Jacob McSwain
d5db55354e Add SSL configuration (#29038)
* OpenGarage: Add protocol configuration (#29037)

* OpenGarage: Change CONF_PROTOCOL to CONF_SSL

Resolves https://github.com/home-assistant/home-assistant/pull/29038#discussion_r350173095

* OpenGarage: Add `verify_ssl` as an option
2019-11-25 15:47:18 -08:00
Quentame
112a3f5e9f Move hangouts imports at top-level (#29055) 2019-11-25 15:44:11 -08:00
SukramJ
1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
springstan
3203cba01f Move imports to top for xiaomi_tv (#29073) 2019-11-25 15:40:42 -08:00
springstan
c95a01ce3a Move imports to top for yale_smart_alarm (#29074) 2019-11-25 15:40:25 -08:00
springstan
729116ff3a Move imports to top for version (#29075) 2019-11-25 15:40:08 -08:00
springstan
a64d04da56 Move imports to top for xeoma (#29076) 2019-11-25 15:39:54 -08:00
springstan
d211a29cae Move imports to top for xfinity (#29077) 2019-11-25 15:39:44 -08:00
Quentame
844eb6b8ef Move dlna_dmr imports at top-level (#29082) 2019-11-25 15:37:19 -08:00
Quentame
5015993f30 Move upnp imports at top-level (#29083) 2019-11-25 15:37:03 -08:00
Quentame
29e2201446 Move velux imports at top-level (#29085) 2019-11-25 15:36:37 -08:00
Quentame
12c396fb19 Move epsonworkforce imports at top-level (#29086) 2019-11-25 15:36:04 -08:00
ochlocracy
970a80216d Add valid inputs to alexa InputController (#28483)
* Add supported Inputs for Alexa.InputController.

* Fixed Test.

* Added default parameter for get() per @quthla suggestion.

* Added additional tests, assets call data.

* Added additional tests, asserts call data.

* Accounted for space in input name, added tests to handle space.
2019-11-25 15:17:12 -08:00
mvn23
f53812f261 Fix opentherm_gw config flow migration (#28474)
* Fix opentherm_gw migration to config flow.

* Address feedback
2019-11-25 15:08:18 -08:00
ochlocracy
5ea5db32d2 Add Alexa.ModeController to cover entities, adds open/close utterances! (#28309)
* Added Alexa.ModeController to cover entities.

* Added synonyms for directives.

* Updated tests for additional synonyms for directives.

* Added Alexa.ModeController to cover entities.

* Sacrifice unused variable in split() to please the Pylint gods.

* Removed duplicate instance check.

* Corrected variable name, clarified definition and consistency.

* Changed list to tuple.
2019-11-25 15:07:33 -08:00
ochlocracy
dc8c085872 Support default display category based one switch device_class. (#28221) 2019-11-25 14:50:43 -08:00
Quentame
f971e16749 Move eddystone_temperature imports at top-level (#29052)
* Move eddystone_temperature imports at top-level

* Fix pylint ?
2019-11-25 23:46:12 +01:00
Heine Furubotten
04754b354c Entur public transport code owner (#29080)
* entur code owner

* gen codeowners file
2019-11-25 23:45:33 +01:00
Heine Furubotten
66b7dfec53 Nilu integration code owner (#29081)
* nilu code owner

* gen codeowners file
2019-11-25 23:45:14 +01:00
Quentame
c4108fec4f Move yi imports at top-level (#29001)
* Move yi imports at top-level

* Review 1 : removing useless disable=import-error

* Review 2 : removing useless disable=import-error
2019-11-25 15:32:35 -07:00
majuss
3dd5222ec7 Bumped lupupy to version 0.0.18 (#28989)
* Bumped lupupy

* Ran gen req

* Ran gen hassfest


Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2019-11-25 20:21:54 +01:00
SukramJ
9a5dc848c9 Fix climate device actions (#28660)
* limit climate device actions

* update test

* use supported_features for device_action

* Fix tests

* user support_features for device_condition
2019-11-25 11:12:00 -08:00
Bas Nijholt
ea6417bea3 track Raspberry Pi 4 image in the version integration (#29059) 2019-11-25 10:07:27 -08:00
Quentame
e40dda3ce3 Move econet imports at top-level (#29050) 2019-11-25 16:06:37 +01:00
Ville Skyttä
f504ac8c65 Drop < 0.97 Huawei LTE sensor unique id migration workaround (#29060) 2019-11-25 16:06:10 +01:00
Pascal Vizeli
9dc63419c4 Bump numpy 1.17.4 / opencv 4.1.2 for Python 3.8 (#29061) 2019-11-25 16:05:21 +01:00
fredericvl
3e4f7fddf2 Handle offline state of SAJ inverters (fixes #29007) (#29009)
* Fix for SAJ issue #29007

* Sort mapping
2019-11-25 08:46:49 -05:00
Quentame
335473cb71 Move hdmi_cec imports at top-level (#29056) 2019-11-25 14:43:17 +01:00
cgtobi
6da01904c4 Fix typo in scaffold generator script (#29058) 2019-11-25 14:42:40 +01:00
SukramJ
1043712c54 Code maintenance for HomematicIP Cloud (#28980)
* Add more type hints to Homematic IP Cloud

* Rename device to entity in async_setup_entry
2019-11-25 14:17:14 +01:00
Otto Winter
b927f40f00 Add climate hvac_action for ESPHome (#28993)
* Add climate action

* Bump aioesphomeapi
2019-11-25 14:13:19 +01:00
Quentame
5edc45e9af Move fibaro imports at top-level (#28995) 2019-11-25 14:12:01 +01:00
springstan
ccb05764b6 Move imports to top for ffmpeg_motion and ffmpeg_noise (#29026)
* Move imports to top for ffmpeg_motion and ffmpeg_noise

* Fixed tests
2019-11-25 14:11:23 +01:00
Quentame
71bafba9ec Move ecoal_boiler imports at top-level (#29049) 2019-11-25 14:08:52 +01:00
Quentame
cb5d00a07b Move ebox imports at top-level (#29048) 2019-11-25 14:08:28 +01:00
kuchel77
63f66785ad Added error checking (#29041)
Add in error checking in case disks or volumes are empty.
2019-11-25 14:08:04 +01:00
Quentame
752a4d7221 Move dyson imports at top-level (#29047) 2019-11-25 14:06:39 +01:00
Quentame
193769c791 Move vizio imports at top-level (#29046) 2019-11-25 14:05:46 +01:00
Quentame
3122182ab2 Move edimax imports at top-level (#29053) 2019-11-25 14:05:07 +01:00
Michaël Arnauts
c21c167f4e Use TADO_MODE for temperature overrides in tado climate component. (#29014)
* Use TADO_MODE for temperature overrides in tado climate component.

* Fix typo in pydoc

* Add myself as a code owner

* Update CODEOWNERS file
2019-11-25 14:04:36 +01:00
Chris Halls
5690313084 Report device unavailable state through Emulated Hue (#29029)
If an entity is in unavailable state in HA, we expose this
as unreachable to Hue clients. This helps when troubleshooting
Hue issues because you can now receive feedback if there is an issue
on the HA side.
2019-11-25 12:17:08 +01:00
springstan
aa00e56e1c Move imports to top for discovery (#29020) 2019-11-25 12:15:55 +01:00
escoand
430f7bdfd4 Catch samsungtv websocket exceptions (#28849)
* catch websocket exceptions

* fix syntax

* use exceptions from base class

* add comments

* add test
2019-11-25 10:45:50 +01:00
Fabian Affolter
5b64052d69 Upgrade discord.py to 1.2.5 (#28998) 2019-11-25 09:50:10 +01:00
springstan
cc3559d54c Move imports to top for geizhals (#29021) 2019-11-25 09:43:59 +01:00
springstan
ee038999fc Move imports to top for todoist (#29022) 2019-11-25 09:43:29 +01:00
springstan
fe9084bb3b Move imports to top for watson_tts (#29023) 2019-11-25 09:42:37 +01:00
Quentame
5822deda1d Move philips_js imports at top-level (#29003) 2019-11-25 09:41:37 +01:00
Philipp Schmitt
6307f383a7 Fix #27028 (#29042) 2019-11-25 09:40:32 +01:00
Josh Anderson
8fade79a0a Add an early start sensor for heating zones (#28732) 2019-11-25 09:13:59 +01:00
Paulus Schoutsen
ebc0ed1e22 Merge pull request #29039 from home-assistant/rc
0.102.2
2019-11-24 21:16:56 -08:00
Paulus Schoutsen
8a467bbf5c Bumped version to 0.102.2 2019-11-24 19:57:50 -08:00
Franck Nijhof
b10d42e330 Alexa gracefully handle climate devices without presets (#29010) 2019-11-24 19:57:43 -08:00
Bram Kragten
2af1ba7492 Updated frontend to 20191119.6 (#28996) 2019-11-24 19:57:42 -08:00
shred86
a56f7f5d75 Fix temp not being reported properly (#28973) 2019-11-24 19:57:42 -08:00
cgtobi
481f71107b Fix manual config (#28956) 2019-11-24 19:57:41 -08:00
Pascal Vizeli
2e85e3662f Fix ikea lights on deconz (#28949)
* Fix ikea lights on deconz

* check for None

* Use cleaner code style
2019-11-24 19:57:40 -08:00
jjlawren
c382406735 Fix Plex setup race condition v2 (#28943)
* Connect websocket when platforms ready, not when HA is ready

* Use callbacks from platform setup tasks instead

* Convert setup to async

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2019-11-24 19:57:40 -08:00
Franck Nijhof
48c289fad3 Alexa gracefully handle climate devices without presets (#29010) 2019-11-24 19:57:18 -08:00
Michaël Arnauts
647595fd67 Move imports to the top for Tado. (#29016) 2019-11-24 22:47:31 +01:00
springstan
1495df374b Made spotify playlist name validation less strict (#28684) 2019-11-24 20:53:26 +01:00
springstan
ce8e0e5489 Move imports to top for volkszaehler (#29025) 2019-11-24 20:31:15 +01:00
Franck Nijhof
94f8e634b2 Ensure wheel package is present when running Pylint (#29012) 2019-11-24 14:35:30 +01:00
HomeAssistant Azure
7c6b38d308 [ci skip] Translation update 2019-11-24 00:32:21 +00:00
Fabian Affolter
bbca6e3ac2 Upgrade shodan to 1.20.0 (#28983)
* Upgrade shodan to 1.20.0

* Upgrade mutagen to 1.43.0
2019-11-23 23:12:02 +01:00
Fabian Affolter
98eae305e2 Upgrade zeroconf to 0.24.0 (#28986) 2019-11-23 23:11:01 +01:00
Bram Kragten
6ad74fba30 Updated frontend to 20191119.6 (#28996) 2019-11-23 13:12:56 -08:00
Andrey Kupreychik
9fd8ffdc44 Bumped keenetic NDMS2 client version to 0.0.11 (#28990) 2019-11-23 21:22:50 +01:00
Fabian Affolter
2a8e99d799 Upgrade mutagen to 1.43.0 (#28984) 2019-11-23 18:01:27 +01:00
Jesse Hills
ebd38395fb Update pyjuicenet dependency (#28958)
Closes #28926
2019-11-23 16:46:48 +01:00
Fabian Affolter
f1d4a3cd6e Catch Zeroconf exception (#28728)
* Catch Zeroconf exception

* Make it an error
2019-11-23 16:46:06 +01:00
jjlawren
2c00a9ec68 Fix Plex setup race condition v2 (#28943)
* Connect websocket when platforms ready, not when HA is ready

* Use callbacks from platform setup tasks instead

* Convert setup to async

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2019-11-23 09:16:21 -06:00
majuss
614842bcf2 Bumped pypca to 0.0.7 (#28976) 2019-11-23 14:41:52 +01:00
shred86
0a58853689 Fix temp not being reported properly (#28973) 2019-11-23 12:29:54 +01:00
Josef Schlehofer
b4f477f4de Upgrade youtube_dl to 2019.11.22 (#28964) 2019-11-23 11:13:44 +01:00
Tomasz
23737e0225 Rename rest_command request to response, add exc_info for exceptions (#28521)
* rename request to response, isort and black fixes

* Log exception details

* Add status code to success log, reformat log

* new syntax for response

* changed info to debug
2019-11-23 11:02:52 +01:00
cgtobi
0bd01ba495 Fix manual config (#28956) 2019-11-23 11:00:26 +01:00
Chris Mandich
08432c7c09 Add flume support (#27235)
* Add Flume Sensor

Add support for Flume API and sensor

* Add support for choosing timezone

Timezone is now a required option in configuration.yaml

* Add Flume to coveragerc and CODEOWNERS

Add flume to be ommited from testing. Add @ChrisMandich as Flume Code owner

* Revert "Add Flume to coveragerc and CODEOWNERS"

This reverts commit 0b27437a3b.

* Update manifest.json

Added Documentation URL for Flume to HASS.IO

* Update manifest.json

Added missing Newline at EOF.

* Update sensor.py

Update sensor to not required Device ID for configuration. Now loops through all available Type 2 devices and adds them as an entity.

* Update Manifest, CODEOWNERS, and manifest.json

Resolved errors related to code owners and requirements. Using hassfest and gen_requirements_all

* Update sensor.py

Implemented recommendations from @Quentame. Including time zone from Home Assistant, Updated variable names, and Consolidated duplicate functions.

* Implemented suggested changes from @Quentame

This includes: components name, using f-strings instead of concat, snake_case for variables, constants for the addition of future device types, clearer errors, and removed variables no longer in use.

* Update sensor.py

Restored unit_of_measurement. Updated return to "gal".

* Address pylint errors

* Update sensor.py

Include protected attributes in setup_platform.

* Address Pylint errors

homeassistant/components/flume/sensor.py:63:11: W0703: Catching too general exception Exception (broad-except)
homeassistant/components/flume/sensor.py:133:8: R1720: Unnecessary "else" after "raise" (no-else-raise)
homeassistant/components/flume/sensor.py:162:8: R1705: Unnecessary "else" after "return" (no-else-return)
homeassistant/components/flume/sensor.py:236:8: R1720: Unnecessary "else" after "raise" (no-else-raise)

* Update sensor.py

I'm okay with the broad exception clause.
homeassistant/components/flume/sensor.py:65:11: W0703: Catching too general exception Exception (broad-except)

* Update sensor.py

Add more specific exceptions for Try/Except.

* Update Flume Sensory.py

add requirements, exclude from tests, us pyflume pypi package.

* Update sensor.py to support latest pyflume package

* Update manifest

provide better flow of manifest and easier readibility.

* Update manifest.json

Reccomended by @balloob as it is already a core requirement

* Update sensor.py

Add proposed changes from @balloob

* Update requirements_all.txt

pytz is a core dependency, removing flume's requirement for it.

* Update sensor.py

Added @MartinHjelmare recommended changes.

* Update sensor.py

Resolving PyLint error

* Update sensor.py

Remove `KeyError`. Add length check for flume entity list before adding.

* Update sensor.py

* Update pyflume version

* Update imports with isort

* Add line break between standard library and thirdparty imports.

* Remove throttle from sensor.py
2019-11-23 09:55:46 +01:00
HomeAssistant Azure
b4caa4ab82 [ci skip] Translation update 2019-11-23 00:32:17 +00:00
Jonas
829e0a7c42 Add Proxmox VE integration (#27315)
* Added the Proxmox VE integration

* Fixed code as described in PR #27315

* Fixed small linting error

* Fix code as described in PR #27315 code review

* Improve code as described in PR #27315
2019-11-22 23:03:41 +01:00
Santobert
c35f9ee35f Creating a scene by snapshotting entities (#28939)
* Initial commit

* Add tests

* service.yaml

* typo

* snapshooted -> snapshot

* snapshot_entities instead of snapshot

* Edit validator

* Fix tests

* Remove keys()

* Improve coverage

* Activate scenes

* Use pytest.raise

* snapshot -> snapshotted
2019-11-22 13:21:28 -08:00
akasma74
a977f398ae Fix return values of preset_mode(s) properties (#27751)
It is incorrect to return None as a result of proprety call because in such a case state_attr call will return None as well, which means "Unknown attribute".
Instead for preset_mode(s) PRESET_NONE constant should be used for consistency.
2019-11-22 21:27:40 +01:00
Tobias Perschon
d92f48646a Add round to half template method (#28948)
* added round to half method

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* testcase for new round method

Signed-off-by: Tobias Perschon <tobias@perschon.at>
2019-11-22 10:08:41 -08:00
awkwardDuck
6d77c15f28 fix typo for mediumvioletred (#28941) 2019-11-22 15:33:53 +01:00
Pascal Vizeli
051e37eb49 Fix ikea lights on deconz (#28949)
* Fix ikea lights on deconz

* check for None

* Use cleaner code style
2019-11-22 15:32:05 +01:00
kurniawan77
9a23a1c336 Add device trigger support for Aqara WXKG11LM 2016 switch to Deconz (#28946)
https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi-WXKG11LM-2016
2019-11-22 13:54:56 +01:00
HomeAssistant Azure
1968a88336 [ci skip] Translation update 2019-11-22 00:32:10 +00:00
Per Sandström
e3b2a33962 Bump verisure to vsure 1.5.4 and jsonpath 0.82 (#28933) 2019-11-21 22:53:02 +01:00
jjlawren
a62bd97fa5 Delay Plex websocket connection to avoid race (#28934) 2019-11-21 12:39:24 -08:00
Bram Kragten
c015f94fa2 Updated frontend to 20191119.5 (#28925)
* Updated frontend to 20191119.4

* Updated frontend to 20191119.5
2019-11-21 19:05:26 +01:00
cgtobi
86e581b83d Fix missing Netatmo sensors (#28899)
* Update pyatmo to 3.0.1

* Improve sensor name

* Fix missing sensors

* Update pyatmo module

* Update pyatmo to 3.1.0

* Update requirements

* Fix method call
2019-11-21 17:35:03 +01:00
SNoof85
c7c7a9ad06 Update __init__.py (#28911) 2019-11-20 22:31:39 -08:00
HomeAssistant Azure
0e14c3f92a [ci skip] Translation update 2019-11-21 00:32:11 +00:00
Kevin Eifinger
9f181ac92e bump herepy to 0.6.3.3 (#28907)
* bump herepy to 0.6.3.3

* run gen_requirements_all
2019-11-20 22:37:59 +01:00
Bram Kragten
ae3cf72fb2 Fix Almond onboarding url when using cloud (#28908) 2019-11-20 13:03:01 -08:00
Raman Gupta
1c630738f7 update services.yaml for keyboard component (#28889) 2019-11-20 21:40:00 +01:00
Raman Gupta
288ae8b1e7 Update services.yaml for cloudflare component (#28888)
* update services.yaml for cloudflare component

* Made description more clear
2019-11-20 15:45:11 +01:00
Alexei Chetroi
4ba2bd232c Command arguments for issue_zigbee_cluster_commands. (#28885) 2019-11-20 08:34:06 -05:00
Raman Gupta
b267d54db3 Update services.yaml for Roku component (#28887)
* update services.yaml for roku component

* add new line
2019-11-20 13:14:13 +01:00
Bram Kragten
d9f146d076 Updated frontend to 20191119.2 (#28896) 2019-11-20 12:30:32 +01:00
foxy82
9fd6afc5fb Allow connection to rfxtrx using tcp (#28297) 2019-11-19 21:11:17 -05:00
Franck Nijhof
6db4e975e3 Bump pytest to 5.3.0 (#28883) 2019-11-19 20:51:25 -05:00
Abílio Costa
e60ae77f1b Add ZHA service to issue group commands (#28823)
* add service to ZHA to issue group commands
* fix args
2019-11-19 19:49:09 -05:00
HomeAssistant Azure
6b62328c0f [ci skip] Translation update 2019-11-20 00:32:09 +00:00
Santobert
8e7a9521dc Fix setting colors while reproducing a lights state (#28871)
* Fix setting colors while reproducing state

* Reorder list
2019-11-19 16:16:59 -06:00
Bram Kragten
b92b6c40b7 Updated frontend to 20191119.1 (#28881) 2019-11-19 16:16:43 -06:00
Michael Hansen
c2161b1f5a Add HTTP view to conversation to handle intents via JSON POST (#28818) 2019-11-19 13:47:03 -06:00
Rohan Kapoor
cd8c281cb6 Add @rohankapoorcom to CODEOWNERS for speedtestdotnet and fastdotcom (#28879) 2019-11-19 13:43:21 -06:00
Paulus Schoutsen
94675ca5a7 Mark entity abc (#28869)
* Mark entity abc

* Use abstractmethod in climate

* Lint
2019-11-19 13:42:09 -06:00
Franck Nijhof
21157f9dac Downgrade duplicate YAML key log to warning (#28851) 2019-11-19 13:09:23 -06:00
Franck Nijhof
9324845aaa Move imports to top for serial_pm (#28861) 2019-11-19 13:07:29 -06:00
Franck Nijhof
9002955787 Move import to top for aftership (#28860) 2019-11-19 13:07:17 -06:00
Franck Nijhof
2d4b038b48 Move import to top for alarmdecoder (#28862) 2019-11-19 13:06:56 -06:00
Marius
5203c72fca Add state dependent icons to moon sensor (#28743)
* have sensor.moon use state dependent icons

Material design icons have icons for all sensor.states, let's use these natively in the component.
Based on the Season icons, tried to change accordingly.

* Update sensor.py

added state constants

* Update sensor.py

fixed missing mdi:

* order of constants. moon icons and use self.state

change order of constants to alphabetical, changed order in Moon_icons to alphabetical, used self.state for icon lookup

* replace the strings

 replace the strings for self.state with the constants

* removed quotes

* removed spaces, empty line

* local Black

* Sort imports and move import to file header


Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2019-11-19 19:10:15 +01:00
Franck Nijhof
5fcfdee6b5 Fix documentation URL in failed platform config check (#28814)
* Fix documentation URL in failed platform config check

* Replace pop from list by access using negative index

* Use of split instead of rsplit
2019-11-19 18:33:09 +01:00
springstan
e915dd0d95 Pulseaudio: Changed default port from 4712 to 4713 (#28857) 2019-11-19 16:28:12 +01:00
ktnrg45
b83f92e4a5 Bump pyps4-2ndscreen to 1.0.3 (#28874) 2019-11-19 15:21:46 +01:00
Pascal Vizeli
a4ed1d69b8 Add init for run inside devcontainer 2019-11-19 13:53:12 +00:00
Bram Kragten
1f4296f688 Updated frontend to 20191119.0 (#28875) 2019-11-19 14:48:51 +01:00
Steven Impens
475c8ebae2 Add component VersaSense (#24619)
* Add component VersaSense

* Updates based on review

* Changes based on review

* Fixed whitespace

* Fixed lines too long

* Fixed lines too long

* Formatted using black

* Added available property

* Set unavailable property appropriately

* Conversion to f-strings

* Load platform only once per platform

* Fixed duplicate identifiers across multiple devices

* Single call to async_add_entities during setup

* Removed unnecessary async/await syntax

* Added constants for key-value pairs

* Removed async/await syntax

* Added breaks in measurement check

* Added guard clause for discovery_info
2019-11-19 14:05:23 +01:00
Malte Franken
4e9e9efa43 GeoNet NZ Volcanic Alert Level sensor (#26901)
* first version of new integration

* moved icon to shared consts

* added unit tests

* transformed from geolocation to sensor integration

* alert level is now the state of the sensor

* adopted unit tests

* fixed comment

* keep all sensors registered even if the feed update fails intermittently

* bumped version of upstream library

* bumped version of integration library

* regenerated requirements

* bumped version of integration library

* bumped version of integration library

* fixed generated file

* removed commented out code

* regenerated config flow file

* update to latest integration library version

* simplified code

* removed debug log statement

* simplified code structure

* defined constant

* use core interfaces

* moved test and fixture

* sorted imports

* simplified patching

* moved fixture to central config file
2019-11-19 14:00:59 +01:00
HomeAssistant Azure
8439e597ce [ci skip] Translation update 2019-11-19 00:32:19 +00:00
Andi
61bb24c423 Fix Synology camera whitelist (#28822)
* Fix Synology camera whitelist

If whitelist config is set, not camera is added to HA at all.

* Fix Synology Camera whitelist

Fix typo in config key.

* Update camera.py

Access config dict the voluptuous way
2019-11-18 17:03:10 +01:00
Evgeny
1a46294e6d Update roomba integration (#28560)
* Updated iRobot integration

* added custom delay for periodic mode

* new version of roombapy
2019-11-18 16:59:07 +01:00
Quentame
eb23846cfe Move imports in owntracks component (#27780)
* Move imports in owntracks component

* Fix nacl import

* Fix nacl import 2

* Fix nacl import 3

* Add helper.supports_encryption tests

* Fix tests helper 1

* Fix tests 2

* Add not_supports_encryption + get_cipher_error tests

* Code cov

* Fix nacl_not_imported test
2019-11-18 16:47:30 +01:00
Bram Kragten
f6b48dec94 Updated frontend to 20191118.0 (#28852) 2019-11-18 15:40:26 +01:00
Kevin McCormack
a4ae9a94ee Update Vivotek camera integration (#28841)
- Add optional security_level config
- Bump libpyvivotek to 0.3.1
2019-11-18 10:01:36 +01:00
Paul Romkes
5731f528d2 Make intents end Snips session without speech (#28820)
* intents should also end session without speech

* Move endSession message to try block

* Minor improvement on endSession response
2019-11-18 09:13:22 +01:00
cgtobi
90c7d0e56a Update pyatmo to 3.0.1 (#28829) 2019-11-18 09:10:59 +01:00
Ville Skyttä
d4c80f160c Add bandit, use to catch known vulnerable XML parsing (#28341)
* Add bandit to pre-commit and CI, use to catch known vulnerable XML parsing

* Use defusedxml instead of direct xml.etree to parse XML

* Move config to tests/bandit.yaml
2019-11-18 09:10:15 +01:00
HomeAssistant Azure
aef808d2bf [ci skip] Translation update 2019-11-18 00:32:22 +00:00
Michaël Arnauts
3d5b007c6b Implement more Comfoconnect sensors (#28817)
* Rework Comfoconnect sensor platform

* Sort ATTRS and fix icon

* Add unique_id to fan

* Use a different signal per sensor type

* Add more logging

* Swap to be sure.

* Remove -fan suffix from unique_id
2019-11-18 00:39:49 +01:00
Guillermo Ruffino
0c48b8ec52 Esphome climate features (#28786)
* add esphome climate fan

* adds back compatibility support

* fixes, add swing mode

* revert client config

* sort import

* rebase
2019-11-17 23:14:19 +01:00
Fabian Affolter
101ab5c3fa Align naming (#28830)
* Align naming

* Update tests
2019-11-17 15:53:34 +01:00
Jay Newstrom
cb63a9d7e1 Add broadcast address for WOL and samsungtv (#28819)
* Add broadcast address for WOL and samsungtv

* Fix style

* Fix tests, and add new test for new functionality

* Fix code style
2019-11-17 13:17:22 +01:00
Jordan Speicher
f25a3cbfcf Add broadcast_address for wake-on-lan (#28793) 2019-11-17 12:52:33 +01:00
Jeff Irion
c7f684d3f4 Bump androidtv to 0.0.34 (#28816)
* Bump androidtv to 0.0.33; add pure-python-adb requirement

* python -m script.gen_requirements_all

* Avoid redundant 'available' check

* Bump androidtv to 0.0.34

* Update docstrings for the decorator functions
2019-11-17 12:47:14 +01:00
Jackie Yang
0a9ac7e655 Fix miio air quality sensor (#28828)
Fix https://github.com/home-assistant/home-assistant/issues/28827
2019-11-17 12:18:53 +01:00
HomeAssistant Azure
d1241147c8 [ci skip] Translation update 2019-11-17 00:32:32 +00:00
Michaël Arnauts
d6e99db38e Fix Comfoconnect errors during startup (#28802)
* Add callback registrations to async_added_to_hass

* Fix CODEOWNERS

* Fix code formatting

* Requested changes.

* Don't pass unused hass and fix string formatting

* Fix import order.
2019-11-16 15:05:17 +01:00
Santobert
0996b717ce Improve coverage of input_datetime/reproduce_state (#28272)
* Improve coverage of input_datetime/reproduce_state

* Improve tests
2019-11-16 13:27:54 +01:00
Fabian Affolter
fbe3d8dade Upgrade shodan to 1.19.1 (#28809) 2019-11-16 11:58:15 +01:00
Fabian Affolter
2779d4f66e Upgrade alpha_vantage to 2.1.2 (#28810) 2019-11-16 11:58:04 +01:00
michaeldavie
d736c5f648 Truncate sensor state values (#28788) 2019-11-16 10:56:54 +01:00
Peter Nijssen
87b13ee732 Fix broken postnl sensor (#28794)
* fix broken postnl sensor

* make sure shipment list is not growing indefinitely
2019-11-16 10:37:58 +01:00
bouni
afbd966ba6 Move imports in braviatv component (#27855)
* Move imports in braviatv component

* import braviarc directly

* fixed import

* directly import BraviaRC
2019-11-16 10:25:25 +01:00
Tommy Larsson
8a28d5fbee Add ombi password authentication option (#28742)
* Add password authentication option

* Add vol.Exclusive for auth config params
2019-11-16 10:23:05 +01:00
Ville Skyttä
d88ca0f5cb Lint exclusions (#28655)
* Remove malformed pylint disable markers

* Remove some unused imports

* Remove some unneeded lint exclusions

* Remove more unneeded lint exclusions

* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Ville Skyttä
2aee366a1f Upgrade pylint, tweak config (#28798)
* Upgrade pylint to 2.4.4 and astroid to 2.3.3

https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-4
https://github.com/PyCQA/astroid/blob/astroid-2.3.3/ChangeLog

* Disable pylint score and persistence

We don't use scoring, and it can be supposedly incorrect (so worse
than ignorable) when using more than one parallel job.
2019-11-16 09:59:26 +01:00
John Mihalic
16f8ae1535 Bump pyHik library to 0.2.5 for id, tamper fixes (#28807) 2019-11-16 09:57:04 +01:00
Fabian Affolter
d8ca2e9d71 Upgrade sqlalchemy to 1.3.11 (#28721) 2019-11-16 09:56:26 +01:00
Morten Trab
cd335bd434 Fix Repetier integration entity indexing (#28766)
* Fixed multi extruder/beds/chambers index issue, #28130

* Switched from .format to f style name formatting

* Fixed incorrect indexing

* Removed VS files

* Removed not need temp_id subtraction

* Removed VS files

* Fixed access mode

* Fixed access mode

* Fixing access mode - again
2019-11-16 09:45:43 +01:00
Bram Kragten
5e20817ea4 Updated frontend to 20191115.0 (#28797) 2019-11-16 07:22:06 +01:00
HomeAssistant Azure
adb3997547 [ci skip] Translation update 2019-11-16 00:32:13 +00:00
Davide Varricchio
d796053d9f Add support for Hisense AEH-W4A1 wifi module (AC remote control) (#28641)
* First commit

* First working release, but there's a lot to do

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* First commit

* First working release, but there's a lot to do

* new file:   requirements_test_all.txt

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* new file:   requirements_test_all.txt

* Fighting with tox

* vs Tox round 2

* Isort and updated requirements_test_all.txt

* Fighting with lint

* Implemented available state

* Changed exception type after Travis-ci pylint fails

* Support entry in configuration.yaml

* Removed commented code

* Switched to async

* Minor changes

* Updated library and fixed pylint errors

* Code optimization

* Implemented static ip addresses in configuration.yaml

* Reverted to existing constant

* Corrected pylint wrong-import-order

* Recovery from nuke event (messing all while rebase)

* Resolved Ci error

* Changes for PR

* Corrected temp scale for frontend

* Added test for config entry from configuration.yaml

* Updated dependency

* Check on manual config

* Imported custom exceptions and modified import config

* Optimized

* Change based on PR revision

* Added logging for failure event on manual config

* Tests added but to be corrected

* Edited tests

* Tests updated to ensure no I/O

* Working on tests

* Cheanges based on revision for PR

* Setting librey exception as direct side_effect in test

* Final changes for PR

* Redundand on command solved

* Improved AC logic
2019-11-15 21:22:24 +01:00
Tyler Page
35000848ed Fix changing venstar operation_mode (#28754) 2019-11-15 12:49:56 +01:00
LeoCal
4c690eace8 Fix Swisscom empty response received (#28782) 2019-11-15 10:52:15 +01:00
SukramJ
60e7440ec1 Fix HomematicIP Cloud Alarm Control Panel support for basic mode (#28778) 2019-11-15 09:55:40 +01:00
Paolo Tuninetto
b4ccc0202a Change keys for Samsung TV next and prev track command (#28213) 2019-11-15 09:53:16 +01:00
fredericvl
5e973dd017 Change unique id for SAJ sensor based on device SN (#28663)
* Change unique id for SAJ sensor based on device SN

* Add SAJ device name + sn to state attributes

* Revert device state attributes (after review)
2019-11-15 09:21:46 +01:00
Lado Kumsiashvili
bc14e93ae3 bump home mitemp_bt to 0.0.3. It has an important bugfix for reading … (#28765)
* bump home mitemp_bt to 0.0.3. It has an important bugfix for reading temperatures under 10 grade

* adjust the version number for mitemp_bt up to 0.0.3
2019-11-15 08:56:32 +01:00
Alan Tse
2aad150419 Convert Tesla to Async (#28748)
* build: bump teslajsonpy to 0.2.0

* feat: add async

* perf: convert unnecessary async calls to sync

* fix: force real login

* Revert change to HVAC_MODE_HEAT

* Remove charging rate sensor

* Remove tests

* Remove tests

* Address requested changes

* Add missing sensors

* Move update to async_setup_scanner

* Align wtih prior update behavior
2019-11-15 05:15:58 +01:00
cgtobi
806b96ef73 Bump pytest to 5.2.3 (#28785) 2019-11-15 05:14:46 +01:00
HomeAssistant Azure
f170ac48d2 [ci skip] Translation update 2019-11-15 00:32:15 +00:00
Brendon Baumgartner
0467ddb60c Fix amazon dependency conflicts (#28217)
* fix amazon dependency conflicts

* bump boto3 for route53
2019-11-14 21:07:43 +01:00
Bram Kragten
b2870b6833 DECONZ - Add device trigger support for aqara 86sw2 switches to Deconz (#28767)
* Add device trigger support for aqara 86sw2 switched to Deconz

* Update device_trigger.py

* Update naming
2019-11-14 19:15:08 +01:00
Paulus Schoutsen
2cf86a3554 Fix account link version check (#28770) 2019-11-14 14:34:13 +01:00
springstan
ea0bae2d1b Added plus sign to safe characters in urllib.parse.quote method (#28763) 2019-11-14 14:13:16 +01:00
Bram Kragten
962c47b666 Updated frontend to 20191114.0 (#28768) 2019-11-14 14:12:46 +01:00
Fabian Affolter
c6d6bbf3e0 Upgrade ephem to 3.7.7.0 (#28715) 2019-11-14 12:01:53 +01:00
HomeAssistant Azure
08d662c0a5 [ci skip] Translation update 2019-11-14 00:32:16 +00:00
Aaron Bach
3f2c344e4f Add small speed improvement when unloading RainMachine (#28759) 2019-11-13 14:27:42 -07:00
Aaron Bach
fae8cd48c4 Add small speed improvement when unloading OpenUV (#28758) 2019-11-13 14:27:15 -07:00
Aaron Bach
31131e4ac6 Add small speed improvement when unloading Notion (#28757) 2019-11-13 14:26:52 -07:00
Aaron Bach
c27b94c0e5 Add small speed improvement when unloading Ambient PWS (#28756) 2019-11-13 14:25:49 -07:00
Aaron Bach
8789da36be Add support for SimpliSafe locks (#28672)
* Start

* Lock init

* More stubbing

* Final pieces for PR

* Fixed incorrect property access

* Updaed .coveragerc

* Ensure we can handle unknown states

* Account for lock's offline property

* Account for device online

* Unload components concurrently

* Handle unknown states more gracefully
2019-11-13 20:48:08 +01:00
Bram Kragten
15e6278a2e Add config entry and device support to Demo (#28702)
* Add config entry and device support to Demo

* Some more devices

* Fix tests using demo

* Review comments

* Update config_flow.py

* Revert

* Disable pylint
2019-11-13 16:37:31 +01:00
mvn23
15ce738357 Bump pyotgw to 0.5b1 (#28751) 2019-11-13 09:32:22 -05:00
David F. Mulcahey
376e3def1d Bump ZHA quirks to 0.0.28 (#28750) 2019-11-13 09:25:45 -05:00
Thomas Germain
ec45e72bea Add verisure ethernet status (#28656) 2019-11-13 14:12:36 +01:00
1281 changed files with 18628 additions and 6743 deletions

View File

@@ -62,6 +62,7 @@ omit =
homeassistant/components/asterisk_cdr/mailbox.py
homeassistant/components/asterisk_mbox/*
homeassistant/components/asuswrt/device_tracker.py
homeassistant/components/aten_pe/*
homeassistant/components/atome/*
homeassistant/components/august/*
homeassistant/components/aurora_abb_powerone/sensor.py
@@ -83,9 +84,9 @@ omit =
homeassistant/components/blinkt/light.py
homeassistant/components/blockchain/sensor.py
homeassistant/components/bloomsky/*
homeassistant/components/bluesound/media_player.py
homeassistant/components/bluesound/*
homeassistant/components/bluetooth_le_tracker/device_tracker.py
homeassistant/components/bluetooth_tracker/device_tracker.py
homeassistant/components/bluetooth_tracker/*
homeassistant/components/bme280/sensor.py
homeassistant/components/bme680/sensor.py
homeassistant/components/bmw_connected_drive/*
@@ -93,6 +94,7 @@ omit =
homeassistant/components/bom/sensor.py
homeassistant/components/bom/weather.py
homeassistant/components/braviatv/media_player.py
homeassistant/components/broadlink/remote.py
homeassistant/components/broadlink/sensor.py
homeassistant/components/broadlink/switch.py
homeassistant/components/brottsplatskartan/sensor.py
@@ -109,7 +111,7 @@ omit =
homeassistant/components/cast/*
homeassistant/components/cert_expiry/sensor.py
homeassistant/components/cert_expiry/helper.py
homeassistant/components/channels/media_player.py
homeassistant/components/channels/*
homeassistant/components/cisco_ios/device_tracker.py
homeassistant/components/cisco_mobility_express/device_tracker.py
homeassistant/components/cisco_webex_teams/notify.py
@@ -163,6 +165,7 @@ omit =
homeassistant/components/doorbird/*
homeassistant/components/dovado/*
homeassistant/components/downloader/*
homeassistant/components/dsmr_reader/*
homeassistant/components/dte_energy_bridge/sensor.py
homeassistant/components/dublin_bus_transport/sensor.py
homeassistant/components/duke_energy/sensor.py
@@ -178,7 +181,7 @@ omit =
homeassistant/components/ecobee/notify.py
homeassistant/components/ecobee/sensor.py
homeassistant/components/ecobee/weather.py
homeassistant/components/econet/water_heater.py
homeassistant/components/econet/*
homeassistant/components/ecovacs/*
homeassistant/components/eddystone_temperature/sensor.py
homeassistant/components/edimax/switch.py
@@ -199,6 +202,7 @@ omit =
homeassistant/components/envirophat/sensor.py
homeassistant/components/envisalink/*
homeassistant/components/ephember/climate.py
homeassistant/components/epson/const.py
homeassistant/components/epson/media_player.py
homeassistant/components/epsonworkforce/sensor.py
homeassistant/components/eq3btsmart/climate.py
@@ -229,6 +233,7 @@ omit =
homeassistant/components/flexit/climate.py
homeassistant/components/flic/binary_sensor.py
homeassistant/components/flock/notify.py
homeassistant/components/flume/*
homeassistant/components/flunearyou/sensor.py
homeassistant/components/flux_led/light.py
homeassistant/components/folder/sensor.py
@@ -282,12 +287,13 @@ omit =
homeassistant/components/hangouts/hangouts_bot.py
homeassistant/components/hangouts/hangups_utils.py
homeassistant/components/harman_kardon_avr/media_player.py
homeassistant/components/harmony/remote.py
homeassistant/components/harmony/*
homeassistant/components/haveibeenpwned/sensor.py
homeassistant/components/hdmi_cec/*
homeassistant/components/heatmiser/climate.py
homeassistant/components/hikvision/binary_sensor.py
homeassistant/components/hikvisioncam/switch.py
homeassistant/components/hisense_aehw4a1/*
homeassistant/components/hitron_coda/device_tracker.py
homeassistant/components/hive/*
homeassistant/components/hlk_sw16/*
@@ -313,7 +319,7 @@ omit =
homeassistant/components/iaqualink/light.py
homeassistant/components/iaqualink/sensor.py
homeassistant/components/iaqualink/switch.py
homeassistant/components/icloud/device_tracker.py
homeassistant/components/icloud/*
homeassistant/components/izone/climate.py
homeassistant/components/izone/discovery.py
homeassistant/components/izone/__init__.py
@@ -409,6 +415,7 @@ omit =
homeassistant/components/miflora/sensor.py
homeassistant/components/mikrotik/*
homeassistant/components/mill/climate.py
homeassistant/components/mill/const.py
homeassistant/components/minio/*
homeassistant/components/mitemp_bt/sensor.py
homeassistant/components/mjpeg/camera.py
@@ -525,6 +532,7 @@ omit =
homeassistant/components/proliphix/climate.py
homeassistant/components/prometheus/*
homeassistant/components/prowl/notify.py
homeassistant/components/proxmoxve/*
homeassistant/components/proxy/camera.py
homeassistant/components/ptvsd/*
homeassistant/components/pulseaudio_loopback/switch.py
@@ -605,6 +613,7 @@ omit =
homeassistant/components/simplepush/notify.py
homeassistant/components/simplisafe/__init__.py
homeassistant/components/simplisafe/alarm_control_panel.py
homeassistant/components/simplisafe/lock.py
homeassistant/components/simulated/sensor.py
homeassistant/components/sisyphus/*
homeassistant/components/sky_hub/device_tracker.py
@@ -632,7 +641,7 @@ omit =
homeassistant/components/somfy/*
homeassistant/components/somfy_mylink/*
homeassistant/components/sonarr/sensor.py
homeassistant/components/songpal/media_player.py
homeassistant/components/songpal/*
homeassistant/components/sonos/*
homeassistant/components/sony_projector/switch.py
homeassistant/components/spc/*
@@ -640,7 +649,8 @@ omit =
homeassistant/components/spider/*
homeassistant/components/spotcrime/sensor.py
homeassistant/components/spotify/media_player.py
homeassistant/components/squeezebox/media_player.py
homeassistant/components/squeezebox/*
homeassistant/components/starline/*
homeassistant/components/starlingbank/sensor.py
homeassistant/components/steam_online/sensor.py
homeassistant/components/stiebel_eltron/*
@@ -686,6 +696,7 @@ omit =
homeassistant/components/tile/device_tracker.py
homeassistant/components/time_date/sensor.py
homeassistant/components/todoist/calendar.py
homeassistant/components/todoist/const.py
homeassistant/components/tof/sensor.py
homeassistant/components/tomato/device_tracker.py
homeassistant/components/toon/*
@@ -740,6 +751,7 @@ omit =
homeassistant/components/venstar/climate.py
homeassistant/components/vera/*
homeassistant/components/verisure/*
homeassistant/components/versasense/*
homeassistant/components/vesync/__init__.py
homeassistant/components/vesync/common.py
homeassistant/components/vesync/const.py
@@ -761,7 +773,6 @@ omit =
homeassistant/components/waze_travel_time/sensor.py
homeassistant/components/webostv/*
homeassistant/components/wemo/*
homeassistant/components/wemo/fan.py
homeassistant/components/whois/sensor.py
homeassistant/components/wink/*
homeassistant/components/wirelesstag/*
@@ -781,7 +792,6 @@ omit =
homeassistant/components/xmpp/notify.py
homeassistant/components/xs1/*
homeassistant/components/yale_smart_alarm/alarm_control_panel.py
homeassistant/components/yamaha/media_player.py
homeassistant/components/yamaha_musiccast/media_player.py
homeassistant/components/yandex_transport/*
homeassistant/components/yeelight/*

View File

@@ -18,7 +18,7 @@ repos:
- --safe
- --quiet
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.7.9
hooks:
- id: flake8
@@ -26,6 +26,15 @@ repos:
- flake8-docstrings==1.5.0
- pydocstyle==4.0.1
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$
# Using a local "system" mypy instead of the mypy hook, because its
# results depend on what is installed. And the mypy hook runs in a
# virtualenv of its own, meaning we'd need to install and maintain

View File

@@ -22,3 +22,12 @@ repos:
- flake8-docstrings==1.5.0
- pydocstyle==4.0.1
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$

View File

@@ -17,7 +17,6 @@ homeassistant/components/abode/* @shred86
homeassistant/components/adguard/* @frenck
homeassistant/components/airly/* @bieniu
homeassistant/components/airvisual/* @bachya
homeassistant/components/alarm_control_panel/* @colinodell
homeassistant/components/alexa/* @home-assistant/cloud @ochlocracy
homeassistant/components/almond/* @gcampax @balloob
homeassistant/components/alpha_vantage/* @fabaff
@@ -33,6 +32,7 @@ homeassistant/components/arcam_fmj/* @elupus
homeassistant/components/arduino/* @fabaff
homeassistant/components/arest/* @fabaff
homeassistant/components/asuswrt/* @kennedyshead
homeassistant/components/aten_pe/* @mtdcr
homeassistant/components/atome/* @baqs
homeassistant/components/aurora_abb_powerone/* @davet2001
homeassistant/components/auth/* @home-assistant/core
@@ -50,7 +50,7 @@ homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blink/* @fronzbot
homeassistant/components/bmw_connected_drive/* @gerard33
homeassistant/components/braviatv/* @robbiet480
homeassistant/components/broadlink/* @danielhiversen
homeassistant/components/broadlink/* @danielhiversen @felipediel
homeassistant/components/brunt/* @eavanvalkenburg
homeassistant/components/bt_smarthub/* @jxwolstenholme
homeassistant/components/buienradar/* @mjj4791 @ties
@@ -79,6 +79,7 @@ homeassistant/components/device_automation/* @home-assistant/core
homeassistant/components/digital_ocean/* @fabaff
homeassistant/components/discogs/* @thibmaek
homeassistant/components/doorbird/* @oblogic7
homeassistant/components/dsmr_reader/* @depl0y
homeassistant/components/dweet/* @fabaff
homeassistant/components/ecobee/* @marthoc
homeassistant/components/ecovacs/* @OverloadUT
@@ -86,8 +87,10 @@ homeassistant/components/egardia/* @jeroenterheerdt
homeassistant/components/eight_sleep/* @mezz64
homeassistant/components/elv/* @majuss
homeassistant/components/emby/* @mezz64
homeassistant/components/emulated_hue/* @NobleKangaroo
homeassistant/components/enigma2/* @fbradyirl
homeassistant/components/enocean/* @bdurrer
homeassistant/components/entur_public_transport/* @hfurubotten
homeassistant/components/environment_canada/* @michaeldavie
homeassistant/components/ephember/* @ttroy50
homeassistant/components/epsonworkforce/* @ThaStealth
@@ -95,11 +98,13 @@ homeassistant/components/eq3btsmart/* @rytilahti
homeassistant/components/esphome/* @OttoWinter
homeassistant/components/essent/* @TheLastProject
homeassistant/components/evohome/* @zxdavb
homeassistant/components/fastdotcom/* @rohankapoorcom
homeassistant/components/file/* @fabaff
homeassistant/components/filter/* @dgomes
homeassistant/components/fitbit/* @robbiet480
homeassistant/components/fixer/* @fabaff
homeassistant/components/flock/* @fabaff
homeassistant/components/flume/* @ChrisMandich
homeassistant/components/flunearyou/* @bachya
homeassistant/components/fortigate/* @kifeo
homeassistant/components/fortios/* @kimfrellsen
@@ -112,6 +117,7 @@ homeassistant/components/gearbest/* @HerrHofrat
homeassistant/components/geniushub/* @zxdavb
homeassistant/components/geo_rss_events/* @exxamalte
homeassistant/components/geonetnz_quakes/* @exxamalte
homeassistant/components/geonetnz_volcano/* @exxamalte
homeassistant/components/gitter/* @fabaff
homeassistant/components/glances/* @fabaff @engrbm87
homeassistant/components/gntp/* @robbiet480
@@ -125,10 +131,12 @@ homeassistant/components/growatt_server/* @indykoning
homeassistant/components/gtfs/* @robbiet480
homeassistant/components/harmony/* @ehendrix23
homeassistant/components/hassio/* @home-assistant/hass-io
homeassistant/components/heatmiser/* @andylockran
homeassistant/components/heos/* @andrewsayre
homeassistant/components/here_travel_time/* @eifinger
homeassistant/components/hikvision/* @mezz64
homeassistant/components/hikvisioncam/* @fbradyirl
homeassistant/components/hisense_aehw4a1/* @bannhead
homeassistant/components/history/* @home-assistant/core
homeassistant/components/history_graph/* @andrey-git
homeassistant/components/hive/* @Rendili @KJonline
@@ -152,7 +160,9 @@ homeassistant/components/input_number/* @home-assistant/core
homeassistant/components/input_select/* @home-assistant/core
homeassistant/components/input_text/* @home-assistant/core
homeassistant/components/integration/* @dgomes
homeassistant/components/intent/* @home-assistant/core
homeassistant/components/ios/* @robbiet480
homeassistant/components/iperf3/* @rohankapoorcom
homeassistant/components/ipma/* @dgomes
homeassistant/components/iqvia/* @bachya
homeassistant/components/irish_rail_transport/* @ttroy50
@@ -178,6 +188,7 @@ homeassistant/components/logi_circle/* @evanjd
homeassistant/components/lovelace/* @home-assistant/frontend
homeassistant/components/luci/* @fbradyirl @mzdrale
homeassistant/components/luftdaten/* @fabaff
homeassistant/components/lupusec/* @majuss
homeassistant/components/lutron/* @JonGilmore
homeassistant/components/mastodon/* @fabaff
homeassistant/components/matrix/* @tinloaf
@@ -192,6 +203,7 @@ homeassistant/components/mill/* @danielhiversen
homeassistant/components/min_max/* @fabaff
homeassistant/components/minio/* @tkislan
homeassistant/components/mobile_app/* @robbiet480
homeassistant/components/modbus/* @adamchengtkc
homeassistant/components/monoprice/* @etsinko
homeassistant/components/moon/* @fabaff
homeassistant/components/mpd/* @fabaff
@@ -205,6 +217,7 @@ homeassistant/components/ness_alarm/* @nickw444
homeassistant/components/nest/* @awarecan
homeassistant/components/netdata/* @fabaff
homeassistant/components/nextbus/* @vividboarder
homeassistant/components/nilu/* @hfurubotten
homeassistant/components/nissan_leaf/* @filcole
homeassistant/components/nmbs/* @thibmaek
homeassistant/components/no_ip/* @fabaff
@@ -236,6 +249,7 @@ homeassistant/components/plant/* @ChristianKuehnel
homeassistant/components/plex/* @jjlawren
homeassistant/components/plugwise/* @laetificat @CoMPaTech @bouwew
homeassistant/components/point/* @fredrike
homeassistant/components/proxmoxve/* @k4ds3
homeassistant/components/ps4/* @ktnrg45
homeassistant/components/ptvsd/* @swamp-ig
homeassistant/components/push/* @dgomes
@@ -280,8 +294,10 @@ homeassistant/components/soma/* @ratsept
homeassistant/components/somfy/* @tetienne
homeassistant/components/songpal/* @rytilahti
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/speedtestdotnet/* @rohankapoorcom
homeassistant/components/spider/* @peternijssen
homeassistant/components/sql/* @dgomes
homeassistant/components/starline/* @anonym-tsk
homeassistant/components/statistics/* @fabaff
homeassistant/components/stiebel_eltron/* @fucm
homeassistant/components/stream/* @hunterjm
@@ -297,6 +313,7 @@ homeassistant/components/switchmate/* @danielhiversen
homeassistant/components/syncthru/* @nielstron
homeassistant/components/synology_srm/* @aerialls
homeassistant/components/syslog/* @fabaff
homeassistant/components/tado/* @michaelarnauts
homeassistant/components/tahoma/* @philklei
homeassistant/components/tautulli/* @ludeeus
homeassistant/components/tellduslive/* @fredrike
@@ -330,6 +347,7 @@ homeassistant/components/usgs_earthquakes_feed/* @exxamalte
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/velbus/* @cereal2nd
homeassistant/components/velux/* @Julius2342
homeassistant/components/versasense/* @flamm3blemuff1n
homeassistant/components/version/* @fabaff
homeassistant/components/vesync/* @markperdue @webdjoe
homeassistant/components/vicare/* @oischinger

View File

@@ -50,6 +50,10 @@ stages:
. venv/bin/activate
pre-commit run flake8 --all-files
displayName: 'Run flake8'
- script: |
. venv/bin/activate
pre-commit run bandit --all-files
displayName: 'Run bandit'
- job: 'Validate'
pool:
vmImage: 'ubuntu-latest'
@@ -158,7 +162,7 @@ stages:
python -m venv venv
. venv/bin/activate
pip install -U pip setuptools
pip install -U pip setuptools wheel
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
- script: |

View File

@@ -15,12 +15,10 @@ if TYPE_CHECKING:
def set_loop() -> None:
"""Attempt to use uvloop."""
"""Attempt to use different loop."""
import asyncio
from asyncio.events import BaseDefaultEventLoopPolicy
policy = None
if sys.platform == "win32":
if hasattr(asyncio, "WindowsProactorEventLoopPolicy"):
# pylint: disable=no-member
@@ -33,15 +31,7 @@ def set_loop() -> None:
_loop_factory = asyncio.ProactorEventLoop
policy = ProactorPolicy()
else:
try:
import uvloop
except ImportError:
pass
else:
policy = uvloop.EventLoopPolicy()
if policy is not None:
asyncio.set_event_loop_policy(policy)
@@ -272,7 +262,6 @@ def cmdline() -> List[str]:
async def setup_and_run_hass(config_dir: str, args: argparse.Namespace) -> int:
"""Set up HASS and run."""
# pylint: disable=redefined-outer-name
from homeassistant import bootstrap, core
hass = core.HomeAssistant()

View File

@@ -42,7 +42,7 @@ class MultiFactorAuthModule:
self.config = config
@property
def id(self) -> str: # pylint: disable=invalid-name
def id(self) -> str:
"""Return id of the auth module.
Default is same as type

View File

@@ -1,18 +1,6 @@
"""Permissions for Home Assistant."""
import logging
from typing import ( # noqa: F401
cast,
Any,
Callable,
Dict,
List,
Mapping,
Optional,
Set,
Tuple,
Union,
TYPE_CHECKING,
)
from typing import Any, Callable, Optional
import voluptuous as vol
@@ -20,7 +8,7 @@ from .const import CAT_ENTITIES
from .models import PermissionLookup
from .types import PolicyType
from .entities import ENTITY_POLICY_SCHEMA, compile_entities
from .merge import merge_policies # noqa
from .merge import merge_policies # noqa: F401
from .util import test_all
@@ -70,15 +58,12 @@ class PolicyPermissions(AbstractPermissions):
def __eq__(self, other: Any) -> bool:
"""Equals check."""
# pylint: disable=protected-access
return isinstance(other, PolicyPermissions) and other._policy == self._policy
class _OwnerPermissions(AbstractPermissions):
"""Owner permissions."""
# pylint: disable=no-self-use
def access_all_entities(self, key: str) -> bool:
"""Check if we have a certain access to all entities."""
return True

View File

@@ -5,8 +5,8 @@ import attr
if TYPE_CHECKING:
# pylint: disable=unused-import
from homeassistant.helpers import entity_registry as ent_reg # noqa
from homeassistant.helpers import device_registry as dev_reg # noqa
from homeassistant.helpers import entity_registry as ent_reg # noqa: F401
from homeassistant.helpers import device_registry as dev_reg # noqa: F401
@attr.s(slots=True)

View File

@@ -21,8 +21,9 @@ def lookup_all(
def compile_policy(
policy: CategoryType, subcategories: SubCatLookupType, perm_lookup: PermissionLookup
) -> Callable[[str, str], bool]: # noqa
) -> Callable[[str, str], bool]:
"""Compile policy into a function that tests policy.
Subcategories are mapping key -> lookup function, ordered by highest
priority first.
"""
@@ -80,7 +81,7 @@ def compile_policy(
def _gen_dict_test_func(
perm_lookup: PermissionLookup, lookup_func: LookupFunc, lookup_dict: SubCategoryDict
) -> Callable[[str, str], Optional[bool]]: # noqa
) -> Callable[[str, str], Optional[bool]]:
"""Generate a lookup function."""
def test_value(object_id: str, key: str) -> Optional[bool]:

View File

@@ -48,7 +48,7 @@ class AuthProvider:
self.config = config
@property
def id(self) -> Optional[str]: # pylint: disable=invalid-name
def id(self) -> Optional[str]:
"""Return id of the auth provider.
Optional, can be None.

View File

@@ -6,6 +6,7 @@
"step": {
"user": {
"data": {
"password": "Palavra-passe",
"username": "Endere\u00e7o de e-mail"
}
}

View File

@@ -5,8 +5,8 @@
},
"error": {
"connection_error": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a Abode.",
"identifier_exists": "\u0423\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430.",
"invalid_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."
"identifier_exists": "\u0423\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430.",
"invalid_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."
},
"step": {
"user": {

View File

@@ -2,6 +2,10 @@
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
)
from homeassistant.const import (
ATTR_ATTRIBUTION,
STATE_ALARM_ARMED_AWAY,
@@ -51,6 +55,11 @@ class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanel):
state = None
return state
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._device.set_standby()

View File

@@ -10,7 +10,7 @@ from homeassistant import config_entries
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import callback
from .const import DOMAIN, DEFAULT_CACHEDB # pylint: disable=W0611
from .const import DOMAIN, DEFAULT_CACHEDB # pylint: disable=unused-import
CONF_POLLING = "polling"

View File

@@ -72,19 +72,19 @@ class AbodeSensor(AbodeDevice):
@property
def state(self):
"""Return the state of the sensor."""
if self._sensor_type == "temp":
if self._sensor_type == CONST.TEMP_STATUS_KEY:
return self._device.temp
if self._sensor_type == "humidity":
if self._sensor_type == CONST.HUMI_STATUS_KEY:
return self._device.humidity
if self._sensor_type == "lux":
if self._sensor_type == CONST.LUX_STATUS_KEY:
return self._device.lux
@property
def unit_of_measurement(self):
"""Return the units of measurement."""
if self._sensor_type == "temp":
if self._sensor_type == CONST.TEMP_STATUS_KEY:
return self._device.temp_unit
if self._sensor_type == "humidity":
if self._sensor_type == CONST.HUMI_STATUS_KEY:
return self._device.humidity_unit
if self._sensor_type == "lux":
if self._sensor_type == CONST.LUX_STATUS_KEY:
return self._device.lux_unit

View File

@@ -4,7 +4,9 @@
"user": {
"data": {
"host": "Servidor",
"port": "Porta"
"password": "Palavra-passe",
"port": "Porta",
"username": "Nome de Utilizador"
}
}
}

View File

@@ -2,6 +2,7 @@
from datetime import timedelta
import logging
from pyaftership.tracker import Tracking
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
@@ -11,6 +12,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
@@ -56,8 +58,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the AfterShip sensor platform."""
from pyaftership.tracker import Tracking
apikey = config[CONF_API_KEY]
name = config[CONF_NAME]

View File

@@ -3,7 +3,7 @@ from datetime import timedelta
import logging
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.config_validation import ( # noqa
from homeassistant.helpers.config_validation import ( # noqa: F401
PLATFORM_SCHEMA,
PLATFORM_SCHEMA_BASE,
)

View File

@@ -6,6 +6,13 @@
"arm_night": "\u0421\u043b\u043e\u0436\u0438 {entity_name} \u043f\u043e\u0434 \u043e\u0445\u0440\u0430\u043d\u0430 \u0432 \u043d\u043e\u0449\u0435\u043d \u0440\u0435\u0436\u0438\u043c",
"disarm": "\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0439 {entity_name}",
"trigger": "\u0417\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430\u043d\u0435 {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} \u043f\u043e\u0434 \u043e\u0445\u0440\u0430\u043d\u0430",
"armed_home": "{entity_name} \u043f\u043e\u0434 \u043e\u0445\u0440\u0430\u043d\u0430 - \u0432\u043a\u044a\u0449\u0438",
"armed_night": "{entity_name} \u043f\u043e\u0434 \u043e\u0445\u0440\u0430\u043d\u0430 - \u043d\u043e\u0449",
"disarmed": "{entity_name} \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0430",
"triggered": "{entity_name} \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430\u043d\u0430"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "Activa {entity_name} nocturn",
"disarm": "Desactiva {entity_name}",
"trigger": "Dispara {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} activada en mode a fora",
"armed_home": "{entity_name} activada en mode a casa",
"armed_night": "{entity_name} activada en mode nocturn",
"disarmed": "{entity_name} desactivada",
"triggered": "{entity_name} disparat/ada"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "Arm {entity_name} night",
"disarm": "Disarm {entity_name}",
"trigger": "Trigger {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} armed away",
"armed_home": "{entity_name} armed home",
"armed_night": "{entity_name} armed night",
"disarmed": "{entity_name} disarmed",
"triggered": "{entity_name} triggered"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "Armare {entity_name} notte",
"disarm": "Disarmare {entity_name}",
"trigger": "Attivazione {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} armata modalit\u00e0 fuori casa",
"armed_home": "{entity_name} armata modalit\u00e0 a casa",
"armed_night": "{entity_name} armata modalit\u00e0 notte",
"disarmed": "{entity_name} disarmato",
"triggered": "{entity_name} attivato"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "{entity_name} fir Nuecht uschalten",
"disarm": "{entity_name} entsch\u00e4rfen",
"trigger": "{entity_name} ausl\u00e9isen"
},
"trigger_type": {
"armed_away": "{entity_name} ugeschalt fir Ennerwee",
"armed_home": "{entity_name} ugeschalt fir Doheem",
"armed_night": "{entity_name} ugeschalt fir Nuecht",
"disarmed": "{entity_name} entsch\u00e4rft",
"triggered": "{entity_name} ausgel\u00e9ist"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "Aktiver {entity_name} natt",
"disarm": "Deaktiver {entity_name}",
"trigger": "Utl\u00f8ser {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} borte sikkring ",
"armed_home": "{entity_name} hjemme sikkring",
"armed_night": "{entity_name} natt sikkring",
"disarmed": "{entity_name} deaktivert",
"triggered": "{entity_name} utl\u00f8st"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "uzbr\u00f3j (noc) {entity_name}",
"disarm": "rozbr\u00f3j {entity_name}",
"trigger": "wyzw\u00f3l {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} zostanie uzbrojony (poza domem)",
"armed_home": "{entity_name} zostanie uzbrojony (w domu)",
"armed_night": "{entity_name} zostanie uzbrojony (noc)",
"disarmed": "{entity_name} zostanie rozbrojony",
"triggered": "{entity_name} zostanie wyzwolony"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0445\u0440\u0430\u043d\u044b \"\u041d\u043e\u0447\u044c\" \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 {entity_name}",
"disarm": "\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0445\u0440\u0430\u043d\u0443 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 {entity_name}",
"trigger": "{entity_name} \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442"
},
"trigger_type": {
"armed_away": "\u0412\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043e\u0445\u0440\u0430\u043d\u044b \"\u041d\u0435 \u0434\u043e\u043c\u0430\" \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 {entity_name}",
"armed_home": "\u0412\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043e\u0445\u0440\u0430\u043d\u044b \"\u0414\u043e\u043c\u0430\" \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 {entity_name}",
"armed_night": "\u0412\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043e\u0445\u0440\u0430\u043d\u044b \"\u041d\u043e\u0447\u044c\" \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 {entity_name}",
"disarmed": "\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043e\u0445\u0440\u0430\u043d\u0430 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 {entity_name}",
"triggered": "{entity_name} \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "Vklju\u010di {entity_name} no\u010d",
"disarm": "Razoro\u017ei {entity_name}",
"trigger": "Spro\u017ei {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} oboro\u017een - zdoma",
"armed_home": "{entity_name} oboro\u017een - dom",
"armed_night": "{entity_name} oboro\u017een - no\u010d",
"disarmed": "{entity_name} razoro\u017een",
"triggered": "{entity_name} spro\u017een"
}
}
}

View File

@@ -6,6 +6,13 @@
"arm_night": "\u8a2d\u5b9a {entity_name} \u591c\u9593\u6a21\u5f0f",
"disarm": "\u89e3\u9664 {entity_name}",
"trigger": "\u89f8\u767c {entity_name}"
},
"trigger_type": {
"armed_away": "{entity_name} \u8a2d\u5b9a\u5916\u51fa",
"armed_home": "{entity_name} \u8a2d\u5b9a\u5728\u5bb6",
"armed_night": "{entity_name} \u8a2d\u5b9a\u591c\u9593",
"disarmed": "{entity_name} \u5df2\u89e3\u9664",
"triggered": "{entity_name} \u5df2\u89f8\u767c"
}
}
}

View File

@@ -1,4 +1,5 @@
"""Component to interface with an alarm control panel."""
from abc import abstractmethod
from datetime import timedelta
import logging
@@ -7,22 +8,30 @@ import voluptuous as vol
from homeassistant.const import (
ATTR_CODE,
ATTR_CODE_FORMAT,
SERVICE_ALARM_TRIGGER,
SERVICE_ALARM_DISARM,
SERVICE_ALARM_ARM_HOME,
SERVICE_ALARM_ARM_AWAY,
SERVICE_ALARM_ARM_NIGHT,
SERVICE_ALARM_ARM_CUSTOM_BYPASS,
SERVICE_ALARM_ARM_HOME,
SERVICE_ALARM_ARM_NIGHT,
SERVICE_ALARM_DISARM,
SERVICE_ALARM_TRIGGER,
)
from homeassistant.helpers.config_validation import ( # noqa
ENTITY_SERVICE_SCHEMA,
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.config_validation import ( # noqa: F401
make_entity_service_schema,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA_BASE,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
from .const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_CUSTOM_BYPASS,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_ARM_NIGHT,
SUPPORT_ALARM_TRIGGER,
)
DOMAIN = "alarm_control_panel"
SCAN_INTERVAL = timedelta(seconds=30)
ATTR_CHANGED_BY = "changed_by"
@@ -32,9 +41,7 @@ ATTR_CODE_ARM_REQUIRED = "code_arm_required"
ENTITY_ID_FORMAT = DOMAIN + ".{}"
ALARM_SERVICE_SCHEMA = ENTITY_SERVICE_SCHEMA.extend(
{vol.Optional(ATTR_CODE): cv.string}
)
ALARM_SERVICE_SCHEMA = make_entity_service_schema({vol.Optional(ATTR_CODE): cv.string})
async def async_setup(hass, config):
@@ -49,21 +56,34 @@ async def async_setup(hass, config):
SERVICE_ALARM_DISARM, ALARM_SERVICE_SCHEMA, "async_alarm_disarm"
)
component.async_register_entity_service(
SERVICE_ALARM_ARM_HOME, ALARM_SERVICE_SCHEMA, "async_alarm_arm_home"
SERVICE_ALARM_ARM_HOME,
ALARM_SERVICE_SCHEMA,
"async_alarm_arm_home",
[SUPPORT_ALARM_ARM_HOME],
)
component.async_register_entity_service(
SERVICE_ALARM_ARM_AWAY, ALARM_SERVICE_SCHEMA, "async_alarm_arm_away"
SERVICE_ALARM_ARM_AWAY,
ALARM_SERVICE_SCHEMA,
"async_alarm_arm_away",
[SUPPORT_ALARM_ARM_AWAY],
)
component.async_register_entity_service(
SERVICE_ALARM_ARM_NIGHT, ALARM_SERVICE_SCHEMA, "async_alarm_arm_night"
SERVICE_ALARM_ARM_NIGHT,
ALARM_SERVICE_SCHEMA,
"async_alarm_arm_night",
[SUPPORT_ALARM_ARM_NIGHT],
)
component.async_register_entity_service(
SERVICE_ALARM_ARM_CUSTOM_BYPASS,
ALARM_SERVICE_SCHEMA,
"async_alarm_arm_custom_bypass",
[SUPPORT_ALARM_ARM_CUSTOM_BYPASS],
)
component.async_register_entity_service(
SERVICE_ALARM_TRIGGER, ALARM_SERVICE_SCHEMA, "async_alarm_trigger"
SERVICE_ALARM_TRIGGER,
ALARM_SERVICE_SCHEMA,
"async_alarm_trigger",
[SUPPORT_ALARM_TRIGGER],
)
return True
@@ -79,7 +99,6 @@ async def async_unload_entry(hass, entry):
return await hass.data[DOMAIN].async_unload_entry(entry)
# pylint: disable=no-self-use
class AlarmControlPanel(Entity):
"""An abstract class for alarm control devices."""
@@ -164,6 +183,11 @@ class AlarmControlPanel(Entity):
"""
return self.hass.async_add_executor_job(self.alarm_arm_custom_bypass, code)
@property
@abstractmethod
def supported_features(self) -> int:
"""Return the list of supported features."""
@property
def state_attributes(self):
"""Return the state attributes."""

View File

@@ -0,0 +1,7 @@
"""Provides the constants needed for component."""
SUPPORT_ALARM_ARM_HOME = 1
SUPPORT_ALARM_ARM_AWAY = 2
SUPPORT_ALARM_ARM_NIGHT = 4
SUPPORT_ALARM_TRIGGER = 8
SUPPORT_ALARM_ARM_CUSTOM_BYPASS = 16

View File

@@ -1,5 +1,6 @@
"""Provides device automations for Alarm control panel."""
from typing import Optional, List
from typing import List, Optional
import voluptuous as vol
from homeassistant.const import (
@@ -16,10 +17,17 @@ from homeassistant.const import (
SERVICE_ALARM_DISARM,
SERVICE_ALARM_TRIGGER,
)
from homeassistant.core import HomeAssistant, Context
from homeassistant.core import Context, HomeAssistant
from homeassistant.helpers import entity_registry
import homeassistant.helpers.config_validation as cv
from . import ATTR_CODE_ARM_REQUIRED, DOMAIN
from .const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_ARM_NIGHT,
SUPPORT_ALARM_TRIGGER,
)
ACTION_TYPES = {"arm_away", "arm_home", "arm_night", "disarm", "trigger"}
@@ -42,31 +50,42 @@ async def async_get_actions(hass: HomeAssistant, device_id: str) -> List[dict]:
if entry.domain != DOMAIN:
continue
state = hass.states.get(entry.entity_id)
# We need a state or else we can't populate the HVAC and preset modes.
if state is None:
continue
supported_features = state.attributes["supported_features"]
# Add actions for each entity that belongs to this integration
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "arm_away",
}
)
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "arm_home",
}
)
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "arm_night",
}
)
if supported_features & SUPPORT_ALARM_ARM_AWAY:
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "arm_away",
}
)
if supported_features & SUPPORT_ALARM_ARM_HOME:
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "arm_home",
}
)
if supported_features & SUPPORT_ALARM_ARM_NIGHT:
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "arm_night",
}
)
actions.append(
{
CONF_DEVICE_ID: device_id,
@@ -75,14 +94,15 @@ async def async_get_actions(hass: HomeAssistant, device_id: str) -> List[dict]:
CONF_TYPE: "disarm",
}
)
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "trigger",
}
)
if supported_features & SUPPORT_ALARM_TRIGGER:
actions.append(
{
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "trigger",
}
)
return actions

View File

@@ -0,0 +1,151 @@
"""Provides device automations for Alarm control panel."""
from typing import List
import voluptuous as vol
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_ARM_NIGHT,
)
from homeassistant.components.automation import AutomationActionType, state
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from homeassistant.const import (
CONF_DEVICE_ID,
CONF_DOMAIN,
CONF_ENTITY_ID,
CONF_PLATFORM,
CONF_TYPE,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_DISARMED,
STATE_ALARM_PENDING,
STATE_ALARM_TRIGGERED,
)
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
from homeassistant.helpers import config_validation as cv, entity_registry
from homeassistant.helpers.typing import ConfigType
from . import DOMAIN
TRIGGER_TYPES = {
"triggered",
"disarmed",
"armed_home",
"armed_away",
"armed_night",
}
TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_TYPE): vol.In(TRIGGER_TYPES),
}
)
async def async_get_triggers(hass: HomeAssistant, device_id: str) -> List[dict]:
"""List device triggers for Alarm control panel devices."""
registry = await entity_registry.async_get_registry(hass)
triggers = []
# Get all the integrations entities for this device
for entry in entity_registry.async_entries_for_device(registry, device_id):
if entry.domain != DOMAIN:
continue
entity_state = hass.states.get(entry.entity_id)
# We need a state or else we can't populate the HVAC and preset modes.
if entity_state is None:
continue
supported_features = entity_state.attributes["supported_features"]
# Add triggers for each entity that belongs to this integration
triggers += [
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "disarmed",
},
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "triggered",
},
]
if supported_features & SUPPORT_ALARM_ARM_HOME:
triggers.append(
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "armed_home",
}
)
if supported_features & SUPPORT_ALARM_ARM_AWAY:
triggers.append(
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "armed_away",
}
)
if supported_features & SUPPORT_ALARM_ARM_NIGHT:
triggers.append(
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "armed_night",
}
)
return triggers
async def async_attach_trigger(
hass: HomeAssistant,
config: ConfigType,
action: AutomationActionType,
automation_info: dict,
) -> CALLBACK_TYPE:
"""Attach a trigger."""
config = TRIGGER_SCHEMA(config)
if config[CONF_TYPE] == "triggered":
from_state = STATE_ALARM_PENDING
to_state = STATE_ALARM_TRIGGERED
elif config[CONF_TYPE] == "disarmed":
from_state = STATE_ALARM_TRIGGERED
to_state = STATE_ALARM_DISARMED
elif config[CONF_TYPE] == "armed_home":
from_state = STATE_ALARM_PENDING
to_state = STATE_ALARM_ARMED_HOME
elif config[CONF_TYPE] == "armed_away":
from_state = STATE_ALARM_PENDING
to_state = STATE_ALARM_ARMED_AWAY
elif config[CONF_TYPE] == "armed_night":
from_state = STATE_ALARM_PENDING
to_state = STATE_ALARM_ARMED_NIGHT
state_config = {
state.CONF_PLATFORM: "state",
CONF_ENTITY_ID: config[CONF_ENTITY_ID],
state.CONF_FROM: from_state,
state.CONF_TO: to_state,
}
state_config = state.TRIGGER_SCHEMA(state_config)
return await state.async_attach_trigger(
hass, state_config, action, automation_info, platform_type="device"
)

View File

@@ -4,7 +4,5 @@
"documentation": "https://www.home-assistant.io/integrations/alarm_control_panel",
"requirements": [],
"dependencies": [],
"codeowners": [
"@colinodell"
]
"codeowners": []
}

View File

@@ -59,85 +59,3 @@ alarm_trigger:
code:
description: An optional code to trigger the alarm control panel with.
example: 1234
envisalink_alarm_keypress:
description: Send custom keypresses to the alarm.
fields:
entity_id:
description: Name of the alarm control panel to trigger.
example: 'alarm_control_panel.downstairs'
keypress:
description: 'String to send to the alarm panel (1-6 characters).'
example: '*71'
alarmdecoder_alarm_toggle_chime:
description: Send the alarm the toggle chime command.
fields:
entity_id:
description: Name of the alarm control panel to trigger.
example: 'alarm_control_panel.downstairs'
code:
description: A required code to toggle the alarm control panel chime with.
example: 1234
ifttt_push_alarm_state:
description: Update the alarm state to the specified value.
fields:
entity_id:
description: Name of the alarm control panel which state has to be updated.
example: 'alarm_control_panel.downstairs'
state:
description: The state to which the alarm control panel has to be set.
example: 'armed_night'
elkm1_alarm_arm_vacation:
description: Arm the ElkM1 in vacation mode.
fields:
entity_id:
description: Name of alarm control panel to arm.
example: 'alarm_control_panel.main'
code:
description: An code to arm the alarm control panel.
example: 1234
elkm1_alarm_arm_home_instant:
description: Arm the ElkM1 in home instant mode.
fields:
entity_id:
description: Name of alarm control panel to arm.
example: 'alarm_control_panel.main'
code:
description: An code to arm the alarm control panel.
example: 1234
elkm1_alarm_arm_night_instant:
description: Arm the ElkM1 in night instant mode.
fields:
entity_id:
description: Name of alarm control panel to arm.
example: 'alarm_control_panel.main'
code:
description: An code to arm the alarm control panel.
example: 1234
elkm1_alarm_display_message:
description: Display a message on all of the ElkM1 keypads for an area.
fields:
entity_id:
description: Name of alarm control panel to display messages on.
example: 'alarm_control_panel.main'
clear:
description: 0=clear message, 1=clear message with * key, 2=Display until timeout; default 2
example: 1
beep:
description: 0=no beep, 1=beep; default 0
example: 1
timeout:
description: Time to display message, 0=forever, max 65535, default 0
example: 4242
line1:
description: Up to 16 characters of text (truncated if too long). Default blank.
example: The answer to life,
line2:
description: Up to 16 characters of text (truncated if too long). Default blank.
example: the universe, and everything.

View File

@@ -6,6 +6,13 @@
"arm_night": "Arm {entity_name} night",
"disarm": "Disarm {entity_name}",
"trigger": "Trigger {entity_name}"
},
"trigger_type": {
"triggered": "{entity_name} triggered",
"disarmed": "{entity_name} disarmed",
"armed_home": "{entity_name} armed home",
"armed_away": "{entity_name} armed away",
"armed_night": "{entity_name} armed night"
}
}
}

View File

@@ -1,14 +1,17 @@
"""Support for AlarmDecoder devices."""
from datetime import timedelta
import logging
from datetime import timedelta
from alarmdecoder import AlarmDecoder
from alarmdecoder.devices import SerialDevice, SocketDevice, USBDevice
from alarmdecoder.util import NoDeviceError
import voluptuous as vol
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
from homeassistant.const import CONF_HOST, EVENT_HOMEASSISTANT_STOP
import homeassistant.helpers.config_validation as cv
from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_HOST
from homeassistant.helpers.discovery import load_platform
from homeassistant.util import dt as dt_util
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
_LOGGER = logging.getLogger(__name__)
@@ -109,9 +112,6 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config):
"""Set up for the AlarmDecoder devices."""
from alarmdecoder import AlarmDecoder
from alarmdecoder.devices import SocketDevice, SerialDevice, USBDevice
conf = config.get(DOMAIN)
restart = False
@@ -134,8 +134,6 @@ def setup(hass, config):
def open_connection(now=None):
"""Open a connection to AlarmDecoder."""
from alarmdecoder.util import NoDeviceError
nonlocal restart
try:
controller.open(baud)

View File

@@ -3,7 +3,15 @@ import logging
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import (
AlarmControlPanel,
FORMAT_NUMBER,
)
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_ARM_NIGHT,
)
from homeassistant.const import (
ATTR_CODE,
STATE_ALARM_ARMED_AWAY,
@@ -13,11 +21,11 @@ from homeassistant.const import (
)
import homeassistant.helpers.config_validation as cv
from . import DATA_AD, DOMAIN as DOMAIN_ALARMDECODER, SIGNAL_PANEL_MESSAGE
from . import DATA_AD, DOMAIN, SIGNAL_PANEL_MESSAGE
_LOGGER = logging.getLogger(__name__)
SERVICE_ALARM_TOGGLE_CHIME = "alarmdecoder_alarm_toggle_chime"
SERVICE_ALARM_TOGGLE_CHIME = "alarm_toggle_chime"
ALARM_TOGGLE_CHIME_SCHEMA = vol.Schema({vol.Required(ATTR_CODE): cv.string})
SERVICE_ALARM_KEYPRESS = "alarm_keypress"
@@ -36,7 +44,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
device.alarm_toggle_chime(code)
hass.services.register(
alarm.DOMAIN,
DOMAIN,
SERVICE_ALARM_TOGGLE_CHIME,
alarm_toggle_chime_handler,
schema=ALARM_TOGGLE_CHIME_SCHEMA,
@@ -48,14 +56,14 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
device.alarm_keypress(keypress)
hass.services.register(
DOMAIN_ALARMDECODER,
DOMAIN,
SERVICE_ALARM_KEYPRESS,
alarm_keypress_handler,
schema=ALARM_KEYPRESS_SCHEMA,
)
class AlarmDecoderAlarmPanel(alarm.AlarmControlPanel):
class AlarmDecoderAlarmPanel(AlarmControlPanel):
"""Representation of an AlarmDecoder-based alarm panel."""
def __init__(self):
@@ -115,13 +123,18 @@ class AlarmDecoderAlarmPanel(alarm.AlarmControlPanel):
@property
def code_format(self):
"""Return one or more digits/characters."""
return alarm.FORMAT_NUMBER
return FORMAT_NUMBER
@property
def state(self):
"""Return the state of the device."""
return self._state
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY | SUPPORT_ALARM_ARM_NIGHT
@property
def device_state_attributes(self):
"""Return the state attributes."""

View File

@@ -7,3 +7,13 @@ alarm_keypress:
keypress:
description: 'String to send to the alarm panel.'
example: '*71'
alarm_toggle_chime:
description: Send the alarm the toggle chime command.
fields:
entity_id:
description: Name of the alarm control panel to trigger.
example: 'alarm_control_panel.downstairs'
code:
description: A required code to toggle the alarm control panel chime with.
example: 1234

View File

@@ -7,6 +7,10 @@ import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
)
from homeassistant.const import (
CONF_CODE,
CONF_NAME,
@@ -95,6 +99,11 @@ class AlarmDotCom(alarm.AlarmControlPanel):
return STATE_ALARM_ARMED_AWAY
return None
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY
@property
def device_state_attributes(self):
"""Return the state attributes."""

View File

@@ -9,9 +9,11 @@ from homeassistant.const import (
STATE_ALARM_ARMED_CUSTOM_BYPASS,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_NIGHT,
STATE_CLOSED,
STATE_LOCKED,
STATE_OFF,
STATE_ON,
STATE_OPEN,
STATE_PAUSED,
STATE_PLAYING,
STATE_UNAVAILABLE,
@@ -33,6 +35,7 @@ from .const import (
DATE_FORMAT,
PERCENTAGE_FAN_MAP,
RANGE_FAN_MAP,
Inputs,
)
from .errors import UnsupportedProperty
@@ -113,6 +116,11 @@ class AlexaCapability:
"""Return the Configuration object."""
return []
@staticmethod
def inputs():
"""Applicable only to media players."""
return []
@staticmethod
def supported_operations():
"""Return the supportedOperations object."""
@@ -162,6 +170,10 @@ class AlexaCapability:
if supported_operations:
result["supportedOperations"] = supported_operations
inputs = self.inputs()
if inputs:
result["inputs"] = inputs
return result
def serialize_properties(self):
@@ -215,6 +227,20 @@ class AlexaCapability:
return friendly_names
class Alexa(AlexaCapability):
"""Implements Alexa Interface.
Although endpoints implement this interface implicitly,
The API suggests you should explicitly include this interface.
https://developer.amazon.com/docs/device-apis/alexa-interface.html
"""
def name(self):
"""Return the Alexa API name of this interface."""
return "Alexa"
class AlexaEndpointHealth(AlexaCapability):
"""Implements Alexa.EndpointHealth.
@@ -529,6 +555,23 @@ class AlexaInputController(AlexaCapability):
"""Return the Alexa API name of this interface."""
return "Alexa.InputController"
def inputs(self):
"""Return the list of valid supported inputs."""
source_list = self.entity.attributes.get(
media_player.ATTR_INPUT_SOURCE_LIST, []
)
input_list = []
for source in source_list:
formatted_source = (
source.lower().replace("-", "").replace("_", "").replace(" ", "")
)
if formatted_source in Inputs.VALID_SOURCE_NAME_MAP.keys():
input_list.append(
{"name": Inputs.VALID_SOURCE_NAME_MAP[formatted_source]}
)
return input_list
class AlexaTemperatureSensor(AlexaCapability):
"""Implements Alexa.TemperatureSensor.
@@ -752,10 +795,11 @@ class AlexaThermostatController(AlexaCapability):
supported_modes.append(thermostat_mode)
preset_modes = self.entity.attributes.get(climate.ATTR_PRESET_MODES)
for mode in preset_modes:
thermostat_mode = API_THERMOSTAT_PRESETS.get(mode)
if thermostat_mode:
supported_modes.append(thermostat_mode)
if preset_modes:
for mode in preset_modes:
thermostat_mode = API_THERMOSTAT_PRESETS.get(mode)
if thermostat_mode:
supported_modes.append(thermostat_mode)
# Return False for supportsScheduling until supported with event listener in handler.
configuration = {"supportsScheduling": False}
@@ -887,6 +931,9 @@ class AlexaModeController(AlexaCapability):
if self.instance == f"{fan.DOMAIN}.{fan.ATTR_DIRECTION}":
return self.entity.attributes.get(fan.ATTR_DIRECTION)
if self.instance == f"{cover.DOMAIN}.{cover.ATTR_POSITION}":
return self.entity.attributes.get(cover.ATTR_POSITION)
return None
def configuration(self):
@@ -902,6 +949,12 @@ class AlexaModeController(AlexaCapability):
{"type": Catalog.LABEL_ASSET, "value": Catalog.SETTING_DIRECTION}
]
if self.instance == f"{cover.DOMAIN}.{cover.ATTR_POSITION}":
capability_resources = [
{"type": Catalog.LABEL_ASSET, "value": Catalog.SETTING_MODE},
{"type": Catalog.LABEL_ASSET, "value": Catalog.SETTING_PRESET},
]
return capability_resources
def mode_resources(self):
@@ -926,6 +979,32 @@ class AlexaModeController(AlexaCapability):
],
}
if self.instance == f"{cover.DOMAIN}.{cover.ATTR_POSITION}":
mode_resources = {
"ordered": False,
"resources": [
{
"value": f"{cover.ATTR_POSITION}.{STATE_OPEN}",
"friendly_names": [
{"type": Catalog.LABEL_TEXT, "value": "open"},
{"type": Catalog.LABEL_TEXT, "value": "opened"},
{"type": Catalog.LABEL_TEXT, "value": "raise"},
{"type": Catalog.LABEL_TEXT, "value": "raised"},
],
},
{
"value": f"{cover.ATTR_POSITION}.{STATE_CLOSED}",
"friendly_names": [
{"type": Catalog.LABEL_TEXT, "value": "close"},
{"type": Catalog.LABEL_TEXT, "value": "closed"},
{"type": Catalog.LABEL_TEXT, "value": "shut"},
{"type": Catalog.LABEL_TEXT, "value": "lower"},
{"type": Catalog.LABEL_TEXT, "value": "lowered"},
],
},
],
}
return mode_resources
def serialize_mode_resources(self):

View File

@@ -272,3 +272,84 @@ class Unit:
WEIGHT_OUNCES = "Alexa.Unit.Weight.Ounces"
WEIGHT_POUNDS = "Alexa.Unit.Weight.Pounds"
class Inputs:
"""Valid names for the InputController.
https://developer.amazon.com/docs/device-apis/alexa-property-schemas.html#input
"""
VALID_SOURCE_NAME_MAP = {
"aux": "AUX 1",
"aux1": "AUX 1",
"aux2": "AUX 2",
"aux3": "AUX 3",
"aux4": "AUX 4",
"aux5": "AUX 5",
"aux6": "AUX 6",
"aux7": "AUX 7",
"bluray": "BLURAY",
"cable": "CABLE",
"cd": "CD",
"coax": "COAX 1",
"coax1": "COAX 1",
"coax2": "COAX 2",
"composite": "COMPOSITE 1",
"composite1": "COMPOSITE 1",
"dvd": "DVD",
"game": "GAME",
"gameconsole": "GAME",
"hdradio": "HD RADIO",
"hdmi": "HDMI 1",
"hdmi1": "HDMI 1",
"hdmi2": "HDMI 2",
"hdmi3": "HDMI 3",
"hdmi4": "HDMI 4",
"hdmi5": "HDMI 5",
"hdmi6": "HDMI 6",
"hdmi7": "HDMI 7",
"hdmi8": "HDMI 8",
"hdmi9": "HDMI 9",
"hdmi10": "HDMI 10",
"hdmiarc": "HDMI ARC",
"input": "INPUT 1",
"input1": "INPUT 1",
"input2": "INPUT 2",
"input3": "INPUT 3",
"input4": "INPUT 4",
"input5": "INPUT 5",
"input6": "INPUT 6",
"input7": "INPUT 7",
"input8": "INPUT 8",
"input9": "INPUT 9",
"input10": "INPUT 10",
"ipod": "IPOD",
"line": "LINE 1",
"line1": "LINE 1",
"line2": "LINE 2",
"line3": "LINE 3",
"line4": "LINE 4",
"line5": "LINE 5",
"line6": "LINE 6",
"line7": "LINE 7",
"mediaplayer": "MEDIA PLAYER",
"optical": "OPTICAL 1",
"optical1": "OPTICAL 1",
"optical2": "OPTICAL 2",
"phono": "PHONO",
"playstation": "PLAYSTATION",
"playstation3": "PLAYSTATION 3",
"playstation4": "PLAYSTATION 4",
"satellite": "SATELLITE",
"satellitetv": "SATELLITE",
"smartcast": "SMARTCAST",
"tuner": "TUNER",
"tv": "TV",
"usbdac": "USB DAC",
"video": "VIDEO 1",
"video1": "VIDEO 1",
"video2": "VIDEO 2",
"video3": "VIDEO 3",
"xbox": "XBOX",
}

View File

@@ -33,6 +33,7 @@ from homeassistant.components import (
from .const import CONF_DESCRIPTION, CONF_DISPLAY_CATEGORIES
from .capabilities import (
Alexa,
AlexaBrightnessController,
AlexaChannelController,
AlexaColorController,
@@ -261,6 +262,7 @@ class GenericCapabilities(AlexaEntity):
return [
AlexaPowerController(self.entity),
AlexaEndpointHealth(self.hass, self.entity),
Alexa(self.hass),
]
@@ -270,6 +272,10 @@ class SwitchCapabilities(AlexaEntity):
def default_display_categories(self):
"""Return the display categories for this entity."""
device_class = self.entity.attributes.get(ATTR_DEVICE_CLASS)
if device_class == switch.DEVICE_CLASS_OUTLET:
return [DisplayCategory.SMARTPLUG]
return [DisplayCategory.SWITCH]
def interfaces(self):
@@ -277,6 +283,7 @@ class SwitchCapabilities(AlexaEntity):
return [
AlexaPowerController(self.entity),
AlexaEndpointHealth(self.hass, self.entity),
Alexa(self.hass),
]
@@ -299,6 +306,7 @@ class ClimateCapabilities(AlexaEntity):
yield AlexaThermostatController(self.hass, self.entity)
yield AlexaTemperatureSensor(self.hass, self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
@ENTITY_ADAPTERS.register(cover.DOMAIN)
@@ -307,7 +315,10 @@ class CoverCapabilities(AlexaEntity):
def default_display_categories(self):
"""Return the display categories for this entity."""
return [DisplayCategory.DOOR]
device_class = self.entity.attributes.get(ATTR_DEVICE_CLASS)
if device_class in (cover.DEVICE_CLASS_GARAGE, cover.DEVICE_CLASS_DOOR):
return [DisplayCategory.DOOR]
return [DisplayCategory.OTHER]
def interfaces(self):
"""Yield the supported interfaces."""
@@ -315,7 +326,12 @@ class CoverCapabilities(AlexaEntity):
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
if supported & cover.SUPPORT_SET_POSITION:
yield AlexaPercentageController(self.entity)
if supported & (cover.SUPPORT_CLOSE | cover.SUPPORT_OPEN):
yield AlexaModeController(
self.entity, instance=f"{cover.DOMAIN}.{cover.ATTR_POSITION}"
)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
@ENTITY_ADAPTERS.register(light.DOMAIN)
@@ -338,6 +354,7 @@ class LightCapabilities(AlexaEntity):
if supported & light.SUPPORT_COLOR_TEMP:
yield AlexaColorTemperatureController(self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
@ENTITY_ADAPTERS.register(fan.DOMAIN)
@@ -369,6 +386,7 @@ class FanCapabilities(AlexaEntity):
)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
@ENTITY_ADAPTERS.register(lock.DOMAIN)
@@ -384,6 +402,7 @@ class LockCapabilities(AlexaEntity):
return [
AlexaLockController(self.entity),
AlexaEndpointHealth(self.hass, self.entity),
Alexa(self.hass),
]
@@ -401,7 +420,6 @@ class MediaPlayerCapabilities(AlexaEntity):
def interfaces(self):
"""Yield the supported interfaces."""
yield AlexaEndpointHealth(self.hass, self.entity)
yield AlexaPowerController(self.entity)
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
@@ -435,6 +453,9 @@ class MediaPlayerCapabilities(AlexaEntity):
if supported & media_player.const.SUPPORT_PLAY_MEDIA:
yield AlexaChannelController(self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
@ENTITY_ADAPTERS.register(scene.DOMAIN)
class SceneCapabilities(AlexaEntity):
@@ -453,7 +474,10 @@ class SceneCapabilities(AlexaEntity):
def interfaces(self):
"""Yield the supported interfaces."""
return [AlexaSceneController(self.entity, supports_deactivation=False)]
return [
AlexaSceneController(self.entity, supports_deactivation=False),
Alexa(self.hass),
]
@ENTITY_ADAPTERS.register(script.DOMAIN)
@@ -467,7 +491,10 @@ class ScriptCapabilities(AlexaEntity):
def interfaces(self):
"""Yield the supported interfaces."""
can_cancel = bool(self.entity.attributes.get("can_cancel"))
return [AlexaSceneController(self.entity, supports_deactivation=can_cancel)]
return [
AlexaSceneController(self.entity, supports_deactivation=can_cancel),
Alexa(self.hass),
]
@ENTITY_ADAPTERS.register(sensor.DOMAIN)
@@ -486,6 +513,7 @@ class SensorCapabilities(AlexaEntity):
if attrs.get(ATTR_UNIT_OF_MEASUREMENT) in (TEMP_FAHRENHEIT, TEMP_CELSIUS):
yield AlexaTemperatureSensor(self.hass, self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
@ENTITY_ADAPTERS.register(binary_sensor.DOMAIN)
@@ -515,8 +543,13 @@ class BinarySensorCapabilities(AlexaEntity):
if CONF_DISPLAY_CATEGORIES in entity_conf:
if entity_conf[CONF_DISPLAY_CATEGORIES] == DisplayCategory.DOORBELL:
yield AlexaDoorbellEventSource(self.entity)
elif entity_conf[CONF_DISPLAY_CATEGORIES] == DisplayCategory.CONTACT_SENSOR:
yield AlexaContactSensor(self.hass, self.entity)
elif entity_conf[CONF_DISPLAY_CATEGORIES] == DisplayCategory.MOTION_SENSOR:
yield AlexaMotionSensor(self.hass, self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)
def get_type(self):
"""Return the type of binary sensor."""
@@ -540,3 +573,4 @@ class AlarmControlPanelCapabilities(AlexaEntity):
if not self.entity.attributes.get("code_arm_required"):
yield AlexaSecurityPanelController(self.hass, self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.hass)

View File

@@ -9,7 +9,6 @@ from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_SUPPORTED_FEATURES,
ATTR_TEMPERATURE,
STATE_ALARM_DISARMED,
SERVICE_ALARM_ARM_AWAY,
SERVICE_ALARM_ARM_HOME,
SERVICE_ALARM_ARM_NIGHT,
@@ -28,6 +27,9 @@ from homeassistant.const import (
SERVICE_VOLUME_MUTE,
SERVICE_VOLUME_SET,
SERVICE_VOLUME_UP,
STATE_ALARM_DISARMED,
STATE_CLOSED,
STATE_OPEN,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
)
@@ -42,6 +44,7 @@ from .const import (
API_THERMOSTAT_MODES,
API_THERMOSTAT_PRESETS,
Cause,
Inputs,
PERCENTAGE_FAN_MAP,
RANGE_FAN_MAP,
SPEED_FAN_MAP,
@@ -459,13 +462,20 @@ async def async_api_select_input(hass, config, directive, context):
media_input = directive.payload["input"]
entity = directive.entity
# attempt to map the ALL UPPERCASE payload name to a source
source_list = entity.attributes[media_player.const.ATTR_INPUT_SOURCE_LIST] or []
# Attempt to map the ALL UPPERCASE payload name to a source.
# Strips trailing 1 to match single input devices.
source_list = entity.attributes.get(media_player.const.ATTR_INPUT_SOURCE_LIST, [])
for source in source_list:
# response will always be space separated, so format the source in the
# most likely way to find a match
formatted_source = source.lower().replace("-", " ").replace("_", " ")
if formatted_source in media_input.lower():
formatted_source = (
source.lower().replace("-", "").replace("_", "").replace(" ", "")
)
media_input = media_input.lower().replace(" ", "")
if (
formatted_source in Inputs.VALID_SOURCE_NAME_MAP.keys()
and formatted_source == media_input
) or (
media_input.endswith("1") and formatted_source == media_input.rstrip("1")
):
media_input = source
break
else:
@@ -956,23 +966,42 @@ async def async_api_set_mode(hass, config, directive, context):
domain = entity.domain
service = None
data = {ATTR_ENTITY_ID: entity.entity_id}
mode = directive.payload["mode"]
capability_mode = directive.payload["mode"]
if domain != fan.DOMAIN:
if domain not in (fan.DOMAIN, cover.DOMAIN):
msg = "Entity does not support directive"
raise AlexaInvalidDirectiveError(msg)
if instance == f"{fan.DOMAIN}.{fan.ATTR_DIRECTION}":
mode, direction = mode.split(".")
if direction in [fan.DIRECTION_REVERSE, fan.DIRECTION_FORWARD]:
_, direction = capability_mode.split(".")
if direction in (fan.DIRECTION_REVERSE, fan.DIRECTION_FORWARD):
service = fan.SERVICE_SET_DIRECTION
data[fan.ATTR_DIRECTION] = direction
if instance == f"{cover.DOMAIN}.{cover.ATTR_POSITION}":
_, position = capability_mode.split(".")
if position == STATE_CLOSED:
service = cover.SERVICE_CLOSE_COVER
if position == STATE_OPEN:
service = cover.SERVICE_OPEN_COVER
await hass.services.async_call(
domain, service, data, blocking=False, context=context
)
return directive.response()
response = directive.response()
response.add_context_property(
{
"namespace": "Alexa.ModeController",
"instance": instance,
"name": "mode",
"value": capability_mode,
}
)
return response
@HANDLERS.register(("Alexa.ModeController", "AdjustMode"))
@@ -1115,21 +1144,25 @@ async def async_api_changechannel(hass, config, directive, context):
"""Process a change channel request."""
channel = "0"
entity = directive.entity
payload = directive.payload["channel"]
channel_payload = directive.payload["channel"]
metadata_payload = directive.payload["channelMetadata"]
payload_name = "number"
if "number" in payload:
channel = payload["number"]
if "number" in channel_payload:
channel = channel_payload["number"]
payload_name = "number"
elif "callSign" in payload:
channel = payload["callSign"]
elif "callSign" in channel_payload:
channel = channel_payload["callSign"]
payload_name = "callSign"
elif "affiliateCallSign" in payload:
channel = payload["affiliateCallSign"]
elif "affiliateCallSign" in channel_payload:
channel = channel_payload["affiliateCallSign"]
payload_name = "affiliateCallSign"
elif "uri" in payload:
channel = payload["uri"]
elif "uri" in channel_payload:
channel = channel_payload["uri"]
payload_name = "uri"
elif "name" in metadata_payload:
channel = metadata_payload["name"]
payload_name = "callSign"
data = {
ATTR_ENTITY_ID: entity.entity_id,

View File

@@ -2,7 +2,13 @@
"config": {
"abort": {
"already_setup": "\u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u0442\u0435 \u0441\u0430\u043c\u043e \u0435\u0434\u0438\u043d Almond \u0430\u043a\u0430\u0443\u043d\u0442.",
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u0441 Almond \u0441\u044a\u0440\u0432\u044a\u0440\u0430."
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u0441 Almond \u0441\u044a\u0440\u0432\u044a\u0440\u0430.",
"missing_configuration": "\u041c\u043e\u043b\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u043a\u0430\u043a \u0434\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u0435 Almond."
},
"step": {
"pick_implementation": {
"title": "\u0418\u0437\u0431\u043e\u0440 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u043a\u0430\u0446\u0438\u044f"
}
},
"title": "Almond"
}

View File

@@ -2,7 +2,13 @@
"config": {
"abort": {
"already_setup": "Nom\u00e9s pots configurar un \u00fanic compte amb Almond.",
"cannot_connect": "No es pot connectar amb el servidor d'Almond."
"cannot_connect": "No es pot connectar amb el servidor d'Almond.",
"missing_configuration": "Consulta la documentaci\u00f3 sobre com configurar Almond."
},
"step": {
"pick_implementation": {
"title": "Selecci\u00f3 del m\u00e8tode d'autenticaci\u00f3"
}
},
"title": "Almond"
}

View File

@@ -2,7 +2,13 @@
"config": {
"abort": {
"already_setup": "Sie k\u00f6nnen nur ein Almond-Konto konfigurieren.",
"cannot_connect": "Verbindung zum Almond-Server nicht m\u00f6glich."
"cannot_connect": "Verbindung zum Almond-Server nicht m\u00f6glich.",
"missing_configuration": "Bitte \u00fcberpr\u00fcfen Sie die Dokumentation zur Einrichtung von Almond."
},
"step": {
"pick_implementation": {
"title": "W\u00e4hle die Authentifizierungsmethode"
}
},
"title": "Almond"
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "Impossible de se connecter au serveur Almond",
"missing_configuration": "Veuillez consulter la documentation pour savoir comment configurer Almond."
},
"step": {
"pick_implementation": {
"title": "S\u00e9lectionner une m\u00e9thode d'authentification"
}
},
"title": "Almond"
}
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "Impossibile connettersi al server Almond.",
"missing_configuration": "Si prega di controllare la documentazione su come impostare Almond."
},
"step": {
"pick_implementation": {
"title": "Seleziona metodo di autenticazione"
}
},
"title": "Almond"
}
}

View File

@@ -2,7 +2,8 @@
"config": {
"abort": {
"already_setup": "\ud558\ub098\uc758 Almond \uacc4\uc815\ub9cc \uad6c\uc131 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.",
"cannot_connect": "Almond \uc11c\ubc84\uc5d0 \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."
"cannot_connect": "Almond \uc11c\ubc84\uc5d0 \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",
"missing_configuration": "Almond \uc124\uc815 \ubc29\ubc95\uc5d0 \ub300\ud55c \uc124\uba85\uc11c\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694."
},
"title": "Almond"
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "Kann sech net mam Almond Server verbannen.",
"missing_configuration": "Kuckt w.e.g. Dokumentatioun iwwert d'ariichten vun Almond."
},
"step": {
"pick_implementation": {
"title": "Wielt Authentifikatiouns Method aus"
}
},
"title": "Almond"
}
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "Kan geen verbinding maken met de Almond-server.",
"missing_configuration": "Raadpleeg de documentatie over het instellen van Almond."
},
"step": {
"pick_implementation": {
"title": "Kies de authenticatie methode"
}
},
"title": "Almond"
}
}

View File

@@ -0,0 +1,5 @@
{
"config": {
"title": "Almond"
}
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "Kan ikke koble til Almond-serveren.",
"missing_configuration": "Vennligst sjekk dokumentasjonen om hvordan du setter opp Almond."
},
"step": {
"pick_implementation": {
"title": "Velg autentiseringsmetode"
}
},
"title": "Almond"
}
}

View File

@@ -2,7 +2,13 @@
"config": {
"abort": {
"already_setup": "Mo\u017cesz skonfigurowa\u0107 tylko jedno konto Almond.",
"cannot_connect": "Nie mo\u017cna po\u0142\u0105czy\u0107 si\u0119 z serwerem Almond."
"cannot_connect": "Nie mo\u017cna po\u0142\u0105czy\u0107 si\u0119 z serwerem Almond.",
"missing_configuration": "Prosz\u0119 zapozna\u0107 si\u0119 z dokumentacj\u0105 konfiguracji Almond."
},
"step": {
"pick_implementation": {
"title": "Wybierz metod\u0119 uwierzytelniania"
}
},
"title": "Almond"
}

View File

@@ -0,0 +1,10 @@
{
"config": {
"step": {
"pick_implementation": {
"title": "Escolha o m\u00e9todo de autentica\u00e7\u00e3o"
}
},
"title": ""
}
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Almond.",
"missing_configuration": "\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Almond."
},
"step": {
"pick_implementation": {
"title": "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438"
}
},
"title": "Almond"
}
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "Ni mogo\u010de vzpostaviti povezave s stre\u017enikom Almond.",
"missing_configuration": "Prosimo, preverite dokumentacijo o tem, kako nastaviti Almond."
},
"step": {
"pick_implementation": {
"title": "Izberite na\u010din preverjanja pristnosti"
}
},
"title": "Almond"
}
}

View File

@@ -5,6 +5,11 @@
"cannot_connect": "\u7121\u6cd5\u9023\u7dda\u81f3 Almond \u4f3a\u670d\u5668\u3002",
"missing_configuration": "\u8acb\u53c3\u8003\u76f8\u95dc\u6587\u4ef6\u4ee5\u4e86\u89e3\u5982\u4f55\u8a2d\u5b9a Almond\u3002"
},
"step": {
"pick_implementation": {
"title": "\u9078\u64c7\u9a57\u8b49\u6a21\u5f0f"
}
},
"title": "Almond"
}
}

View File

@@ -10,7 +10,7 @@ from aiohttp import ClientSession, ClientError
from pyalmond import AlmondLocalAuth, AbstractAlmondWebAuth, WebAlmondAPI
import voluptuous as vol
from homeassistant.core import HomeAssistant, CoreState
from homeassistant.core import HomeAssistant, CoreState, Context
from homeassistant.const import CONF_TYPE, CONF_HOST, EVENT_HOMEASSISTANT_START
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.auth.const import GROUP_ID_ADMIN
@@ -277,7 +277,7 @@ class AlmondAgent(conversation.AbstractConversationAgent):
return True
async def async_process(
self, text: str, conversation_id: Optional[str] = None
self, text: str, context: Context, conversation_id: Optional[str] = None
) -> intent.IntentResponse:
"""Process a sentence."""
response = await self.api.async_converse_text(text, conversation_id)

View File

@@ -1 +1 @@
"""The alpha_vantage component."""
"""The Alpha Vantage component."""

View File

@@ -1,9 +1,9 @@
{
"domain": "alpha_vantage",
"name": "Alpha vantage",
"name": "Alpha Vantage",
"documentation": "https://www.home-assistant.io/integrations/alpha_vantage",
"requirements": [
"alpha_vantage==2.1.1"
"alpha_vantage==2.1.2"
],
"dependencies": [],
"codeowners": [

View File

@@ -3,7 +3,7 @@
"abort": {
"access_token": "Nieznany b\u0142\u0105d podczas generowania tokena dost\u0119pu.",
"already_setup": "Konto Ambiclimate jest skonfigurowane.",
"no_config": "Musisz skonfigurowa\u0107 Ambiclimate, zanim b\u0119dziesz m\u00f3g\u0142 si\u0119 w nim uwierzytelni\u0107. [Przeczytaj instrukcj\u0119] (https://www.home-assistant.io/components/ambiclimate/)."
"no_config": "Musisz skonfigurowa\u0107 Ambiclimate, aby m\u00f3c si\u0119 z nim uwierzytelni\u0107. Zapoznaj si\u0119 z [instrukcj\u0105](https://www.home-assistant.io/components/ambiclimate/)."
},
"create_entry": {
"default": "Pomy\u015blnie uwierzytelniono z Ambiclimate"

View File

@@ -2,7 +2,7 @@
"config": {
"abort": {
"access_token": "\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.",
"already_setup": "\u0423\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430.",
"already_setup": "\u0423\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430.",
"no_config": "\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 Ambiclimate \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 [\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438](https://www.home-assistant.io/components/ambiclimate/)."
},
"create_entry": {
@@ -14,7 +14,7 @@
},
"step": {
"auth": {
"description": "\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e [\u0441\u0441\u044b\u043b\u043a\u0435]({authorization_url}) \u0438 <b>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435</b> \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0412\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 Ambi Climate, \u0437\u0430\u0442\u0435\u043c \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0441\u044e\u0434\u0430 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <b>\u041f\u041e\u0414\u0422\u0412\u0415\u0420\u0414\u0418\u0422\u042c</b>. \n(\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 URL \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 {cb_url})",
"description": "\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e [\u0441\u0441\u044b\u043b\u043a\u0435]({authorization_url}) \u0438 <b>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435</b> \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0412\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 Ambi Climate, \u0437\u0430\u0442\u0435\u043c \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0441\u044e\u0434\u0430 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <b>\u041f\u041e\u0414\u0422\u0412\u0415\u0420\u0414\u0418\u0422\u042c</b>. \n(\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 URL \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 {cb_url})",
"title": "Ambi Climate"
}
},

View File

@@ -3,7 +3,7 @@
"error": {
"identifier_exists": "\u041a\u043b\u044e\u0447 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438/\u0438\u043b\u0438 \u043a\u043b\u044e\u0447 API \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d.",
"invalid_key": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 API \u0438/\u0438\u043b\u0438 \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.",
"no_devices": "\u0412 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b."
"no_devices": "\u0412 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b."
},
"step": {
"user": {

View File

@@ -1,4 +1,5 @@
"""Support for Ambient Weather Station Service."""
import asyncio
import logging
from aioambient import Client
@@ -297,8 +298,12 @@ async def async_unload_entry(hass, config_entry):
ambient = hass.data[DOMAIN][DATA_CLIENT].pop(config_entry.entry_id)
hass.async_create_task(ambient.ws_disconnect())
for component in ("binary_sensor", "sensor"):
await hass.config_entries.async_forward_entry_unload(config_entry, component)
tasks = [
hass.config_entries.async_forward_entry_unload(config_entry, component)
for component in ("binary_sensor", "sensor")
]
await asyncio.gather(*tasks)
return True

View File

@@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/ambient_station",
"requirements": [
"aioambient==0.3.2"
"aioambient==1.0.2"
],
"dependencies": [],
"codeowners": [

View File

@@ -4,7 +4,8 @@
"documentation": "https://www.home-assistant.io/integrations/androidtv",
"requirements": [
"adb-shell==0.0.8",
"androidtv==0.0.32"
"androidtv==0.0.34",
"pure-python-adb==0.2.2.dev0"
],
"dependencies": [],
"codeowners": ["@JeffLIrion"]

View File

@@ -252,14 +252,18 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
def adb_decorator(override_available=False):
"""Send an ADB command if the device is available and catch exceptions."""
"""Wrap ADB methods and catch exceptions.
Allows for overriding the available status of the ADB connection via the
`override_available` parameter.
"""
def _adb_decorator(func):
"""Wait if previous ADB commands haven't finished."""
"""Wrap the provided ADB method and catch exceptions."""
@functools.wraps(func)
def _adb_exception_catcher(self, *args, **kwargs):
# If the device is unavailable, don't do anything
"""Call an ADB-related method and catch exceptions."""
if not self.available and not override_available:
return None
@@ -319,7 +323,7 @@ class ADBDevice(MediaPlayerDevice):
# Property attributes
self._adb_response = None
self._available = self.aftv.available
self._available = True
self._current_app = None
self._state = None

View File

@@ -64,7 +64,7 @@ class DateTimeJSONEncoder(json.JSONEncoder):
Additionally add encoding for datetime objects as isoformat.
"""
def default(self, o): # pylint: disable=E0202
def default(self, o): # pylint: disable=method-hidden
"""Implement encoding logic."""
if isinstance(o, datetime):
return o.isoformat()

View File

@@ -0,0 +1,2 @@
"""Constants for the apns component."""
DOMAIN = "apns"

View File

@@ -9,7 +9,6 @@ import voluptuous as vol
from homeassistant.components.notify import (
ATTR_DATA,
ATTR_TARGET,
DOMAIN,
PLATFORM_SCHEMA,
BaseNotificationService,
)
@@ -18,13 +17,14 @@ from homeassistant.const import ATTR_NAME, CONF_NAME, CONF_PLATFORM
from homeassistant.helpers import template as template_helper
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_state_change
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAIN
from .const import DOMAIN
APNS_DEVICES = "apns.yaml"
CONF_CERTFILE = "cert_file"
CONF_TOPIC = "topic"
CONF_SANDBOX = "sandbox"
DEVICE_TRACKER_DOMAIN = "device_tracker"
SERVICE_REGISTER = "apns_register"
ATTR_PUSH_ID = "push_id"

View File

@@ -3,7 +3,7 @@
"name": "Apprise",
"documentation": "https://www.home-assistant.io/components/apprise",
"requirements": [
"apprise==0.8.1"
"apprise==0.8.2"
],
"dependencies": [],
"codeowners": [

View File

@@ -7,6 +7,11 @@ from homeassistant.components.alarm_control_panel import (
PLATFORM_SCHEMA,
AlarmControlPanel,
)
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_ARM_NIGHT,
)
from homeassistant.const import (
ATTR_ATTRIBUTION,
STATE_ALARM_ARMED_AWAY,
@@ -91,6 +96,11 @@ class ArloBaseStation(AlarmControlPanel):
"""Return the state of the device."""
return self._state
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY | SUPPORT_ALARM_ARM_NIGHT
def update(self):
"""Update the state of the device."""
_LOGGER.debug("Updating Arlo Alarm Control Panel %s", self.name)

View File

@@ -1,15 +1,16 @@
"""Support for ASUSWRT devices."""
import logging
from aioasuswrt.asuswrt import AsusWrt
import voluptuous as vol
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_USERNAME,
CONF_PORT,
CONF_MODE,
CONF_PASSWORD,
CONF_PORT,
CONF_PROTOCOL,
CONF_USERNAME,
)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.discovery import async_load_platform
@@ -53,7 +54,6 @@ CONFIG_SCHEMA = vol.Schema(
async def async_setup(hass, config):
"""Set up the asuswrt component."""
from aioasuswrt.asuswrt import AsusWrt
conf = config[DOMAIN]

View File

@@ -0,0 +1 @@
"""The ATEN PE component."""

View File

@@ -0,0 +1,12 @@
{
"domain": "aten_pe",
"name": "ATEN eco PDUs",
"documentation": "https://www.home-assistant.io/integrations/aten_pe",
"requirements": [
"atenpdu==0.3.0"
],
"dependencies": [],
"codeowners": [
"@mtdcr"
]
}

View File

@@ -0,0 +1,122 @@
"""The ATEN PE switch component."""
import logging
from atenpdu import AtenPE, AtenPEError
import voluptuous as vol
from homeassistant.components.switch import (
DEVICE_CLASS_OUTLET,
PLATFORM_SCHEMA,
SwitchDevice,
)
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_USERNAME
from homeassistant.exceptions import PlatformNotReady
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
CONF_AUTH_KEY = "auth_key"
CONF_COMMUNITY = "community"
CONF_PRIV_KEY = "priv_key"
DEFAULT_COMMUNITY = "private"
DEFAULT_PORT = "161"
DEFAULT_USERNAME = "administrator"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_COMMUNITY, default=DEFAULT_COMMUNITY): cv.string,
vol.Optional(CONF_USERNAME, default=DEFAULT_USERNAME): cv.string,
vol.Optional(CONF_AUTH_KEY): cv.string,
vol.Optional(CONF_PRIV_KEY): cv.string,
}
)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the ATEN PE switch."""
node = config[CONF_HOST]
serv = config[CONF_PORT]
dev = AtenPE(
node=node,
serv=serv,
community=config[CONF_COMMUNITY],
username=config[CONF_USERNAME],
authkey=config.get(CONF_AUTH_KEY),
privkey=config.get(CONF_PRIV_KEY),
)
try:
await hass.async_add_executor_job(dev.initialize)
mac = await dev.deviceMAC()
outlets = dev.outlets()
except AtenPEError as exc:
_LOGGER.error("Failed to initialize %s:%s: %s", node, serv, str(exc))
raise PlatformNotReady
switches = []
async for outlet in outlets:
switches.append(AtenSwitch(dev, mac, outlet.id, outlet.name))
async_add_entities(switches)
class AtenSwitch(SwitchDevice):
"""Represents an ATEN PE switch."""
def __init__(self, device, mac, outlet, name):
"""Initialize an ATEN PE switch."""
self._device = device
self._mac = mac
self._outlet = outlet
self._name = name or f"Outlet {outlet}"
self._enabled = False
self._outlet_power = 0.0
@property
def unique_id(self) -> str:
"""Return a unique ID."""
return f"{self._mac}-{self._outlet}"
@property
def name(self) -> str:
"""Return the name of the entity."""
return self._name
@property
def device_class(self) -> str:
"""Return the class of this device, from component DEVICE_CLASSES."""
return DEVICE_CLASS_OUTLET
@property
def is_on(self) -> bool:
"""Return True if entity is on."""
return self._enabled
@property
def current_power_w(self) -> float:
"""Return the current power usage in W."""
return self._outlet_power
async def async_turn_on(self, **kwargs):
"""Turn the switch on."""
await self._device.setOutletStatus(self._outlet, "on")
self._enabled = True
async def async_turn_off(self, **kwargs):
"""Turn the switch off."""
await self._device.setOutletStatus(self._outlet, "off")
self._enabled = False
async def async_update(self):
"""Process update from entity."""
status = await self._device.displayOutletStatus(self._outlet)
if status == "on":
self._enabled = True
self._outlet_power = await self._device.outletPower(self._outlet)
elif status == "off":
self._enabled = False
self._outlet_power = 0.0

View File

@@ -3,10 +3,7 @@
"name": "Auth",
"documentation": "https://www.home-assistant.io/integrations/auth",
"requirements": [],
"dependencies": [
"http"
],
"codeowners": [
"@home-assistant/core"
]
"dependencies": ["http"],
"after_dependencies": ["onboarding"],
"codeowners": ["@home-assistant/core"]
}

View File

@@ -24,7 +24,7 @@ from homeassistant.core import Context, CoreState, HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import condition, extract_domain_configs, script
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA
from homeassistant.helpers.config_validation import make_entity_service_schema
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.restore_state import RestoreEntity
@@ -106,7 +106,7 @@ PLATFORM_SCHEMA = vol.Schema(
}
)
TRIGGER_SERVICE_SCHEMA = ENTITY_SERVICE_SCHEMA.extend(
TRIGGER_SERVICE_SCHEMA = make_entity_service_schema(
{vol.Optional(ATTR_VARIABLES, default={}): dict}
)
@@ -184,12 +184,18 @@ async def async_setup(hass, config):
)
hass.services.async_register(
DOMAIN, SERVICE_TOGGLE, toggle_service_handler, schema=ENTITY_SERVICE_SCHEMA
DOMAIN,
SERVICE_TOGGLE,
toggle_service_handler,
schema=make_entity_service_schema({}),
)
for service in (SERVICE_TURN_ON, SERVICE_TURN_OFF):
hass.services.async_register(
DOMAIN, service, turn_onoff_service_handler, schema=ENTITY_SERVICE_SCHEMA
DOMAIN,
service,
turn_onoff_service_handler,
schema=make_entity_service_schema({}),
)
return True

View File

@@ -12,7 +12,7 @@ from homeassistant.const import ATTR_CREDENTIALS, CONF_NAME, CONF_PROFILE_NAME
from homeassistant.helpers import config_validation as cv, discovery
# Loading the config flow file will register the flow
from . import config_flow # noqa
from . import config_flow # noqa: F401
from .const import (
CONF_ACCESS_KEY_ID,
CONF_CONTEXT,

View File

@@ -10,7 +10,7 @@
"already_configured": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.",
"already_in_progress": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u0442\u0430.",
"device_unavailable": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e.",
"faulty_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."
"faulty_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."
},
"flow_title": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Axis {name} ({host})",
"step": {

View File

@@ -133,7 +133,7 @@ class BayesianBinarySensor(BinarySensorDevice):
to_observe.update(set([obs.get("entity_id")]))
if "value_template" in obs:
to_observe.update(set(obs.get(CONF_VALUE_TEMPLATE).extract_entities()))
self.entity_obs = dict.fromkeys(to_observe, [])
self.entity_obs = {key: [] for key in to_observe}
for ind, obs in enumerate(self._observations):
obs["id"] = ind

View File

@@ -9,9 +9,15 @@ import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, CONF_MONITORED_VARIABLES, ATTR_ATTRIBUTION
from homeassistant.const import (
CONF_NAME,
CONF_MONITORED_VARIABLES,
ATTR_ATTRIBUTION,
DEVICE_CLASS_TIMESTAMP,
)
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
from homeassistant.util.dt import utcnow
_LOGGER = logging.getLogger(__name__)
@@ -45,6 +51,8 @@ SENSOR_TYPES = {
BANDWIDTH_MEGABITS_SECONDS,
"mdi:upload",
],
"uptime": ["Uptime", None, "mdi:clock"],
"number_of_reboots": ["Number of reboot", None, "mdi:restart"],
}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
@@ -72,11 +80,61 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
sensors = []
for variable in config[CONF_MONITORED_VARIABLES]:
sensors.append(BboxSensor(bbox_data, variable, name))
if variable == "uptime":
sensors.append(BboxUptimeSensor(bbox_data, variable, name))
else:
sensors.append(BboxSensor(bbox_data, variable, name))
add_entities(sensors, True)
class BboxUptimeSensor(Entity):
"""Bbox uptime sensor."""
def __init__(self, bbox_data, sensor_type, name):
"""Initialize the sensor."""
self.client_name = name
self.type = sensor_type
self._name = SENSOR_TYPES[sensor_type][0]
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
self._icon = SENSOR_TYPES[sensor_type][2]
self.bbox_data = bbox_data
self._state = None
@property
def name(self):
"""Return the name of the sensor."""
return f"{self.client_name} {self._name}"
@property
def state(self):
"""Return the state of the sensor."""
return self._state
@property
def icon(self):
"""Icon to use in the frontend, if any."""
return self._icon
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {ATTR_ATTRIBUTION: ATTRIBUTION}
@property
def device_class(self):
"""Return the class of this sensor."""
return DEVICE_CLASS_TIMESTAMP
def update(self):
"""Get the latest data from Bbox and update the state."""
self.bbox_data.update()
uptime = utcnow() - timedelta(
seconds=self.bbox_data.router_infos["device"]["uptime"]
)
self._state = uptime.replace(microsecond=0).isoformat()
class BboxSensor(Entity):
"""Implementation of a Bbox sensor."""
@@ -126,6 +184,8 @@ class BboxSensor(Entity):
self._state = round(self.bbox_data.data["rx"]["bandwidth"] / 1000, 2)
elif self.type == "current_up_bandwidth":
self._state = round(self.bbox_data.data["tx"]["bandwidth"] / 1000, 2)
elif self.type == "number_of_reboots":
self._state = self.bbox_data.router_infos["device"]["numberofboots"]
class BboxData:
@@ -134,6 +194,7 @@ class BboxData:
def __init__(self):
"""Initialize the data object."""
self.data = None
self.router_infos = None
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
@@ -142,7 +203,9 @@ class BboxData:
try:
box = pybbox.Bbox()
self.data = box.get_ip_stats()
self.router_infos = box.get_bbox_info()
except requests.exceptions.HTTPError as error:
_LOGGER.error(error)
self.data = None
self.router_infos = None
return False

View File

@@ -8,7 +8,7 @@ import voluptuous as vol
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.entity import Entity
from homeassistant.const import STATE_ON, STATE_OFF
from homeassistant.helpers.config_validation import ( # noqa
from homeassistant.helpers.config_validation import ( # noqa: F401
PLATFORM_SCHEMA,
PLATFORM_SCHEMA_BASE,
)

View File

@@ -0,0 +1,3 @@
"""Constants for the Monoprice Blackbird Matrix Switch component."""
DOMAIN = "blackbird"
SERVICE_SETALLZONES = "set_all_zones"

View File

@@ -8,7 +8,6 @@ import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
DOMAIN,
SUPPORT_SELECT_SOURCE,
SUPPORT_TURN_OFF,
SUPPORT_TURN_ON,
@@ -23,6 +22,7 @@ from homeassistant.const import (
STATE_ON,
)
import homeassistant.helpers.config_validation as cv
from .const import DOMAIN, SERVICE_SETALLZONES
_LOGGER = logging.getLogger(__name__)
@@ -39,7 +39,6 @@ CONF_SOURCES = "sources"
DATA_BLACKBIRD = "blackbird"
SERVICE_SETALLZONES = "blackbird_set_all_zones"
ATTR_SOURCE = "source"
BLACKBIRD_SETALLZONES_SCHEMA = MEDIA_PLAYER_SCHEMA.extend(

View File

@@ -0,0 +1,10 @@
set_all_zones:
description: Set all Blackbird zones to a single source.
fields:
entity_id:
description: Name of any blackbird zone.
example: 'media_player.zone_1'
source:
description: Name of source to switch to.
example: 'Source 1'

View File

@@ -2,6 +2,7 @@
import logging
from homeassistant.components.alarm_control_panel import AlarmControlPanel
from homeassistant.components.alarm_control_panel.const import SUPPORT_ALARM_ARM_AWAY
from homeassistant.const import (
ATTR_ATTRIBUTION,
STATE_ALARM_ARMED_AWAY,
@@ -52,6 +53,11 @@ class BlinkSyncModule(AlarmControlPanel):
"""Return the state of the device."""
return self._state
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_AWAY
@property
def name(self):
"""Return the name of the panel."""

View File

@@ -0,0 +1,6 @@
"""Constants for the Bluesound HiFi wireless speakers and audio integrations component."""
DOMAIN = "bluesound"
SERVICE_CLEAR_TIMER = "clear_sleep_timer"
SERVICE_JOIN = "join"
SERVICE_SET_TIMER = "set_sleep_timer"
SERVICE_UNJOIN = "unjoin"

View File

@@ -15,7 +15,6 @@ import xmltodict
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
ATTR_MEDIA_ENQUEUE,
DOMAIN,
MEDIA_TYPE_MUSIC,
SUPPORT_CLEAR_PLAYLIST,
SUPPORT_NEXT_TRACK,
@@ -50,6 +49,13 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.util import Throttle
import homeassistant.util.dt as dt_util
from .const import (
DOMAIN,
SERVICE_CLEAR_TIMER,
SERVICE_JOIN,
SERVICE_SET_TIMER,
SERVICE_UNJOIN,
)
_LOGGER = logging.getLogger(__name__)
@@ -62,10 +68,6 @@ DEFAULT_PORT = 11000
NODE_OFFLINE_CHECK_TIMEOUT = 180
NODE_RETRY_INITIATION = timedelta(minutes=3)
SERVICE_CLEAR_TIMER = "bluesound_clear_sleep_timer"
SERVICE_JOIN = "bluesound_join"
SERVICE_SET_TIMER = "bluesound_set_sleep_timer"
SERVICE_UNJOIN = "bluesound_unjoin"
STATE_GROUPED = "grouped"
SYNC_STATUS_INTERVAL = timedelta(minutes=5)

View File

@@ -0,0 +1,30 @@
join:
description: Group player together.
fields:
master:
description: Entity ID of the player that should become the master of the group.
example: 'media_player.bluesound_livingroom'
entity_id:
description: Name(s) of entities that will coordinate the grouping. Platform dependent.
example: 'media_player.bluesound_livingroom'
unjoin:
description: Unjoin the player from a group.
fields:
entity_id:
description: Name(s) of entities that will be unjoined from their group. Platform dependent.
example: 'media_player.bluesound_livingroom'
set_sleep_timer:
description: "Set a Bluesound timer. It will increase timer in steps: 15, 30, 45, 60, 90, 0"
fields:
entity_id:
description: Name(s) of entities that will have a timer set.
example: 'media_player.bluesound_livingroom'
clear_sleep_timer:
description: Clear a Bluesound timer.
fields:
entity_id:
description: Name(s) of entities that will have the timer cleared.
example: 'media_player.bluesound_livingroom'

View File

@@ -0,0 +1,3 @@
"""Constants for the Bluetooth Tracker component."""
DOMAIN = "bluetooth_tracker"
SERVICE_UPDATE = "update"

View File

@@ -13,7 +13,6 @@ from homeassistant.components.device_tracker.const import (
CONF_SCAN_INTERVAL,
CONF_TRACK_NEW,
DEFAULT_TRACK_NEW,
DOMAIN,
SCAN_INTERVAL,
SOURCE_TYPE_BLUETOOTH,
)
@@ -25,6 +24,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN, SERVICE_UPDATE
_LOGGER = logging.getLogger(__name__)
@@ -184,8 +184,6 @@ async def async_setup_scanner(
hass.async_create_task(update_bluetooth())
async_track_time_interval(hass, update_bluetooth, interval)
hass.services.async_register(
DOMAIN, "bluetooth_tracker_update", handle_manual_update_bluetooth
)
hass.services.async_register(DOMAIN, SERVICE_UPDATE, handle_manual_update_bluetooth)
return True

View File

@@ -0,0 +1,2 @@
update:
description: Trigger manual tracker update

View File

@@ -2,10 +2,11 @@
import ipaddress
import logging
from braviarc.braviarc import BraviaRC
from getmac import get_mac_address
import voluptuous as vol
from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
@@ -128,12 +129,11 @@ def request_configuration(config, hass, add_entities):
def bravia_configuration_callback(data):
"""Handle the entry of user PIN."""
from braviarc import braviarc
pin = data.get("pin")
braviarc = braviarc.BraviaRC(host)
braviarc.connect(pin, CLIENTID_PREFIX, NICKNAME)
if braviarc.is_connected():
_braviarc = BraviaRC(host)
_braviarc.connect(pin, CLIENTID_PREFIX, NICKNAME)
if _braviarc.is_connected():
setup_bravia(config, pin, hass, add_entities)
else:
request_configuration(config, hass, add_entities)
@@ -154,10 +154,9 @@ class BraviaTVDevice(MediaPlayerDevice):
def __init__(self, host, mac, name, pin):
"""Initialize the Sony Bravia device."""
from braviarc import braviarc
self._pin = pin
self._braviarc = braviarc.BraviaRC(host, mac)
self._braviarc = BraviaRC(host, mac)
self._name = name
self._state = STATE_OFF
self._muted = False

View File

@@ -1,7 +1,9 @@
"""The broadlink component."""
import asyncio
from base64 import b64decode, b64encode
from binascii import unhexlify
import logging
import re
import socket
from datetime import timedelta
@@ -27,6 +29,31 @@ def data_packet(value):
return b64decode(value)
def hostname(value):
"""Validate a hostname."""
host = str(value).lower()
if len(host) > 253:
raise ValueError
if host[-1] == ".":
host = host[:-1]
allowed = re.compile(r"(?!-)[a-z\d-]{1,63}(?<!-)$")
if not all(allowed.match(elem) for elem in host.split(".")):
raise ValueError
return host
def mac_address(value):
"""Validate and coerce a 48-bit MAC address."""
mac = str(value).lower()
if len(mac) == 17:
mac = mac[0:2] + mac[3:5] + mac[6:8] + mac[9:11] + mac[12:14] + mac[15:17]
elif len(mac) == 14:
mac = mac[0:2] + mac[2:4] + mac[5:7] + mac[7:9] + mac[10:12] + mac[12:14]
elif len(mac) != 12:
raise ValueError
return unhexlify(mac)
SERVICE_SEND_SCHEMA = vol.Schema(
{
vol.Required(CONF_HOST): cv.string,

View File

@@ -7,6 +7,7 @@
],
"dependencies": [],
"codeowners": [
"@danielhiversen"
"@danielhiversen",
"@felipediel"
]
}

View File

@@ -0,0 +1,349 @@
"""Support for Broadlink IR/RF remotes."""
import asyncio
from base64 import b64encode
from binascii import hexlify
from collections import defaultdict
from datetime import timedelta
from ipaddress import ip_address
from itertools import product
import logging
import socket
import broadlink
import voluptuous as vol
from homeassistant.components.remote import (
ATTR_ALTERNATIVE,
ATTR_COMMAND,
ATTR_DELAY_SECS,
ATTR_DEVICE,
ATTR_NUM_REPEATS,
ATTR_TIMEOUT,
DEFAULT_DELAY_SECS,
DOMAIN as COMPONENT,
PLATFORM_SCHEMA,
SUPPORT_LEARN_COMMAND,
RemoteDevice,
)
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, CONF_TIMEOUT
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError, PlatformNotReady
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.storage import Store
from homeassistant.util.dt import utcnow
from . import DOMAIN, data_packet, hostname, mac_address
_LOGGER = logging.getLogger(__name__)
DEFAULT_LEARNING_TIMEOUT = 20
DEFAULT_NAME = "Broadlink"
DEFAULT_PORT = 80
DEFAULT_RETRY = 3
DEFAULT_TIMEOUT = 5
SCAN_INTERVAL = timedelta(minutes=2)
CODE_STORAGE_KEY = "broadlink_{}_codes"
CODE_STORAGE_VERSION = 1
FLAG_STORAGE_KEY = "broadlink_{}_flags"
FLAG_STORAGE_VERSION = 1
FLAG_SAVE_DELAY = 15
MINIMUM_SERVICE_SCHEMA = vol.Schema(
{
vol.Required(ATTR_COMMAND): vol.All(
cv.ensure_list, [vol.All(cv.string, vol.Length(min=1))], vol.Length(min=1)
),
vol.Required(ATTR_DEVICE): vol.All(cv.string, vol.Length(min=1)),
},
extra=vol.ALLOW_EXTRA,
)
SERVICE_SEND_SCHEMA = MINIMUM_SERVICE_SCHEMA.extend(
{vol.Optional(ATTR_DELAY_SECS, default=DEFAULT_DELAY_SECS): vol.Coerce(float)}
)
SERVICE_LEARN_SCHEMA = MINIMUM_SERVICE_SCHEMA.extend(
{
vol.Optional(ATTR_ALTERNATIVE, default=False): cv.boolean,
vol.Optional(ATTR_TIMEOUT, default=DEFAULT_LEARNING_TIMEOUT): cv.positive_int,
}
)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): vol.All(vol.Any(hostname, ip_address), cv.string),
vol.Required(CONF_MAC): mac_address,
vol.Optional(CONF_TIMEOUT, default=DEFAULT_TIMEOUT): cv.positive_int,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
}
)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Broadlink remote."""
host = config[CONF_HOST]
mac_addr = config[CONF_MAC]
timeout = config[CONF_TIMEOUT]
name = config[CONF_NAME]
unique_id = f"remote_{hexlify(mac_addr).decode('utf-8')}"
if unique_id in hass.data.setdefault(DOMAIN, {}).setdefault(COMPONENT, []):
_LOGGER.error("Duplicate: %s", unique_id)
return
hass.data[DOMAIN][COMPONENT].append(unique_id)
api = broadlink.rm((host, DEFAULT_PORT), mac_addr, None)
api.timeout = timeout
code_storage = Store(hass, CODE_STORAGE_VERSION, CODE_STORAGE_KEY.format(unique_id))
flag_storage = Store(hass, FLAG_STORAGE_VERSION, FLAG_STORAGE_KEY.format(unique_id))
remote = BroadlinkRemote(name, unique_id, api, code_storage, flag_storage)
connected, loaded = (False, False)
try:
connected, loaded = await asyncio.gather(
hass.async_add_executor_job(api.auth), remote.async_load_storage_files()
)
except socket.error:
pass
if not connected:
hass.data[DOMAIN][COMPONENT].remove(unique_id)
raise PlatformNotReady
if not loaded:
_LOGGER.error("Failed to set up %s", unique_id)
hass.data[DOMAIN][COMPONENT].remove(unique_id)
return
async_add_entities([remote], False)
class BroadlinkRemote(RemoteDevice):
"""Representation of a Broadlink remote."""
def __init__(self, name, unique_id, api, code_storage, flag_storage):
"""Initialize the remote."""
self._name = name
self._unique_id = unique_id
self._api = api
self._code_storage = code_storage
self._flag_storage = flag_storage
self._codes = {}
self._flags = defaultdict(int)
self._state = True
self._available = True
@property
def name(self):
"""Return the name of the remote."""
return self._name
@property
def unique_id(self):
"""Return the unique ID of the remote."""
return self._unique_id
@property
def is_on(self):
"""Return True if the remote is on."""
return self._state
@property
def available(self):
"""Return True if the remote is available."""
return self._available
@property
def supported_features(self):
"""Flag supported features."""
return SUPPORT_LEARN_COMMAND
@callback
def get_flags(self):
"""Return dictionary of toggle flags.
A toggle flag indicates whether `self._async_send_code()`
should send an alternative code for a key device.
"""
return self._flags
async def async_turn_on(self, **kwargs):
"""Turn the remote on."""
self._state = True
async def async_turn_off(self, **kwargs):
"""Turn the remote off."""
self._state = False
async def async_update(self):
"""Update the availability of the remote."""
if not self.available:
await self._async_connect()
async def async_load_storage_files(self):
"""Load codes and toggle flags from storage files."""
try:
self._codes.update(await self._code_storage.async_load() or {})
self._flags.update(await self._flag_storage.async_load() or {})
except HomeAssistantError:
return False
return True
async def async_send_command(self, command, **kwargs):
"""Send a list of commands to a device."""
kwargs[ATTR_COMMAND] = command
kwargs = SERVICE_SEND_SCHEMA(kwargs)
commands = kwargs[ATTR_COMMAND]
device = kwargs[ATTR_DEVICE]
repeat = kwargs[ATTR_NUM_REPEATS]
delay = kwargs[ATTR_DELAY_SECS]
if not self._state:
return
should_delay = False
for _, cmd in product(range(repeat), commands):
try:
should_delay = await self._async_send_code(
cmd, device, delay if should_delay else 0
)
except ConnectionError:
break
self._flag_storage.async_delay_save(self.get_flags, FLAG_SAVE_DELAY)
async def _async_send_code(self, command, device, delay):
"""Send a code to a device.
For toggle commands, alternate between codes in a list,
ensuring that the same code is never sent twice in a row.
"""
try:
code = self._codes[device][command]
except KeyError:
_LOGGER.error("Failed to send '%s/%s': command not found", command, device)
return False
if isinstance(code, list):
code = code[self._flags[device]]
should_alternate = True
else:
should_alternate = False
await asyncio.sleep(delay)
try:
await self._async_attempt(self._api.send_data, data_packet(code))
except ValueError:
_LOGGER.error("Failed to send '%s/%s': invalid code", command, device)
return False
except ConnectionError:
_LOGGER.error("Failed to send '%s/%s': remote is offline", command, device)
raise
if should_alternate:
self._flags[device] ^= 1
return True
async def async_learn_command(self, **kwargs):
"""Learn a list of commands from a remote."""
kwargs = SERVICE_LEARN_SCHEMA(kwargs)
commands = kwargs[ATTR_COMMAND]
device = kwargs[ATTR_DEVICE]
toggle = kwargs[ATTR_ALTERNATIVE]
timeout = kwargs[ATTR_TIMEOUT]
if not self._state:
return
should_store = False
for command in commands:
try:
should_store |= await self._async_learn_code(
command, device, toggle, timeout
)
except ConnectionError:
break
if should_store:
await self._code_storage.async_save(self._codes)
async def _async_learn_code(self, command, device, toggle, timeout):
"""Learn a code from a remote.
Capture an aditional code for toggle commands.
"""
try:
if not toggle:
code = await self._async_capture_code(command, timeout)
else:
code = [
await self._async_capture_code(command, timeout),
await self._async_capture_code(command, timeout),
]
except (ValueError, TimeoutError):
_LOGGER.error(
"Failed to learn '%s/%s': no signal received", command, device
)
return False
except ConnectionError:
_LOGGER.error("Failed to learn '%s/%s': remote is offline", command, device)
raise
self._codes.setdefault(device, {}).update({command: code})
return True
async def _async_capture_code(self, command, timeout):
"""Enter learning mode and capture a code from a remote."""
await self._async_attempt(self._api.enter_learning)
self.hass.components.persistent_notification.async_create(
f"Press the '{command}' button.",
title="Learn command",
notification_id="learn_command",
)
code = None
start_time = utcnow()
while (utcnow() - start_time) < timedelta(seconds=timeout):
code = await self.hass.async_add_executor_job(self._api.check_data)
if code:
break
await asyncio.sleep(1)
self.hass.components.persistent_notification.async_dismiss(
notification_id="learn_command"
)
if not code:
raise TimeoutError
if all(not value for value in code):
raise ValueError
return b64encode(code).decode("utf8")
async def _async_attempt(self, function, *args):
"""Retry a socket-related function until it succeeds."""
for retry in range(DEFAULT_RETRY):
if retry and not await self._async_connect():
continue
try:
await self.hass.async_add_executor_job(function, *args)
except socket.error:
continue
return
raise ConnectionError
async def _async_connect(self):
"""Connect to the remote."""
try:
auth = await self.hass.async_add_executor_job(self._api.auth)
except socket.error:
auth = False
if auth and not self._available:
_LOGGER.warning("Connected to the remote")
self._available = True
elif not auth and self._available:
_LOGGER.warning("Disconnected from the remote")
self._available = False
return auth

View File

@@ -36,7 +36,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the brunt platform."""
# pylint: disable=no-name-in-module
username = config[CONF_USERNAME]
password = config[CONF_PASSWORD]

Some files were not shown because too many files have changed in this diff Show More