Compare commits

...

703 Commits

Author SHA1 Message Date
Paulus Schoutsen
cdf4588fb0 Merge pull request #36492 from home-assistant/0.110.5 2020-06-05 14:08:03 -07:00
J. Nick Koston
2cf987bfc2 Update myq for latest api changes (#36469) 2020-06-05 13:07:36 -07:00
Paulus Schoutsen
3cdcd5d223 Bumped version to 0.110.5 2020-06-05 12:44:11 -07:00
Franck Nijhof
882359d784 Fix iOS app crashing on None values in Zeroconf service info (#36490) 2020-06-05 12:44:08 -07:00
Paulus Schoutsen
0a779ac64c Add partial mobile app sensor validation (#36433) 2020-06-05 12:43:18 -07:00
Paulus Schoutsen
7194b74580 Merge pull request #36238 from home-assistant/rc 2020-05-28 17:17:56 -07:00
Paulus Schoutsen
33f645aba9 Bumped version to 0.110.4 2020-05-28 15:52:40 -07:00
Erik Montnemery
093d797c3b Correct MQTT device trigger reconfiguration with same topic (#36234) 2020-05-28 15:52:34 -07:00
Erik Montnemery
8426bdc9ae Fix custom position range (#36222) 2020-05-28 15:52:33 -07:00
Aaron Bach
ca0149c635 Prevent AirVisual from polling (#36199)
* Prevent AirVisual from polling

* Docstring
2020-05-28 15:52:32 -07:00
Chris Talkington
e967c93b7b Fix roku select source with app ids (#36191) 2020-05-28 15:52:32 -07:00
Erik Montnemery
3a80cb1d1d Bump zeroconf, pychromecast. Log if zeroconf.get_service_info fails. (#36185) 2020-05-28 15:52:31 -07:00
J. Nick Koston
61d8efae5f Update cast to use shared zeroconf (#35570)
* Update cast to use the shared zeroconf instance

* Add zeroconf to after_dependencies

* Bump version to 5.2.0
2020-05-28 15:52:30 -07:00
Jason Hunter
c710f9994c Fix empty preset element in ONVIF response (#36182) 2020-05-28 15:51:16 -07:00
Paulus Schoutsen
0865791116 Revert DSMR not calling entity methods (#36179) 2020-05-28 15:51:16 -07:00
Markus Bong
d4f7fe16ca Fix cloud connection within API (#36158) 2020-05-28 15:51:15 -07:00
Steven Rollason
e6e7d0651d Check todoist due date is not None in async_get_events (#36140)
* Check that due date is not None

Check that due date is not None, prevents taks without due dates from breaking Calendar API

* Invert None check to reduce indentation
2020-05-28 15:51:14 -07:00
J. Nick Koston
4df8e51edd Use a single service browser for zeroconf discovery (#35997) 2020-05-28 15:51:13 -07:00
Erik Montnemery
2df1c90e6a Let PAHO MQTT client handle connection to MQTT server (#35983)
* Let PAHO client handle connection to MQTT server
2020-05-28 15:51:12 -07:00
Jeff Irion
dc00fa9c27 Fix Android TV icon when screencap option is disabled (#35710)
* Don't return a media image hash if the screencap config option is False

* 1-liner
2020-05-28 15:51:12 -07:00
J. Nick Koston
d1be3c8268 Add ability to ignore heos discovery (#34653)
* Add ability to ignore heos discovery

* Fetch player_id, update tests

* Handle failure state

* Update tests as there are two players in the mock now

* Adjust and add more tests

* Strip out player id lookup

* reverts per review

* one more revert
2020-05-28 15:51:11 -07:00
Franck Nijhof
4054b1744f Merge pull request #36155 from home-assistant/rc 2020-05-26 13:30:45 +02:00
Franck Nijhof
cf585babbe Bumped version to 0.110.3 2020-05-26 12:12:34 +02:00
Bram Kragten
73aca24f30 Update frontend to 20200519.5 (#36154) 2020-05-26 12:11:57 +02:00
Paulus Schoutsen
701f906898 Fix client ID lookup for official apps (#36131) 2020-05-26 12:11:53 +02:00
J. Nick Koston
4c21adfd88 Remove unsupported stop feature with Hunter Douglas Powerview 1.0 Hubs (#36129) 2020-05-26 12:11:49 +02:00
Jason Hunter
ef3019f922 fix preset warning (#36110) 2020-05-26 12:11:45 +02:00
Jason Hunter
79ed8b03dc guard against missing topic (#36108) 2020-05-26 12:11:41 +02:00
Chris Talkington
a1eb513bbc Update rokuecp to 0.4.2 (#36102)
* update rokuecp to 0.4.2

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-05-26 12:11:37 +02:00
J. Nick Koston
a656a40fd7 Ensure homekit bridge state is restored before creating devices (#36098)
* Ensure homekit bridge state is restored before creating devices

* Tests to ensure homekit device registry entry is stable

* remove stray continue
2020-05-26 12:11:34 +02:00
Aaron Bach
53c2227b1d Fix bugs with AirVisual auto-leveling API (#36097)
* Fix bugs with AirVisual auto-leveling API

* Code review

* Code review
2020-05-26 12:11:30 +02:00
Chris Talkington
3d921cec04 Fix roku play/pause during standby (#36096) 2020-05-26 12:11:26 +02:00
Minims
249c00d08f Fix onvif snapshot for Sricam SP009 (#36095) 2020-05-26 12:11:22 +02:00
Thomas Hollstegge
0f7ea290ca Fix emulated_hue compatibility with older devices (#36090)
* Fix emulated_hue compatibility with older devices

* Fix test ugliness

* Fix pylint errors
2020-05-26 12:11:18 +02:00
Daniel Høyer Iversen
7e90d4dd7b Fix opengarage async_setup_platform (#36075)
* opengarage async_setup_platform

* async_add_entities
2020-05-26 12:11:15 +02:00
isk0001y
b6c519e5df Re-read last imap_email_content email when no change (#36065) 2020-05-26 12:11:11 +02:00
Jason Hunter
179e601966 Fix ONVIF config entry unique ID (#36008)
* fallback to device serial number if no mac available

* make password optional to fix #35904

* update tests to reflect new flow

* fix snake case and AsyncMock

* add comments around why weird things are being done
2020-05-26 12:11:08 +02:00
Florent Thoumie
fad79046a8 Fix iaqualink sensors (#36000)
* iaqualink: small sensor fixes

* Re-add device_class, fix type hints.
2020-05-26 12:11:04 +02:00
Florent Thoumie
1eeba0531e Bump iaqualink to 0.3.3 (#35999) 2020-05-26 12:11:00 +02:00
Julius Mittenzwei
011e0a0fcc Bump pyvlx to 0.2.16 (#35971) 2020-05-26 12:10:56 +02:00
Franck Nijhof
f897264c7f Merge pull request #36070 from home-assistant/rc 2020-05-24 14:58:42 +02:00
Chris Talkington
ab741535f7 Fix roku play/pause support (#35991) 2020-05-24 12:39:45 +02:00
Franck Nijhof
fb3394f74b Bumped version to 0.110.2 2020-05-24 11:30:01 +02:00
Fredrik Erlandsson
ed4b1d7c9f Bump tellduslive version (#36048) 2020-05-24 11:28:23 +02:00
Jc2k
a90d1b531c Bump aiohomekit (#36041) 2020-05-24 11:28:19 +02:00
J. Nick Koston
bd32a1fabb Fix shade compatibility with hunter douglas powerview 1.0 hubs (#36040) 2020-05-24 11:28:15 +02:00
Sören Oldag
88ebc6a08b Migrate rpi_gpio_pwm to extend LightEntity instead of Light (#36028) 2020-05-24 11:28:11 +02:00
Franck Nijhof
375f170da8 Upgrade hass-nabucasa to 0.34.3 (#36025) 2020-05-24 11:28:06 +02:00
Jason Hunter
cf6cc6c07c Fix ONVIF PTZ and profile encoding issues (#36006)
* allow lib to create AsyncTransport

* fix transport close issue

* fix zoom only cameras without PTZ presets

* catch profiles without encoding configuration

* also catch ServerDisconnectedError for ptz
2020-05-24 11:28:02 +02:00
Bram Kragten
22a12cea5c Update frontend to 20200519.4 (#35987) 2020-05-24 11:27:58 +02:00
Felipe Martins Diel
1feb8ada6c Handle StorageError in the Broadlink integration (#35986) 2020-05-24 11:27:54 +02:00
Martin Hjelmare
47995edd10 Bump python-openzwave-mqtt to 1.0.2 (#35980) 2020-05-24 11:27:49 +02:00
Andre Lengwenus
5ffee336d5 Fix device_registry cleanup behavior (#35977)
* Fix: Only decives which are not referenced by an entity or a config_entry are removed

* Adapted test for async_cleanup

* Changed variable names
2020-05-24 11:27:44 +02:00
Martin Hjelmare
39f9981914 Fix lutron_caseta setup options (#35974) 2020-05-24 11:27:41 +02:00
Jason Hunter
9e1c35cfd7 Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs

* skip stream from coverage for now

* fix divide by zero error
2020-05-24 11:27:37 +02:00
Chris Talkington
f4f031e703 Improve ipp unique id parsing (#35959) 2020-05-24 11:27:33 +02:00
Fredrik Erlandsson
970bb346d0 Fix Daikin AC integration for AirBase units (#35952) 2020-05-24 11:27:29 +02:00
Hugues Granger
9401525464 Fix typo in conf[CONF_SSL] (#35946) 2020-05-24 11:27:25 +02:00
Jason Hunter
8a9ba7e72d Fix ONVIF Transport (#35932)
* allow lib to create AsyncTransport

* fix transport close issue
2020-05-24 11:27:22 +02:00
J. Nick Koston
f452e26269 Ensure homekit functions if numpy is unavailable (#35931) 2020-05-24 11:27:18 +02:00
Bram Kragten
d299a92cd3 Update frontend to 20200519.3 (#35925)
* Updated frontend to 20200519.2

* Updated frontend to 20200519.3
2020-05-24 11:27:15 +02:00
Chris Talkington
8d008d31bd Update rokuecp to 0.4.1 (#35899)
* update rokuecp to 0.4.1

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-05-24 11:27:11 +02:00
Aaron Bach
43ec35ee17 Fix Prezzibenzina doing I/O in the event loop (#35881)
* Fix Prezzibenzina doing I/O in the event loop

* Linting
2020-05-24 11:27:07 +02:00
Robert Chmielowiec
534fcefae1 Fix service registration supported features check (#35718) 2020-05-24 11:27:02 +02:00
Aaron Bach
19f36eb5a1 Auto-level AirVisual API calls (#34903) 2020-05-24 11:26:58 +02:00
Pascal Vizeli
7c784b6963 Merge pull request #35907 from home-assistant/rc
0.110.1
2020-05-21 12:26:15 +02:00
Pascal Vizeli
b266d3aaae Bump version 0.110.1 2020-05-21 08:47:50 +00:00
J. Nick Koston
e170e6563b Fix legacy Hunter Douglas PowerView devices (#35895)
These devices are missing firmware information
as the 1.0 firmware did not provide it.
2020-05-21 08:46:46 +00:00
J. Nick Koston
ddee8b68c6 Ensure storage write consume the data under the lock (#35889)
If two writes trigger at the same time the data would already
be consumed.
2020-05-21 08:46:45 +00:00
J. Nick Koston
c88c011df9 Ensure http can startup if homekit fails to load (#35888)
* Ensure HomeAssistant can startup if homekit fails to load

* Update homeassistant/components/logbook/manifest.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-21 08:46:43 +00:00
Jason Hunter
ae66f4250c fix mjpeg issue along with some cameras not returning event capabilities properly (#35885) 2020-05-21 08:46:42 +00:00
Daniel Perna
c7008eb761 Fix light profiles for HomeMatic lights (#35882) 2020-05-21 08:46:41 +00:00
Bram Kragten
b9ab6d1e10 Updated frontend to 20200519.1 (#35877) 2020-05-21 08:46:39 +00:00
J. Nick Koston
1c38bcaeb5 Homekit should skip devices that are missing in device registry (#35857)
* Homekit should skip devices that are missing in device registry

* Add test for this failure state
2020-05-21 08:46:38 +00:00
Fredrik Erlandsson
813203a38f Fix Daikin duplicate entries (#35833) 2020-05-21 08:46:37 +00:00
uvjustin
2d76e12c21 Handle None received from pyforked-daapd (#35830)
* Handle None received from API in forked-daapd

* Bump pyforked-daapd version in requirements

* Add test
2020-05-21 08:46:35 +00:00
Emilv2
e979b54413 Fix Delijn sensor naming (#35789) 2020-05-21 08:46:34 +00:00
Franck Nijhof
70b14518d0 Merge pull request #35828 from home-assistant/rc 2020-05-20 10:14:49 +02:00
Franck Nijhof
f3e5d03384 Bumped version to 0.110.0 2020-05-20 08:57:01 +02:00
Robert Svensson
57bcb4743d UniFi - Fix disabled entities being enabled after a restart (#35819)
* Async remove call removed too much, resulting in disabled entities coming back after a restart

* Calling super().async_remove is no longer needed, changed to self.async_remove

* Yes, they should be sets...
2020-05-20 08:55:06 +02:00
Bram Kragten
d81a19b5a2 Bumped version to 0.110.0b5 2020-05-19 20:21:58 +02:00
Bram Kragten
39ce063500 Updated frontend to 20200519.0 (#35813) 2020-05-19 20:19:45 +02:00
Alexei Chetroi
af34d130b6 Bump up ZHA dependencies. (#35797) 2020-05-19 20:11:22 +02:00
uvjustin
0cb5ccd492 Change version check in forked-daapd zeroconf step (#35796) 2020-05-19 20:11:22 +02:00
Anders Melchiorsen
7433fa9265 Upgrade pysonos to 0.0.30 (#35793) 2020-05-19 20:11:21 +02:00
Jason Hunter
d629a55134 Fix ONVIF subscription renewal (#35792)
* fix subscription renewal

* catch ValueError for #35762
2020-05-19 20:11:20 +02:00
Franck Nijhof
7a72ada8b2 Bumped version to 0.110.0b4 2020-05-18 22:36:58 +02:00
Bram Kragten
a28646bc24 Updated frontend to 20200518.0 (#35785) 2020-05-18 22:31:35 +02:00
MatsNl
ca4433bd70 Bump Atag dependency to 0.3.1.2 (#35776) 2020-05-18 22:31:29 +02:00
uvjustin
c61bcbf982 Skip forked_daapd ignored entries with empty entry.data (#35772) 2020-05-18 22:31:24 +02:00
Fredrik Erlandsson
e9f398ac28 Fix daikin discovery flow (#35767) 2020-05-18 22:31:19 +02:00
J. Nick Koston
7417b3be66 Handle UPS disconnects in NUT (#35758) 2020-05-18 22:31:14 +02:00
Daniel Høyer Iversen
99afc17b3f Update mill manifest to reflect config flow (#35748) 2020-05-18 22:31:10 +02:00
J. Nick Koston
cc5fc2baa4 Ensure homekit version strings conform to spec (#35741)
HomeKit requires all version strings to be in the
format MAJOR.MINOR.REVISION
2020-05-18 22:31:05 +02:00
Daniel Høyer Iversen
e2f0520028 Upgrade opengarage lib to 0.1.4 (#35729) 2020-05-18 22:31:00 +02:00
uvjustin
5cb1924290 Abort forked-daapd zeroconf flow if version < 27 (#35709)
* Change MediaPlayerDevice to MediaPlayerEntity

* Abort zeroconf if mtd-version < 27.0
2020-05-18 22:30:55 +02:00
Alexei Chetroi
aa176aab07 Bump up ZHA dependencies (#35706) 2020-05-18 22:30:51 +02:00
Franck Nijhof
5695a63e59 Fix handling of additional data in core config storage (#35660) 2020-05-18 22:30:45 +02:00
Franck Nijhof
4a9a004de0 Bumped version to 0.110.0b3 2020-05-16 11:06:22 +02:00
uvjustin
c270d5edcf Change MediaPlayerDevice to MediaPlayerEntity (#35692) 2020-05-16 11:05:15 +02:00
Bram Kragten
cf034ee729 Updated frontend to 20200515.0 (#35677) 2020-05-16 11:05:11 +02:00
Jason Hunter
316d44cf33 ONVIF: Add check around media capabilities (#35667) 2020-05-16 11:05:07 +02:00
Bram Kragten
dbd30d571d Fix caldav event for calendar panel (#35653) 2020-05-16 11:05:03 +02:00
Xiaonan Shen
78c9411dde Bump roombapy to 1.6.1 (#35650)
* Bump roombapy to 1.6.1

* Improve roomba error handling
2020-05-16 11:04:59 +02:00
Glenn Waters
2f999dd77e Update Universal Powerline Bus event name (#35644) 2020-05-16 11:04:55 +02:00
Chris Talkington
e8ee3c7d4d Prevent discovery of IPP printers lacking identifier (#35630) 2020-05-16 11:04:51 +02:00
Bram Kragten
5496a8ca05 Bumped version to 0.110.0b2 2020-05-15 09:12:26 +02:00
Quentame
3928fe9578 Bump python-synology to 0.8.1 (#35640)
* Bump python-synology to 0.8.1

* Fix tests
2020-05-15 09:10:28 +02:00
Bram Kragten
592ecd479f Updated frontend to 20200514.1 (#35632) 2020-05-15 09:10:27 +02:00
Franck Nijhof
20188a36de Bumped version to 0.110.0b1 2020-05-14 23:49:29 +02:00
Franck Nijhof
d66856dd17 Update translations for OZW and ONVIF 2020-05-14 23:48:43 +02:00
Franck Nijhof
bcf068f66f Rename zwave_mqtt to ozw (#35631) 2020-05-14 23:33:33 +02:00
Alexei Chetroi
618ce2ff0a Don't remove deprecated ZHA config option yet (#35627) 2020-05-14 23:26:17 +02:00
Jason Hunter
05778ad307 additional log info and strings fix (#35622) 2020-05-14 23:26:13 +02:00
Ville Skyttä
bc0109256f Upgrade huawei-lte-api to 1.4.12 (#35618)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.12
2020-05-14 23:26:09 +02:00
Anders Melchiorsen
fa487c7c2f Upgrade to pysonos 0.0.29 (#35617) 2020-05-14 23:26:05 +02:00
Bram Kragten
b3a0270acd Add check for HTML in translations (#35615)
* Add check for HTML in translations

and remove existing html

* Add test
2020-05-14 23:26:02 +02:00
zacpotts
a930175c55 Fix zwave thermostat specific device type (#35609) 2020-05-14 23:25:58 +02:00
Marcel van der Veldt
45d3bb7da2 Fix zwave_mqtt creating the device name (#35603)
* Fix for creating the device name

Creating the devicename included a typo and was missing the custom (preferred) name set by the OZW Admin tool.

* update comments
2020-05-14 23:25:55 +02:00
Jason Hunter
b83adad417 Additional checks for ONVIF event capabilities (#35599)
catch any exceptions when pulling event capabilities and assume it is not supported
2020-05-14 23:25:51 +02:00
Bram Kragten
856c0e6a15 Updated frontend to 20200514.0 (#35598) 2020-05-14 23:25:48 +02:00
J. Nick Koston
eeaef5731f Fix reversed logic in zeroconf homekit pairing check (#35596)
* Fix reversed logic in zeroconf homekit pairing check

* s/server_info/service_info/
2020-05-14 23:25:44 +02:00
uvjustin
cc431b9f14 Clean up forked_daapd volume saving/setting in async_play_media (#35584)
* Clean up volume saving/setting in async_play_media

* Set source to pipe when queued externally

* Add server version requirement to error string
2020-05-14 23:25:40 +02:00
Bouwe Westerdijk
506dd1d423 Bump haanna to 0.15.0 (#35579)
* Link to haanna v0.15.0

* Update requirements_all.txt
2020-05-14 23:25:35 +02:00
Steven Looman
0e79b47b43 Properly handle incomplete upnp ssdp discovery (#35553) 2020-05-14 23:25:29 +02:00
Franck Nijhof
638f37167f Bumped version to 0.110.0b0 2020-05-13 20:31:45 +02:00
Franck Nijhof
2308b94702 Merge branch 'dev' into rc 2020-05-13 20:31:21 +02:00
Paulus Schoutsen
0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
Franck Nijhof
d447a8347b Merge branch 'master' into dev 2020-05-13 20:22:43 +02:00
J. Nick Koston
6d8b8ecfa9 Add ssdp discovery for isy994 (#35568)
* Add ssdp discovery for isy994

* Increase test coverage for existing config flow

* Update tests/components/isy994/test_config_flow.py

Co-authored-by: shbatm <support@shbatm.com>

* Update tests/components/isy994/test_config_flow.py

Co-authored-by: shbatm <support@shbatm.com>

* move constants

* Update tests/components/isy994/test_config_flow.py

Co-authored-by: shbatm <support@shbatm.com>

* undo CONF_TLS_VER from homeassistant.const

Co-authored-by: shbatm <support@shbatm.com>
2020-05-13 11:15:17 -05:00
Kevin Fronczak
85726b67b7 Add config flow and 2FA support for Blink (#35396) 2020-05-13 15:50:29 +02:00
Bram Kragten
0a94d9b284 Updated frontend to 20200513.0 (#35574) 2020-05-13 15:30:27 +02:00
Xiaonan Shen
ce99fa8c02 Add config flow to pi_hole integration (#35442)
* Add config flow to pi-hole

* Add config flow tests

* Change PlatformNotReady to ConfigEntryNotReady

* Improve config flow

* Add @shenxn as codeowner

* Use entity_id as unique id

* Remove .get with [] for required fields

* Remove unique id from config flow

* Replace some strings with references

* Fix api_key string

* Fix service api_key check

* Remove unused DuplicatedNameException
2020-05-13 09:25:06 -04:00
Matthias Alphart
7147c5306d update knx module to xknx 0.11.3 (#35154)
- add expose attribute function and default value
- default climate havc_mode to "heat" if modes are not supported
- support `update_entity` service call
2020-05-13 09:19:00 -04:00
uvjustin
c41fb2a21f Add forked_daapd integration (#31953)
* New forked_daapd component

* Bunch of changes

Add config flow and zeroconf
Add zones on callback when added by server
Add password auth
Add async_play_media for TTS
Add media_image_url
Add support for pipe control/input from librespot-java
Improve update callbacks

* Refactor as per code review suggestions

Move config_flow connection testing to pypi library (v0.1.4)
Remove use of ForkedDaapdData class
Decouple Master and Zone data and functions
Add updater class to manage websocket and entity updates

* More changes as per code review

Avoid direct access to entities in tests
Bump pypi version
Mark entities unavailable when websocket disconnected
Move config tests to test_config_flow
Move full url creation from media_image_url to library
Move updater entity from master to hass.data
Remove default unmute volume option
Remove name from config_flow
Remove storage of entities in hass.data
Use async_write_ha_state
Use signal to trigger update_options
Use unittest.mock instead of asynctest.mock

* Yet more changes as per code review

Add more assertions in tests
Avoid patching asyncio
Make off state require player state stopped
Only send update to existing zones
Split up some tests
Use events instead of async_block_till_done
Use sets instead of lists where applicable
Wait for pause callback before continuing TTS

* Remove unnecessary use of Future()

* Add pipes and playlists as sources

* Add support for multiple servers

Change config options to add max_playlists+remove use_pipe_control
Create Machine ID in test_connection and also get from zeroconf
Modify hass.data storage
Update host for known configurations
Use Machine ID in unique_ids, entity names, config title, signals

* Use entry_id as basis for multiple entries

* Use f-strings and str.format, abort for same host

* Clean up check for same host
2020-05-13 09:13:41 -04:00
jjlawren
c12f8bed43 Plex discovery on demand (#35303)
* Allow Plex discovery on demand

* Add new discovery source

* Add tests
2020-05-13 09:11:00 -04:00
Steffen Zimmermann
ee96ff2846 Add wiffi integration (#30784)
* Add integration for wiffi devices

wiffi devices are DIY board manufactured by stall.biz.
Several devices are available, e.g. a weather station (weatherman), an
indoor environmental sensor (wiffi-wz) and some more.
This intgration has been developed using a weatherman device, but should
also work for other devices from stall.biz.

* Fix pylint warning

* Use WIFFI / STALL WIFFI instead of wiffi to be consistent with stall.biz

* Don't update disabled entities.

* fix complains

- move wiffi specific code to pypi
- remove yaml configuration code

* incorporate various suggestions from code review

* fix remaining comments from Martin

* fix comments

* add tests for config flow

* fix comments

* add missing requirements for tests

* fix pylint warnings

* fix comments

* fix comments

remove debug log
rename .translations to translations

* rebase and adapt to latest dev branch

* Update homeassistant/components/wiffi/config_flow.py

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

* Update homeassistant/components/wiffi/config_flow.py

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

* fix missing import

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-13 10:40:58 +02:00
Felipe Martins Diel
6464c94990 Fix connection problems in the Broadlink integration (#34670)
* Use helper functions for exception handling

* Create a separate class to handle communication with the device

* Update manifest

* Use coroutine for service setup

* Fix sensor update

* Update tests

* Fix MP1 switch

* Add device.py to .coveragerc

* Remove unnecessary blocking from test_learn_timeout

* Change access method for entries with default values

* Make the changes suggested by MartinHjelmare

* Remove dot from debug message

* Use underscore for unused variable
2020-05-13 10:36:32 +02:00
Martin Hjelmare
2a120d9045 Patch aiohttp client session close (#34769)
* Patch aiohttp client session close

* Add test

* Restore close regardless of auto_cleanup

* Close session instead of detaching and do not restore

* Delint test

* Add frame helper

* Use frame helper

* Test warning log when closing session

* Clean up

* Correct docstring

* Do not change shutdown

* Fix tests
2020-05-13 09:58:33 +02:00
jjlawren
2f6da20065 Bump plexapi to 3.6.0 (#35563) 2020-05-12 22:56:35 -05:00
Xiaonan Shen
36ad9a25e3 Fix synology temperature rounding (#35556)
* Fix synology temperature rounding

* Remove stale comment
2020-05-13 03:10:17 +02:00
Robert Svensson
785b8d2bd1 UniFi - Sites don't declare role on UniFiOS 1.7.0 beta (#35555)
* New way to identify role, compatible with standalone controller or as part of unifios

* Remove error

* Bump dependency to v22

* Remove unused import
2020-05-13 00:37:16 +02:00
Franck Nijhof
eddb5c6c3f Add more system information from Supervisor (#35560) 2020-05-12 15:27:34 -07:00
Emily Mills
306f15723d Add Zerproc integration (#35477) 2020-05-13 00:26:44 +02:00
Bram Kragten
3936cbebbb Updated frontend to 20200512.0 (#35558) 2020-05-12 18:16:11 -04:00
Thomas Johanns
8f76f59b8b Implement soundtouch select source (#31669) 2020-05-12 22:56:12 +02:00
On Freund
3fcd7866cc Try to automatically detect zones on first run of Monoprice integration (#35127) 2020-05-12 22:30:59 +02:00
J. Nick Koston
16cc4aed06 Ensure homekit_controller recieves zeroconf c# updates (#35545)
* Ensure homekit_controller recieves zeroconf c# updates

If an integration has a homekit config flow step
homekit controller would not see updates for
devices that were paired with it and would not
rescan for changes.

* Only send updates to homekit controller if the device is paired

This avoids the device showing up a second time.

* remove debug

* fix refactor error
2020-05-12 14:59:29 -05:00
Willem-Jan
f6b6e2f7d1 Bump bsblan lib to version 0.3.7 (#35551) 2020-05-12 21:14:42 +02:00
rajlaud
79a313d505 Fix examples in services.yaml for squeezebox component (#35548) 2020-05-12 21:10:46 +02:00
Daniel Høyer Iversen
13ff5862d1 Upgrade opengarage library (#35549) 2020-05-12 21:02:18 +02:00
Marcel van der Veldt
1351ddd11e Add binary sensor platform to zwave_mqtt (#35519)
* add binary sensor platform to zwave_mqtt

* add tests for binary_sensor

* fix tests

* device class is required value

* Update homeassistant/components/zwave_mqtt/binary_sensor.py

use colon as separator

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* extend tests

* code optimize

* add test for enabling a legacy binary sensor

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-12 20:07:11 +02:00
Paulus Schoutsen
dd32324e01 Use config flow references for data (#35529) 2020-05-12 10:50:44 -07:00
Paulus Schoutsen
1f71bdedab Add temperature device class to Darksky sensors (#35544) 2020-05-12 10:37:04 -07:00
Paulus Schoutsen
befda9a78b Add email as common data string (#35546) 2020-05-12 09:08:07 -07:00
J. Nick Koston
68179e2672 Fix sense doing I/O in the event loop (#35523)
When the websocket is created `SSLContext.load_default_certs` is called
each time which opens up the system default ssl certs file and reads it in

Normally this goes unnoticed, however since there are frequent connects
and disconnects of the websocket it was noticeable.
2020-05-12 10:48:51 -05:00
J. Nick Koston
1bb01dccf5 Update HAP-python to 2.8.4 (#35541)
Fix race condition that causes pairing and unpairing failures. ikalchev/HAP-python#246
Fix loop on dropped connections that causes temporary stalls and connection loss. ikalchev/HAP-python#249
Fix exception on missing video fields. ikalchev/HAP-python#245
2020-05-12 10:03:12 -05:00
Chris Talkington
de22bb1df6 Use common strings for roku config flow (#35504)
* use common strings for roku config flow.

* Update strings.json

* Update strings.json
2020-05-12 10:00:38 -05:00
guillempages
1e157a4f41 Add validator for battery scan option (#35506)
* Add validator for battery scan option

Add a validator for the track battery option.
Also add the possibility of configuring the battery scan interval.

* Set config defaults on the validator

Set the defaults on the platform schema, and not in the initialization code.
2020-05-12 09:58:24 -05:00
Nicolas Bourasseau
2984b9fd18 Meteo-France Vigilance Dependancy Update (#35537)
* Update requirements_all.txt

Updated to vigilancemeteo version 3.0.1

* Update requirements_test_all.txt

Updated to vigilancemeteo version 3.0.1

* Update manifest.json

Update to correct typo error
2020-05-12 10:42:57 -04:00
ochlocracy
15e8f4614c Return fan_speed_list based on SUPPORT_FAN_SPEED. (#35347) 2020-05-12 09:24:13 -05:00
gadgetmobile
53771bd576 support BleBox sensor (#35374) 2020-05-12 09:10:03 -05:00
MatsNl
4099815a08 Rewrite Atag (#35496)
* rewrite library

* Update strings.json

* fix updated with empty reply

* dont use entity_id

* atag_id

* use super init instead

* original ids to prevent breaking change
2020-05-12 11:47:33 +02:00
Marcel van der Veldt
86b984b0bd Fix zwave_mqtt discovery of switch entities (#35533)
limit of device_class is redundant as we're already scoping to the Binary Switch CommandClass as primary value.
2020-05-12 11:45:05 +02:00
Chris Talkington
e4afb949d7 Use common strings for ipp config flow (#35505)
* Use common strings for ipp config flow

* Update strings.json

* Update strings.json

* Update strings.json
2020-05-11 22:52:16 -05:00
Xiaonan Shen
2748dcaaf1 Use common strings for songpal config flow (#35517) 2020-05-11 22:48:41 -05:00
Glenn Waters
ea9c103fe1 Universal Powerline Bus -- Link Events (#35526)
* Universal Powerline Bus - Link Event

* Bump lib version.

* Update homeassistant/components/upb/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-11 22:34:31 -05:00
shbatm
b1d59679e5 Code conformance and sensor value clean-up on ISY994 (#35514)
* Consolidate value conversion functions

* Update to sensor

* Fix property name

* Revise sensors and state reporting per code standards

* Update uom function and revert to property
2020-05-11 21:32:19 -05:00
Alexei Chetroi
2f73361381 Bump up ZHA dependecy (#35521)
* Bump up ZHA dependecy
* Fix tests.
2020-05-11 20:22:27 -04:00
Tomer Figenblat
71b797faf2 Bumped aioswitcher to 1.2.0. (#35510) 2020-05-11 20:05:42 -04:00
Willem-Jan
c5c1c2e298 Fix bsblan get key CONF_PASSKEY (#35513)
* Fix get key CONF_PASSKEY

PASSKEY is optional so it should use .get

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-11 20:02:25 -04:00
Franck Nijhof
2d43698958 Upgrade pre-commit to 2.4.0 (#35520) 2020-05-11 20:00:08 -04:00
J. Nick Koston
3315c4c6c3 Pre-filter zeroconf service browser updates (#35518)
Each ServerBrowser currently runs in its own thread which
processes every A or AAAA record update per instance.

As the list of zeroconf names we watch for grows, each additional
ServiceBrowser would process all the A and AAAA updates on the network.

To avoid overwhemling the system we pre-filter here and only process
DNSPointers for the configured record name (type)
2020-05-11 18:30:15 -05:00
Dan Jenkins
dd22200a69 Compare uvc rtsp stream uri to host config (#31107) 2020-05-12 00:50:54 +02:00
J. Nick Koston
751529feca Use system zeroconf singleton for homekit (#35502)
Zeroconf instances are expensive so we share a single instance
instead of running multiple.
2020-05-11 13:21:16 -05:00
Steven Looman
48899c7a1c Move upnp update_interval options flow (#35474) 2020-05-11 20:03:12 +02:00
David Straub
d2502f649f Fix Home Connect datetime comparison (#35501) 2020-05-11 19:55:09 +02:00
Fredrik Erlandsson
93f8d21bc0 Bump pydaikin to 2.0.1, catch HTTPForbidden exception (#35466) 2020-05-11 10:39:20 -07:00
Eerovil
3de4bc56b5 Add cast app media (#35114)
* Extend media_play for media_type cast
2020-05-11 19:22:26 +02:00
Jason Hunter
132bb4e890 ONVIF Event Implementation (#35406)
Initial implementation of ONVIF event sensors
2020-05-11 13:12:12 -04:00
shbatm
9eb1505aa1 Add Device and Integration Services to ISY994 (#35467)
* ISY994 Add Services

ISY994 Add support for climate platform

* Remove device registry cleanup

Remove device registry cleanup from service in favor of #35106

* ISY994 Update Services Definitions

Rename entry to config_entry_id

* Grammar corrections

Fix Typo

* Add await and lower logging per review.

* Rename to entries and remove unused device_id refs

* Fix tuple typo

* Fix Typo in strings

* Fix typo in strings
2020-05-11 10:58:58 -05:00
J. Nick Koston
0a9b373edb Show device details in homekit accessory service info (#35100)
* Show device info in homekit accessory service info

* fix conflict
2020-05-11 09:09:48 -05:00
Fredrik Erlandsson
6d9f561853 Use config flow base strings (#35494) 2020-05-11 15:22:37 +02:00
J. Nick Koston
31ee54c133 Ensure homekit camera stream can be restarted after failure (#35384)
* Ensure camera stream can be restarted after failure

* If ffmpeg failed to start, was killed, or the iOS device
closed the stream right away, the stream could never
be started until the HomeKit bridge was restarted.

* watch ffmpeg instead of checking only once

* handle forceful shutdowns gracefully

* Increase coverage
2020-05-11 08:17:10 -05:00
ollo69
f4e4ea10e5 Minor Tuya Fix (#35497) 2020-05-11 08:45:12 -04:00
Paulus Schoutsen
c401949af8 Handle error fetching available account link services (#35485) 2020-05-11 08:09:44 -04:00
Florian Klien
f4ab5ee54f Upgrade slixmpp library to 1.5.1 (#35495) 2020-05-11 14:00:42 +02:00
Xiaonan Shen
5d8e6d5432 Fix light toggle service attributes (#35483) 2020-05-11 12:58:59 +02:00
Raman Gupta
823a44cd23 Use common strings and fix key name for error in vizio (#35487)
* use common strings where applicable and fix key name for error

* add additional key reference

* update access token reference
2020-05-11 11:26:31 +02:00
MatsNl
717c55d1f5 Correctly handle failed Atag update in coordinator (#35473)
* delay loading configentry if update failed

* raise updatefailed on empty atagreply

* Update __init__.py

Co-authored-by: Boris Nelissen <borisnelissen91@gmail.com>
2020-05-11 11:09:43 +02:00
jjlawren
1e00fc2af7 Change unique_id for webostv (#34979)
* Revert #34656

* Use pairing key as unique_id
2020-05-11 11:09:16 +02:00
Chris Aljoudi
d072091926 Add lutron_caseta config entries (#34133)
* lutron_caseta: allow for multiple bridges; use config entries

Refactor to use config entries/flows, but only implemented import
(async_setup) flow handler for now.

* lutron_caseta: config_flow.py pylint hint

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

* lutron_caseta: tweaks to __init__.py per PR feedback

* lutron_caseta: add config_flow tests

* lutron_caseta: verify connectivity to bridge

check connectivity before creating config entry; cleanup translation/strings

* lutron_caseta: allow for multiple bridges; use config entries

Refactor to use config entries/flows, but only implemented import
(async_setup) flow handler for now.

* lutron_caseta: config_flow.py pylint hint

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

* lutron_caseta: tweaks to __init__.py per PR feedback

* lutron_caseta: add config_flow tests

* lutron_caseta: verify connectivity to bridge

check connectivity before creating config entry; cleanup translation/strings

* lutron_caseta: add error logging when exception is encountered checking connectivity

* lutron_caseta: tests mock bridge creation, not ha-side connectivity check

* lutron_caseta: catch more specific Error types while checking bridge conn.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-11 11:05:13 +02:00
Paulus Schoutsen
9d83059f14 Allow zeroconf instance sharing (#35484) 2020-05-10 22:51:23 -07:00
cgtobi
8b9bd67da7 Bump pyatmo version to 3.3.1 (#35476) 2020-05-10 22:18:53 -07:00
J. Nick Koston
742e36ba26 Reduce context switching in homekit state updates (#35147) 2020-05-10 22:10:08 -07:00
J. Nick Koston
2e018ad841 Make homekit camera snapshots HAP spec compliant (#35299) 2020-05-10 22:09:05 -07:00
J. Nick Koston
87e0f04515 Fix exception in hunterdouglas_powerview with ignored config entry (#35482) 2020-05-10 22:06:31 -07:00
Chris Talkington
a6d587b6cd Update roku supported features to VOLUME_STEP (#35481) 2020-05-10 22:06:10 -07:00
Chris Talkington
facb115f14 Use common strings for directv config flow (#35471) 2020-05-10 21:14:26 -07:00
ollo69
b3ee54b124 Add config flow for Tuya (#35422)
* Added Tuya config flow

* Added test config_flow

* Fixed log error message

* Add test requirements

* Lint Fix

* Fix Black formatting

* Added pylint directive

Added pylint:disable=unused-import in config_flow.py

* Implementation requested changes

* Update CodeOwners

* Removed device registry cleanup

* Force checks

* Force checks

* Fix implemetation

- Set config schema "deprecated"
- Removed async from update_callback

* Updating test

* Fix formatting

* Config Flow test fix

- mock out async_setup and async_setup_entry

* Fix formatting
2020-05-10 22:01:00 -05:00
Chris Talkington
c69d4943a5 Update rokuecp to 0.4.0 (#35436) 2020-05-11 01:56:38 +02:00
J. Nick Koston
497c01c651 Make homekit TV media players aware of STATE_STANDBY (#35282)
This was previously added to non-TV media players.
2020-05-10 17:35:54 -05:00
J. Nick Koston
70b29dc823 Make interface_choice option effective (#35444)
I missed the second commit that actually makes this
work in the original merge.
2020-05-10 14:30:54 -05:00
Daniel Høyer Iversen
e4263afd64 Open garage, move code to an external library. (#35462)
* Move opengarage code to separate library

* Move opengarage code to separate library

* Move opengarage code to separate library

* remove unique_id

* style
2020-05-10 14:30:16 -05:00
J. Nick Koston
a73440ebe8 Remove constants from myq that are now upstream (#35463) 2020-05-10 20:42:28 +02:00
Greg
f4168a0e07 Bump envoy_reader version (#35465) 2020-05-10 20:04:12 +02:00
Andreas Oberritter
4430b50fd7 Whitelist edl21 negative active energy sensors (#34662)
* edl21: whitelist negative active energy

* edl21: Fix a new comment
2020-05-10 11:52:42 -05:00
guillempages
f09a20b66d Add names for the homematic garage door states (#35349)
* Add names for the homematic garage door states

* Use None instead of "unknown"

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-05-10 18:10:02 +02:00
Thomas Hollstegge
8f285c15d3 Listen for group member state changes when using expand in templates (#35398)
* Re-evaluate template on group member state change

* Use named groups for entity extraction regex

This will avoid unnecessary edits of match indices if the regex is
amended in the future

* Improve test coverage
2020-05-10 10:48:56 -05:00
Robert Svensson
c71b6c8a71 UniFi - Update device registry after device has been upgraded (#35430)
* Update device registry if received event saying device has been updated

* Make sure event was the last updated
2020-05-10 17:14:45 +02:00
Franck Nijhof
4395fe9298 Remove logo & icon from manifest (#35410) 2020-05-10 11:10:44 -04:00
shbatm
799cdbe64d Add support for ISY994 Variables as Sensors (#35453)
* Update tests, add missing constant

* ISY994 Add support for ISY Variables as sensors
2020-05-10 09:40:19 -05:00
Daniel Høyer Iversen
f302c6fd65 Add Mill config flow (#35136)
* Mill config, wip

* add tests

* fix merge

* update tests

* unique id

* Mill strings

* mill config flow

* mill config flow

* test import

* test import

* req

* ccoverage

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* style

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* update strings

* add test

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-05-10 08:44:05 -05:00
Xiaonan Shen
8050d8555e Fix roomba bin full binary sensor (#35443) 2020-05-10 14:10:03 +02:00
mlemainque
08087b0f99 Fix Daikin power sensors (#35428)
* Fix factory class not defined for SENSOR_TYPE_ENERGY

* Round power sensors' state
2020-05-10 14:08:19 +02:00
gadgetmobile
9e3a8899c8 Increase coverage and cleanup BleBox cover (#35369)
* increase coverage and cleanup BleBox cover

* test entity properites via the `state` property

* properly test entity properities

* properly mock io call
2020-05-10 12:22:26 +02:00
Martin Hjelmare
b4142fc7ee Add const module to oauth2 scaffold template (#35438)
* Add const module to oauth2 template

* Remove const append

* Add domain to const
2020-05-10 12:10:09 +02:00
Pieter Goetschalckx
02a36a9b68 Add min_mireds and max_mireds to MQTT Light (#32613)
* Add min_mireds and max_mireds to MQTT Light

* Add abbreviations for min_mireds and max_mireds

* Add tests for min_mireds and max_mireds
2020-05-10 09:34:48 +02:00
shbatm
8947ce5053 Add Climate Platform Support to ISY994 (#35440)
* ISY994 Add support for climate platform

Remove services from Climate (not added yet)

* Incorporate suggestions based on review.

* Collect string literals to Const. Rename device to entity

* Fix merge error
2020-05-09 22:03:05 -05:00
Steven Looman
a97460d1ab Make upnp update interval configurable (#35298)
* Simplification of upnp component

* Make update interval configurable

* Description

* Require minimal value of 30

* Black

* Linting

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-09 21:52:08 -05:00
Xiaonan Shen
8994931ec4 Songpal code and test improvement (#35318)
* Use tests.async_mock instead of asynctest

* Remove unnecessary existence check

* Improve songpal service registering

* Add tests

* Seperate device api from entity api

* Improve disconnect log messages

* Improve tests

* Rename SongpalDevice to SongpalEntity

* Improve reconnecting

* Remove logging and sleep patch from tests

* Test unavailable state when disconnected

* Rename SongpalEntity.dev to _dev

* Add quality scale to manifest
2020-05-09 22:30:34 -04:00
Thomas Hollstegge
3af3900581 Kodi: Correctly report media content type for PVR channels (#35091) 2020-05-09 22:25:52 -04:00
fredericvl
da0ff8d8c4 Only add SAJ sensors that are enabled and available (#34978)
* Bump pysaj to 0.0.16

* Only add SAJ sensors that are enabled/available
2020-05-09 22:23:57 -04:00
Willem-Jan
cf30895460 Add BSBLan Climate integration (#32375)
* Initial commit for BSBLan Climate component

The most basic climate functions work.

* Delete manifest 2.json

wrongly added to commit

* fix incorrect name

current_hvac_mode

* update coverage to exclude bsblan

* sorted and add configflow

* removed unused code, etc

* fix hvac, preset  mix up

now it sets hvac mode to none and preset to eco

* fix naming

* removed commented code and cleaned code that isn't needed

* Add test for the configflow

* Update requirements

fixing some issues in bsblan Lib

* Update coverage file to include configflow bsblan

* Fix hvac preset is not in hvac mode

rewrote how to handle presets.

* Add passkey option

My device had a passkey so I needed to push this functionality to do testing

* Update constants

include passkey and added some more for device indentification

* add passkey for configflow

* Fix use discovery_info instead of user_input

also added passkey

* Fix name

* Fix for discovery_info[CONF_PORT] is None

* Fix get value CONF_PORT

* Fix move translation to new location

* Fix get the right info

* Fix remove zeroconf and fix the code

* Add init for mockConfigEntry

* Fix removed zeroconfig and fix code

* Fix changed ClimateDevice to ClimatEntity

* Fix log error message

* Removed debug code

* Change name of device.

* Remove check

This is done in the configflow

* Remove period from logging message

* Update homeassistant/components/bsblan/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add passkey

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-09 22:16:21 -04:00
Brynley McDonald
e2b622fb78 Add Flick Electric NZ integration (#30696)
* Add integration for Flick Electric NZ

* Start adding Config Flow and external API

* Second Wave of Config Flow and API implementation

* Fix test (errors is None instead of blank array?)

* Don't update sensor if price is still valid

* Add input validation

* Fix linting for DOMAIN

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

* Remove platform schema (config is by entries only)

* Don't catch AbortFlow exception

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

* Update test

* Re-arrange try-catch in config flow

* Fix linting in sensor.py

* Staticly define list of components

* Fix test exceptions

* Fix _validate_input not being awaited

* Fix tests

* Fix pylint logger

* Rename test and remove print debug

* Add test for duplicate entry

* Don't format string in log function

* Add tests __init__ file

* Remove duplicate result assignment

* Add test for generic exception handling

* Move translations folder

* Simplify testing

* Fix strings/translation

* Move to "flick_electric" as domain

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-09 22:13:06 -04:00
shbatm
0cf1ca7736 Add Device Registry support and Device Info for ISY994 (#35435)
* ISY994 Add device info properties

* Fix test string literal per review.

* Change Mfr ID to Devtype_gen
2020-05-09 19:48:51 -05:00
Chris Talkington
0fabd73ad4 reduce roku scan interval by 10s (#35433) 2020-05-09 17:55:23 -05:00
Paulus Schoutsen
42fc332123 Fix scaffold and hassfest references (#35431) 2020-05-09 15:50:44 -07:00
J. Nick Koston
a17ab612ad Fix permissions on bluetooth_le_tracker (#35432) 2020-05-09 16:40:27 -05:00
Chris Talkington
96d2b8cdf6 Update rokuecp to 0.3.2 (#35429)
* update rokuecp to 0.3.1

* Update rokuecp to 0.3.2
2020-05-09 16:26:54 -05:00
Chris Talkington
06ddda8c95 Improve roku remote (#35419)
* Update remote.py

* Create test_remote.py

* Update .coveragerc
2020-05-09 16:04:37 -05:00
Zack Arnett
2148f63d89 Activate Calendar Panel (#35276) 2020-05-09 23:00:28 +02:00
Bram Kragten
c20a9a1ff4 Updated frontend to 20200509.0 (#35427) 2020-05-09 23:00:14 +02:00
Robert Svensson
2f5c4b81ba UniFi - Use more common strings for config flow (#35399)
* Use more common strings for config flow

* Remove unused strings
2020-05-09 22:22:53 +02:00
guillempages
c8cce7607c Add battery information to BLE devices (#33222)
* Add battery information to BLE devices

* Check Bluetooth LE battery at most once a day
2020-05-09 15:18:35 -05:00
shbatm
d7f736ed6c Add config flow, use async loading, and restore brightness option to ISY994 (#35413)
* ISY994 Add Config and Options Flow


Add tests for config flow


Fix test


Update Tests

* Fix merge errors

* Update homeassistant/components/isy994/strings.json

Co-authored-by: J. Nick Koston <nick@koston.org>

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fix patching in tests to not actually start Home Assistant

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-09 14:49:00 -05:00
Chris Talkington
d61bde6ae6 Update rokuecp to 0.2.3 (#35420)
* Update requirements_all.txt

* Update requirements_test_all.txt

* Update manifest.json
2020-05-09 13:23:03 -05:00
Alexei Chetroi
85f129492a Refactor ZHA config flow (#35397)
* Refactor ZHA config flow

Present more descriptive list of radio types when user has to pick one.

* Update docstring.

* Add some common models to EZSP radio.

* Add more model names

More model names, less english since radio types won't be translated.
2020-05-09 09:44:19 -04:00
Ville Skyttä
b4404b071f Pylint cleanups (#35409)
* Avoid some outer name redefinitions

* Remove unneeded directives

* Narrow directive scope

* Don't disable redefined-variable-type
2020-05-09 14:08:40 +03:00
thecode
c37100299a Add service to turn on the switcher device with timer (#33235)
* Update services.yaml

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update homeassistant/components/switcher_kis/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update __init__.py

* Update services.yaml

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-09 12:40:01 +02:00
jjlawren
e78ceab560 Wrap Plex property that can make I/O requests (#35383)
* Wrap property that sometimes makes I/O requests

* Simpler solution

* Combine into single function
2020-05-09 10:59:34 +02:00
Chris Talkington
7da41a6e86 Update rokuecp to 0.2.2 (#35404)
* Update requirements_all.txt

* Update requirements_test_all.txt

* Update manifest.json
2020-05-09 00:24:35 -05:00
Glenn Waters
9353169203 Universal Powerline Bus Scene support (#35401)
* Universal Powerline Bus Scene support.

* Omint UPB scene.py

* Fix lint errors, rename .translations, Light->LightEntity.

* Add rounding to brightness to percent calcs.
2020-05-08 21:42:23 -05:00
Chris Talkington
e90feb1d59 Update rokuecp to 0.2.1 (#35400)
* Update requirements_all.txt

* Update requirements_test_all.txt

* Update manifest.json

* Update __init__.py
2020-05-08 19:29:48 -05:00
Robert Svensson
b62c7abc5d UniFi - Additional consolidation for cleanliness sake (#35395)
* Some additional consolidation for cleanliness sake

* Remove unnecessary mac property
2020-05-09 00:34:18 +02:00
David Nielsen
953adc105e Upgrade bravia-tv backend to 1.0.4 (#35393) 2020-05-09 00:23:33 +02:00
shbatm
e65f72f2ed Improve ISY994 Z-Wave and binary sensor device sorting (#35391)
* Split BinarySensor Entity

* Fix Device Class for Insteon

* ISY994 Improved device sorting (incl Z-Wave Cats) post-PyISYv2

- Z-Wave device classification using new properties.
    - ISY Z-Wave Devices can be classified by their Z-Wave categories, since `node_def_id` does not provide useful information for these nodes.
- Better classification of binary_sensors.
    - Incorporate better classifications of different types of binary_sensor devices supported by the ISY. These are all field tested/requested based on the HACS-ISY994 version and feedback given through the Community.
- State Unknown updates for binary_sensors.
    - Properly fix unknown states on startup for binary_sensors with multiple sub-nodes that don't report the status after an ISY restart until that subnode is activated/triggered the next time. Now instead of adding nodes as unknown status, it adds them in the "assumed safe" state (usually off). This his helpful for things like motion sensor low battery nodes, which may show "unknown" for 12 months before turning "ON" (low batt).
- Fix for heartbeat devices (home-assistant/core#21996)
    - Heartbeat devices toggle between both DON and DOF commands, each day when it sends the heartbeat it sends the opposite. Update heartbeat nodes to look for both.

* Additional sorting fixes
2020-05-08 17:18:50 -05:00
Franck Nijhof
4cf186a47e Small collection of random styling tweaks, fixes and Pythonism (#35390) 2020-05-09 00:10:17 +02:00
Chris Talkington
3feb55a8e4 Make roku async (#35104)
* Update manifest.json

* work on roku async.

* Update config_flow.py

* Update __init__.py

* Update media_player.py

* Update media_player.py

* Update __init__.py

* Update __init__.py

* Update media_player.py

* Update media_player.py

* Update remote.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_config_flow.py

* Update media_player.py

* Update remote.py

* Update config_flow.py

* Update test_media_player.py

* Update config_flow.py

* Update test_config_flow.py
2020-05-08 16:44:34 -05:00
Alexei Chetroi
54584e970c Update ZHA zigpy-deconz dependency (#35389) 2020-05-08 17:21:48 -04:00
Robert Svensson
c8deae6445 UniFi - Make clients proper push based (#35273)
* Improve client tracker to be more comprehensible and streamlined
Improve block switches
Improve tests

* Small clean up

* Add descriptions on ssid test

* Improve test

* Make polling default off, only POE clients left to verify

* Minor improvements

* On removal cancel scheduled updates

* POE works without polling now

* Combine else and if to an elif
2020-05-08 22:19:27 +02:00
Glenn Waters
efb52961f0 Add Universal Powerline Bus (#34692)
* Initial version.

* Tests.

* Refactored tests.

* Update requirements_all

* Increase test coverage. Catch exception.

* Update .coveragerc

* Fix lint msg.

* Tweak test (more to force CI build).

* Update based on PR comments.

* Change unique_id to use stable string.

* Add Universal Powerline Bus "link" support.

* Fix missed call.

* Revert botched merge.

* Update homeassistant/components/upb/light.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Three changes.

Update service schema to require one of brightness/brightness_pct.
Fix bug in setting brightness to zero.
Replace async_update_status and replace with async_update.

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-08 15:00:47 -05:00
Franck Nijhof
e3e3a113e9 async_get_url -> get_url (#35382) 2020-05-08 21:53:28 +02:00
Markus Bong
62f2520ee1 Fix devolo switch on and off (#35357)
* use correct API set methods

* add devolo_home_control to coveragerc except config_flow.py
2020-05-08 21:41:56 +02:00
Franck Nijhof
0ac95fbed3 Upgrade pytest to 5.4.2 (#35381) 2020-05-08 19:34:19 +02:00
mlemainque
12caf17848 Add Daikin total/cool/heat power sensors (#34391) 2020-05-08 19:21:24 +02:00
Alexei Chetroi
b844d09797 Bump up zha-device-handlers dependecy for ZHA (#35379) 2020-05-08 10:11:41 -07:00
Robert Svensson
c19b222d5a UniFi - Catch wlan_override without name key (#35366) 2020-05-08 09:51:10 -07:00
jjlawren
ad419911bc Add config option to ignore Plex Web clients (#34708) 2020-05-08 09:49:15 -07:00
Balazs Sandor
c16a18b2bd Update lib zigpy-cc to fix issues (#35364) 2020-05-08 09:47:58 -07:00
Franck Nijhof
e56dd8ed50 Detect use of deprecated base_url (#35353)
* Detect use of deprecated base_url

* Update get_url helper

* Update core migration

* Migrate all tests
2020-05-08 17:52:32 +02:00
sean tearney
1be41b9de8 Add agent_dvr integration (#32711)
* initial

* add missing fixture

* fix mocks

* fix mocks 2

* update coverage

* fix broken sync between agent and integration

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* updates for review

* add back in should poll again

* revert motion detection enabled flag in state attributes

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add is_streaming

* fix is_streaming bug, remove mp4 stream

* cleanup

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-08 09:49:47 -05:00
Markus Bong
3a0d5126ae Update devolo_home_control strings (#35362) 2020-05-08 16:17:10 +02:00
Josef Schlehofer
272ca3de35 Upgrade youtube_dl to version 2020.05.08 (#35376) 2020-05-08 15:59:42 +02:00
Maciej Bieniek
03ac82d440 Remove unused decorator in Airly (#35361) 2020-05-08 15:10:14 +02:00
Jesse Hills
d03d90a955 Fix qBittorrent crash after caught exception (#35355) 2020-05-08 14:56:22 +02:00
Robert Svensson
ddd6b9cff1 Capitalize kane610 in codeowners since scripts are case sensitive (#35375) 2020-05-08 14:14:10 +02:00
Brad Keifer
4663845ebc Add modbus sensor string data_type (#35269)
* modbus sensor: string data_type

Adds support for a string data_type. This allows the reading of holding registers that contain ascii string data

* Add modbus sensor string data_type #35269

Fingers crossed that I am putting these file in the correct location this time

* Delete const.py

* Delete sensor.py

* Add files via upload

* modbus sensor - add string support. Upload from local dev environment

* fix executable stauts

* fix flake8 failure
2020-05-08 11:30:05 +02:00
Jesse Hills
e696c08db0 Rewrite JuiceNet for async and config flow (#34365)
* Add config flow to JuiceNet

* Fix some lint issues

* Fix imports

* Abort on reconfigure / Allow multiple accounts
Abort on bad API token
Fix strings

* Remove unused variable

* Update strings

* Remove import

* Fix import order again

* Update imports
Remove some unused parameters

* Add back ignore

* Update config_flow.py

* iSort

* Update juicenet integration to be async

* Update coverage for juicenet config flow

* Update homeassistant/components/juicenet/entity.py

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Black

* Make imports relative

* Rename translations folder

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-08 00:52:20 -05:00
J. Nick Koston
502afbe9c2 Delete flapping automatic tests (#35356) 2020-05-07 21:25:17 -07:00
shbatm
4ec88b41dc Migrate ISY994 to PyISY v2 (#35338)
* Remove unnecessary pylint exceptions

* Move up some change to binary_sensors and switch. Fix program d.s.a's.

* ISY994 Basic support for PyISYv2

- Bare minimum changes to be able to support PyISYv2.
- Renaming imports and functions to new names.
- Use necessary constants from module.
- **BREAKING CHANGE** Remove ISY Climate Module support.
    - Climate module was retired on 3/30/2020: [UDI Annoucement](https://www.universal-devices.com/byebyeclimatemodule/)
- **BREAKING CHANGE** Device State Attributes use NodeProperty
    - Some attributes names and types will have changed as part of the changes to PyISY. If a user relied on a device state attribute for a given entity, they should check that it is still there and formatted the same. In general, *more* state attributes should be getting picked up now that the underlying changes have been made.
- **BREAKING CHANGE** `isy994_control` event changes (using NodeProperty)
    - Control events now return an object with additional information. Control events are now parsed to the friendly names and will need to be updated in automations.
Remove cast

* PyISY v2.0.2, add extra UOMs, omit EMPTY_TIME attributes

* Fix typo in function doc string.

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-07 23:15:42 -05:00
MatthewFlamm
7ac547a6e0 Enable async_update for entities in NWS (#35048)
* enable async_update for entities

* make platinum

* add manual update test
2020-05-07 22:43:43 -05:00
jjlawren
91730fe6a9 Bump plexwebsocket to 0.0.8 (#35351) 2020-05-07 21:35:28 -04:00
Franck Nijhof
2223592486 Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
Martin Hjelmare
7e4aa2409f Add zwave_mqtt light platform (#35337) 2020-05-07 23:52:54 +02:00
Paulus Schoutsen
4d314ba4df Merge pull request #35335 from home-assistant/rc 2020-05-07 12:33:52 -07:00
Rami Mosleh
97d66c4eb2 Fix Islamic prayer sensor timestamp format (#35243) 2020-05-07 11:50:16 -07:00
João Gabriel
00282dab72 Remove panasonic_viera from legacy discovery (#34909) 2020-05-07 11:50:15 -07:00
Paulus Schoutsen
f726908707 Bumped version to 0.109.6 2020-05-07 10:33:11 -07:00
Quentame
fc7851a98c Fix Synology DSM discovery can't be ignored (#35331) 2020-05-07 10:32:57 -07:00
J. Nick Koston
efb0425602 Update pymyq to 2.0.2 (#35330) 2020-05-07 10:32:57 -07:00
Xiaonan Shen
39fefa49cc Fix roomba 980 position report (#35316) 2020-05-07 10:32:56 -07:00
J. Nick Koston
6146eaa350 Update pymyq to 2.0.2 (#35330) 2020-05-07 10:32:29 -07:00
Quentame
0ed25e9f4e Fix Synology DSM discovery can't be ignored (#35331) 2020-05-07 10:31:35 -07:00
Xiaonan Shen
9d5704307a Fix roomba 980 position report (#35316) 2020-05-07 10:04:13 -07:00
stickpin
a38bb5b33b Add Homekit cameras codecs (#35238)
* Homekit cameras - Add codecs support

* Add valid_codecs + move audio application parameter

* Increase video bufsize

* Increase audio bufsize

* Update config flow to be aware of the copy option

* Add tests for copy video and audio codec

* remove unused from test

* remove unused from test

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-07 09:55:09 -05:00
Markus Bong
5e33842ce0 Add devolo home control (#33181) 2020-05-07 16:08:51 +02:00
Robert Svensson
53f64bae09 UniFi - Make devices proper push based (#35152)
* Make devices proper push based

* Improve tests

* Bump dependency to v21
Update fix from #35295 to use library
2020-05-07 09:58:04 +02:00
Paulus Schoutsen
ef489aad2a Merge pull request #35315 from home-assistant/rc 2020-05-06 22:05:15 -07:00
jjlawren
dfe2a457c0 Handle config with a limited Plex account (#35218) 2020-05-06 18:46:00 -07:00
Paulus Schoutsen
00501019b4 Bumped version to 0.109.5 2020-05-06 18:44:00 -07:00
Paulus Schoutsen
7f1793e6a9 Fix SMS doing I/O in event loop (#35313) 2020-05-06 18:43:42 -07:00
Robert Svensson
6518249470 UniFi - Support SSID filter of SSIDs from access points with extra configuration (#35295) 2020-05-06 18:43:42 -07:00
Aaron Bach
1a52632b68 Broader Notion exception handling (#35265) 2020-05-06 18:43:41 -07:00
escoand
b42590c5a9 Catch samsungtv timeout exception (#35205) 2020-05-06 18:43:40 -07:00
jan iversen
4bf45cd2ea Change Modbus switch to use verify_register when defined (#34679) 2020-05-06 18:43:39 -07:00
jan iversen
36c3c624e7 Add retry on empty modbus messages for serial protocol (#34678) 2020-05-06 18:43:38 -07:00
Paulus Schoutsen
64ce8e970f Fix SMS doing I/O in event loop (#35313) 2020-05-06 18:42:47 -07:00
Aaron Bach
eb826e5956 Fix incorrect device registry call in Notion (#35306) 2020-05-06 18:42:32 -07:00
Paulus Schoutsen
e3ca87bc5a Fix broken CI (#35314) 2020-05-06 18:40:21 -07:00
Aaron Bach
1d6a20228b Add state reproduction to the alert component (#35267) 2020-05-06 17:02:21 -06:00
Xiaonan Shen
33077f0cdd Add config flow support to songpal integration (#34714)
* Add config flow to songpal

* Add config flow to songpal

* Add songpal to migrated service in discovery

* Improve songpal/set_sound_setting service

* Remove songpal config flow from .coveragerc omit

* Bump python-songpal to 0.12 and fix exception handling

* Revert "Improve songpal/set_sound_setting service"

This reverts commit 9be076ab52e21f268322572c36709a17d41db771.

* Code style fix

* Add connections to device_info

* Fix pylint

* Ignore braava tv

* Fix test warning

* Add @shenxn as codeowner

* Remove model from configuration data

* Get name from device in user step

* Add unload entry support

* Delete translations as it will get generated as part of CI

* Code cleanup

* Fix typo

* Remove _show_setup_form

* Change configuration from media_player to songpal

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2020-05-07 00:52:33 +02:00
isk0001y
541b666a86 Reset imap email content state if no email (#35123)
* no-message: If there is no message at all, replace internal state

* Apply proposed change

* apply black
2020-05-07 00:41:56 +02:00
Robert Svensson
5218b23fce UniFi - Support SSID filter of SSIDs from access points with extra configuration (#35295) 2020-05-06 15:35:04 -07:00
Quentame
81651b0b25 Add Synology DSM scan interval option flow (#35183)
* Add Synology DSM scan interval option flow

* Add options tests

* Review: use entry.update_listeners

* Use cv.positive_int

* Try to fix "ValueError: Config entry has already been setup!"

* Fix ValueError
2020-05-07 00:15:49 +02:00
Erik Montnemery
f1ecac92df Fail tests if wrapped callbacks or coroutines throw (#35010) 2020-05-06 14:14:57 -07:00
J. Nick Koston
b35306052d Upgrade zeroconf to 0.26.1 to resolve performance regression (#35291) 2020-05-06 12:39:03 -05:00
Jason Hunter
19734e7b2c Refactor ONVIF (#35222) 2020-05-06 09:29:59 -07:00
Paulus Schoutsen
0b8f8db67b Clean up script for WLED translations (#35260) 2020-05-06 09:28:46 -07:00
J. Nick Koston
3219c380c7 Provide zeroconf option to bind to only the default interface (#35281)
By default zeroconf binds to every interface.
2020-05-06 09:16:59 -05:00
Rami Mosleh
35d8890f4e Fix Islamic prayer sensor timestamp format (#35243) 2020-05-06 15:17:40 +02:00
jan iversen
1b3f9254bc Add retry on empty modbus messages for serial protocol (#34678) 2020-05-06 14:08:43 +02:00
jan iversen
1b02410aa6 Change Modbus switch to use verify_register when defined (#34679) 2020-05-06 14:07:09 +02:00
Fredrik Erlandsson
d8222a8eb6 Update pydaikin to 2.0.0 (#34807) 2020-05-06 13:59:07 +02:00
Alexei Chetroi
c71a7b901f New configuration flow for ZHA integration (#35161)
* Start gateway using new zigpy init.

Update config entry data  import.
Use new zigpy startup.
Fix config entry import without zha config section.
Auto form Zigbee network.

* Migrate config entry.

* New ZHA config entry flow.

Use lightweight probe() method for ZHA config entry validation when
available. Failback to old behavior of setting up Zigpy app if radio lib
does not provide probing.

* Clean ZHA_GW_RADIO

* Don't import ZHA device settings.

* Update config flow tests.

* Filter out empty manufacturer.

* Replace port path with an by-id device name.

* Rebase cleanup

* Use correct mock.

* Make lint happy again

* Update tests/components/zha/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/zha/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/zha/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use executor pool for IO

* Address comments.

Use AsyncMock from tests.

* Use core interface to test config flow.

* Use core interface to test config_flow.

* Address comments. Use core interface.

* Update ZHA dependencies.

* Schema guard

* Use async_update_entry for migration.

* Don't allow schema extra keys.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-06 12:23:53 +02:00
Xiaonan Shen
2581b031d9 Fix fan not checking supported_features (#35248)
* Fix fan not checking supported_features

* Fix pylint

* Fix test

* Code cleanup

* Fix fan demo

* Code style improvement
2020-05-06 09:58:07 +02:00
Paulus Schoutsen
1c5b4dbd97 Add current step that is in progress (#35272) 2020-05-05 21:34:51 -07:00
Bryant Lee
56beec1ce9 Add zwave workaround identification for Kwikset 916 and Kwikset Obsidian (#35277) 2020-05-06 04:39:29 +02:00
Andi
14190bd497 Fix pyload API statusServer doesn't take parameters (#35242)
* pyload API statusServer doesn't take parameters

Remove json payload from API call to statusServer for retrieving current download speed. 
See maintainers message in: pyload/pyload#3622 (comment)

Skip duplicated call to update function.

* Lint sensor.py

remove empty line
2020-05-06 02:35:02 +02:00
jjlawren
740d9c575e Add manual config flow for Plex (#34476) 2020-05-05 15:42:21 -07:00
Paulus Schoutsen
a330eba61c Guard bad entity ID in entity registry (#35271) 2020-05-05 15:07:54 -07:00
Aaron Bach
87d58a544b Broader Notion exception handling (#35265) 2020-05-05 13:56:32 -06:00
Franck Nijhof
9983c43697 Add issue_tracker property to manifest (#35153) 2020-05-05 11:00:00 -07:00
Paulus Schoutsen
4ae31bc938 Clean up device registry if entity registry updates (#35106) 2020-05-05 10:53:46 -07:00
Bram Kragten
2ac29cf1a4 Updated frontend to 20200505.0 (#35253) 2020-05-05 10:42:02 -07:00
gadgetmobile
8e071b69f4 Add BleBox integration (#32664)
Co-Authored-By: J. Nick Koston <nick@koston.org>
2020-05-05 11:29:58 +02:00
David Straub
86d410d863 Add Home Connect integration (#29214) 2020-05-05 11:26:14 +02:00
Paulus Schoutsen
6b9eed5a70 Fix string 2020-05-04 21:31:23 -07:00
shbatm
e45f2cf5a2 ISY994 Structure updates in prep for PyISYv2 (Part 2) (#35225)
- Move core Entity Class definitions to separate file.
- New ISYNodeEntity and ISYProgramEntity base classes.
- Update inheriances on other classes.
- Move helper functions to separate file.
2020-05-04 23:03:12 -05:00
Ziv
710deb8316 Strict creation of the config for dynalite (#34663) 2020-05-04 20:30:24 -07:00
Paulus Schoutsen
34e35f6aa3 Add config flow base strings (#34523) 2020-05-04 20:10:39 -07:00
Paulus Schoutsen
d2179e5321 Merge pull request #35221 from home-assistant/rc 2020-05-04 20:06:57 -07:00
Alexei Chetroi
0e17f619c8 Bump up pyserial dependency (#35201) 2020-05-04 22:33:21 -04:00
Charles Garwood
de636cce6f Add zwave_mqtt sensor platform (#35135)
* Add sensor platform

* Fix signal name

* Add sensor discovery schema

* Add test for disabled entities

* Add test for enabling advanced sensor

* Add additional fake sensors and tests for device classes

* More device class tests

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-04 22:07:29 -04:00
Paulus Schoutsen
f5282bfcf3 remove deprecation 2020-05-04 18:18:15 -07:00
Xiaonan Shen
3f449e1d27 Remove certificate configuration variable from roomba (#35162)
* Remove certificate option from roomba

* Fix roomba test

* Add back certificate with deprecated flag

* Remove invalidation_version
2020-05-04 18:16:16 -07:00
Paulus Schoutsen
d4200b5eb9 Bumped version to 0.109.4 2020-05-04 18:03:16 -07:00
Quentame
222a8bb7be Fix Synology DSM sensor to be False or 0 (#35208) 2020-05-04 18:03:05 -07:00
Diogo Gomes
96576a9775 Fix utility_meter calibration with float values (#35186) 2020-05-04 18:03:05 -07:00
Franck Nijhof
c03e3ce961 Fix UVC doing I/O inside the event loop (#35169) 2020-05-04 18:03:04 -07:00
Franck Nijhof
45d934e64d Fix Canary KeyError: 'ffmpeg_arguments' (#35158) 2020-05-04 18:03:03 -07:00
Quentame
89cbbfc2e5 Bump pyiCloud to 0.9.7 + do not warn when pending devices (#35156) 2020-05-04 18:03:02 -07:00
Paulus Schoutsen
0d8390b9df Hue: Guard for when there is no brightness (#35151) 2020-05-04 18:03:01 -07:00
Joakim Sørensen
ab2c3a2130 Correct typo Asssitant -> Assistant (#35117) 2020-05-04 18:03:00 -07:00
Quentame
d3b6255ffe Fix Synology NAS discovered multiple times (#35094) 2020-05-04 18:02:59 -07:00
Franck Nijhof
a3071571ac Fix UVC doing I/O inside the event loop (#35169) 2020-05-04 18:02:09 -07:00
escoand
f885e97a5b Catch samsungtv timeout exception (#35205) 2020-05-05 02:50:59 +02:00
Diogo Gomes
53c1aba7df Fix utility_meter calibration with float values (#35186) 2020-05-05 02:44:00 +02:00
Paulus Schoutsen
96b84ff348 Fix AdGuard device info (#35217) 2020-05-05 02:30:21 +02:00
shbatm
4be1006b71 ISY994 migration to PyISY v2 (Structure Changes to enable upgrade, Part 1) (#35212)
* ISY994 Structure updates in prep for PyISYv2 (Part 1)

- Correct node categorization.
- Move constants to separate file.
- Consolidate Logging to Constants file.
- Use Home Assistant Constants where possible.
- Use string literals where possible.
- Rename "domain" to "platform" in most places.
- Add additional device support (NODE_FILTER updates).

* Update categorize_programs per review

* add @shbatm as codeowner for ISY994 integration
2020-05-04 19:21:40 -05:00
Greg Thornton
dd715fcc3a Add homekit camera support (#32527)
* Add homekit camera support

* Cleanup pyhapcamera inheritance

* Add camera to homekit manifest

* Use upstream pyhap server handler in homekit

* Remove unused homekit constants

* Fix lint errors in homekit camera

* Update homekit camera log messages

* Black after conflict fixes

* More conflict fixes

* missing srtp

* Allow streaming retry when ffmpeg fails to connect

* Fix inherit of camera config, force kill ffmpeg on failure

* Fix audio (Home Assistant only comes with OPUS)

* Fix audio (Home Assistant only comes with OPUS)

* Add camera to the list of supported domains.

* add a test for camera creation

* Add a basic test (still needs more as its only at 44% cover)

* let super handle reconfigure_stream

* Remove scaling as it does not appear to be needed and causes artifacts

* Some more basic tests

* make sure no exceptions when finding the source from the entity

* make sure the bridge forwards get_snapshot

* restore full coverage to accessories.py

* revert usage of super for start/stop stream

* one more test

* more mocking

* Remove -tune zerolatency, disable reconfigure_stream

* Restore -tune zerolatency

Co-authored-by: John Carr <john.carr@unrouted.co.uk>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-04 19:03:46 -05:00
Erik Montnemery
f9b420a5a5 Make sure MQTT light brightness is not rounded to 0 (#35207) 2020-05-04 15:54:49 -07:00
Quentame
94b6130af6 Fix Synology DSM sensor to be False or 0 (#35208) 2020-05-04 23:19:08 +02:00
Aaron Bach
953228ebd2 Allow use of common entity update service in AirVisual (#35203) 2020-05-04 15:09:09 -06:00
Phil Bruckner
d8ebdda714 Move life360 I/O out of event loop in config flow (#35193) 2020-05-04 14:58:16 -05:00
David F. Mulcahey
8279efc164 Group by endpoints and not by devices for ZHA Zigbee groups (#34583)
* start implementation
* handle members correctly
* fix group member info
* align groupable devices with group members
* handle group endpoint adding and removing
* update add group
* update group and group member
* update create group
* remove domain check
* update test
* remove temporary 2nd groupable device api
* update test
* rename validator - review comment
* fix test that was never running
* additional testing
* fix coordinator descriptors
* remove check that was done twice
* update test
* Use AsyncMock()
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-05-04 15:19:53 -04:00
Paulus Schoutsen
e54e9279e3 Extract instance ID helper from updater (#35043) 2020-05-04 11:23:12 -07:00
Anders Melchiorsen
b3e637ca7a Some Sonos fixes (#35115) 2020-05-04 11:22:47 -07:00
Steven Looman
ee07fac9bc Simplification of upnp component (#35191) 2020-05-04 10:30:43 -07:00
Robert Svensson
c5ce95ff06 UniFi - Improve signalling and handling of adding new entities (#34925)
* Change signalling and handling of adding devices

* Bump aiounifi to v19
Use the proper variable for roamradio
2020-05-04 19:29:49 +02:00
rajlaud
dbf383f713 Squeezebox add query and sync (#31748)
* Add query and sync

* Update description of call_query

* Remove backup files accidentally committed to repo

* Update after pysqueezebox refactor

* Use entity service helper

* Implement suggested changes

* Fix linter error in services.yaml

* Fix long lines in services.yaml
2020-05-04 10:20:21 -04:00
Fabian Affolter
7f2c6b43d2 Upgrade pytz to 2020.1 (#35174) 2020-05-04 15:16:37 +02:00
Xiaonan Shen
de628602c2 Remove certificate configuration variable from roomba (#35162)
* Remove certificate option from roomba

* Fix roomba test

* Add back certificate with deprecated flag

* Remove invalidation_version
2020-05-04 08:28:32 -04:00
Fabian Affolter
5e3555022f Upgrade alpha_vantage to 2.2.0 (#35172) 2020-05-04 08:07:54 -04:00
Fabian Affolter
ad94ccdd6c Upgrade zeroconf to 0.26.0 (#35176) 2020-05-04 08:07:10 -04:00
David Beitey
7a73c6adf7 scrape: extract strings from new non-text tags (#35021)
With the upgrade to beautifulsoup4 to 4.9.0 (#34007), certain tags
(`<style>`, `<script>` and `<template>`) are no longer treated as having
text content (see
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#comments-and-other-special-strings
and reported bug https://bugs.launchpad.net/beautifulsoup/+bug/1868861)
meaning the content of these types of tags became inaccessible to HA.

Where the previous code could access `.text` on the tag, bs4 4.9 now
yields an empty string; these types of tags require accesing `.string`
instead.  This PR checks the tag name (which will aalways be lowercase
given how the parser works;
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#other-parser-problems)
and applies this different access strategy to get the content of the
HTML tag.  All other tags are handled in the original manner.
2020-05-04 10:45:40 +02:00
Josef Schlehofer
49979d0a75 Upgrade cryptography to 2.9.2 (#35084) 2020-05-04 10:38:26 +02:00
Franck Nijhof
96a998ad25 Fix Canary KeyError: 'ffmpeg_arguments' (#35158) 2020-05-04 10:35:40 +02:00
Franck Nijhof
7284f4e7ca Upgrade pyupgrade to v2.3.0 (#35159) 2020-05-04 09:28:20 +02:00
Thomas Hollstegge
c5379a0f35 Improve emulated_hue compatibility with newer systems (#35148)
* Make emulated hue detectable by Busch-Jaeger free@home SysAP

* Emulated hue: Remove unnecessary host line from UPnP response

* Test that external IPs are blocked for config route

* Add another test for unauthorized users

* Change hue username to nouser

nouser seems to be used by the official Hue Bridge v1 Android app and is
used by other projects as well

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-04 00:18:33 -05:00
Andreas Oberritter
73fb57fd32 Support multiple EDL21 meters (#33594)
* edl21: Add 'name' option

* edl21: Include domain and electricity ID in unique ID

As a side-effect, this makes electricity IDs mandatory, i.e. devices
which don't transmit their ID won't register any sensors.

* edl21: Implement upgrade path for unique IDs

* Update homeassistant/components/edl21/sensor.py

Drop DOMAIN from unique ID.

Co-Authored-By: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-03 23:20:00 -05:00
Thomas Hollstegge
e4e89becc6 Return emulated hue id for update requests (#35139)
* Return emulated hue id for update requests

* Emulated Hue: Rename function argument to match its content

* Use HTTP status consts throughout the test

* Use HTTP status consts in UPnP test
2020-05-03 19:27:19 -05:00
Quentame
7e36699aac Bump pyiCloud to 0.9.7 + do not warn when pending devices (#35156) 2020-05-04 01:22:12 +02:00
Paulus Schoutsen
5b7daa9e0c Hue: Guard for when there is no brightness (#35151) 2020-05-03 19:21:10 -04:00
Ron Heft
42750088b9 Add support for refreshing synology_dsm sensors (#35141)
* Add support for refreshing synology_dsm sensors

Now supports `home_assistant.update_entity` service

* Don't immediately update sensors on add

This fixes all sensors being forcefully refreshed when setup.
2020-05-04 01:07:14 +02:00
Franck Nijhof
e7b9cecec9 Upgrade numpy to 1.18.4 (#35150) 2020-05-03 23:50:13 +02:00
Franck Nijhof
540cb6ea5b Upgrade spotipy to 2.12.0 (#35149) 2020-05-03 23:49:36 +02:00
Martin Hjelmare
39431c0764 Add required features to cover service registration (#35073)
* Fix typing in component service method

* Add required features to cover service registration

* Fix template cover tilt features

* Delint template cover tests
2020-05-03 23:21:12 +02:00
Paulus Schoutsen
b90cb09fd1 Add type to device registry (#35095) 2020-05-03 13:56:58 -07:00
J. Nick Koston
6f6c670b3b Make alexa and google aware of DEVICE_CLASS_GATE (#35103) 2020-05-03 13:29:12 -07:00
Paulus Schoutsen
2af984917e Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Michael Bisbjerg
e7fc886992 Simplify MQTT light brightness logic (#35097) 2020-05-03 18:48:24 +02:00
On Freund
90fbb150e7 Use suggestd_value instead of default in Monoprice options flow (#35107) 2020-05-03 15:18:25 +02:00
Daniel Høyer Iversen
5a2528b0f1 Tibber config flow (#34469)
* tibber config, wip

* read config from yaml

* sync requirements

* style

* add model property

* unique id

* unique id

* Tibber config, unique id

* test doc

* tibber config, update title

* append _el_price

* Update homeassistant/components/tibber/__init__.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* unique id

* tibber config flow

* tibber config flow

* fix test for python 3.8

* update test imports

* move _async_current_entries

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-05-03 14:40:19 +02:00
Ben
d644b610b7 Increase surepetcare default timeout (#34944)
* add timeout parameter and increase default timeout

* remove timeout param

* revert BinarySensorDevice to BinarySensorEntity

* make isort happy

* make isort happy - again
2020-05-03 13:58:59 +02:00
On Freund
e0bcd0049c Fix unloading of Monoprice config entries (#35112) 2020-05-03 13:49:18 +02:00
On Freund
a44724fdcc Add codeowner to Monoprice integration (#35111) 2020-05-03 13:45:39 +02:00
Joakim Sørensen
de7f82e18e Correct typo Asssitant -> Assistant (#35117) 2020-05-03 11:36:06 +02:00
Quentame
661656e373 Fix Synology NAS discovered multiple times (#35094) 2020-05-02 22:46:55 -07:00
pdcemulator
f37f488cc3 Add support for influxdb path parameter (#35089) 2020-05-02 22:12:54 -04:00
Steven Looman
6afb42bf7a Improve UPnP configuration flow (#34737) 2020-05-02 18:03:54 -07:00
Martin Hjelmare
aeb891649e Add zwave mqtt (#34987) 2020-05-03 02:54:16 +02:00
ochlocracy
984a2769db Correct error message in Microsoft Face (#35096) 2020-05-02 17:39:51 -07:00
Franck Nijhof
9efca0079c Upgrades requests-mock to 1.8.0 (#35093) 2020-05-02 17:09:44 -07:00
HomeAssistant Azure
78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
Paulus Schoutsen
5f267be1db Merge pull request #35092 from home-assistant/rc 2020-05-02 16:30:19 -07:00
Paulus Schoutsen
cf2e71a530 Fix import 2020-05-02 15:38:24 -07:00
Paulus Schoutsen
ec63ab0639 Bumped version to 0.109.3 2020-05-02 15:00:00 -07:00
J. Nick Koston
bd882fa4e4 Improve stability of homekit media players (#35080) 2020-05-02 14:59:22 -07:00
Ville Skyttä
752679c55d Check isinstance on collections.abc, not typing classes (#35087) 2020-05-02 23:57:48 +02:00
Bram Kragten
a083eb334e Updated frontend to 20200427.2 (#35079) 2020-05-02 14:55:27 -07:00
David Nielsen
4c65c51ede Update bravia-tv to 1.0.3 (#35077) 2020-05-02 14:55:26 -07:00
Quentame
b0dc1fdfad Bump python-synology to 0.8.0 + Fix disk space incorrect sensor type (#35068)
* Fix Synology disk space incorrect sensor type

* Review 1
2020-05-02 14:55:25 -07:00
Xiaonan Shen
69b8032a5a Bump roombapy to 1.5.2 (#35067) 2020-05-02 14:55:25 -07:00
Robert Svensson
2f374abc58 UniFi - Add support for 2.4/5 GHz separated SSIDs (#35062) 2020-05-02 14:55:24 -07:00
Robert Svensson
f445a81a4d UniFi - Catch controllers running on UniFi OS that don't have a local user configured (#35060) 2020-05-02 14:55:23 -07:00
Quentame
002a8f4900 Bump python-synology to 0.7.4 (#35052) 2020-05-02 14:55:22 -07:00
Paulus Schoutsen
93631341a5 Bump hass-nabucasa to 0.34.2 (#35046) 2020-05-02 14:55:21 -07:00
Aaron Bach
6a5f9d74f5 Fix Canary doing I/O in the event loop (#35039) 2020-05-02 14:55:20 -07:00
Paulus Schoutsen
ed4441a1c2 Fix translation merging for custom components without translations (#35032) 2020-05-02 14:55:19 -07:00
Vilppu Vuorinen
0c5b24a1f5 Fix MELCloud temperature unit (#35003)
The MELCLoud API produces and consumes only Celsius.
2020-05-02 14:55:18 -07:00
Ville Skyttä
43d63d0fe5 Use savoury1/ffmpeg4 PPA on Travis, PyAV 7 needs FFmpeg >= 4 (#35090) 2020-05-02 14:52:29 -07:00
Ville Skyttä
5450cda3a5 Async vs sync inheritance mismatch fixes (#35088) 2020-05-02 14:35:55 -07:00
Robert Svensson
a2048b4c7a UniFi - Catch controllers running on UniFi OS that don't have a local user configured (#35060) 2020-05-02 14:16:45 -07:00
Robert Svensson
221b07595f UniFi - Add support for 2.4/5 GHz separated SSIDs (#35062) 2020-05-02 14:16:18 -07:00
J. Nick Koston
4de30ca2ce Improve stability of homekit media players (#35080) 2020-05-02 14:15:44 -07:00
Robert Van Gorkom
ab08c1bef8 Fix vera config ids not being converted to integers (#35070) 2020-05-02 14:10:49 -07:00
Bram Kragten
88b7aba1c8 Updated frontend to 20200427.2 (#35079) 2020-05-02 21:55:11 +02:00
Josef Schlehofer
37f3613704 Upgrade youtube_dl to version 2020.05.03 (#35078) 2020-05-02 21:24:56 +02:00
David Nielsen
9b59ef4fc9 Update bravia-tv to 1.0.3 (#35077) 2020-05-02 21:21:57 +02:00
Quentame
e602de55ac Bump python-synology to 0.8.0 + Fix disk space incorrect sensor type (#35068)
* Fix Synology disk space incorrect sensor type

* Review 1
2020-05-02 20:31:15 +02:00
mhorst314
2f31b8576e Fix proliphix (#34397)
* Retrieve the name of the Proliphix thermostat before adding the entities

* The proliphix module provides hvac_state, not hvac_mode

* Removed update before add_entities. Moved the setting of the name into the update function instead.

* Disentangled hvac_mode and hvac_action

* Ran black and isort
2020-05-02 20:30:31 +02:00
unixko
8c84e47c94 added abbreviation for temperature_unit (#35076)
Added temp_unit for temperature_unit.
2020-05-02 19:59:23 +02:00
Xiaonan Shen
5a7d38b28c Bump roombapy to 1.5.2 (#35067) 2020-05-02 11:19:39 -05:00
Paulus Schoutsen
0519b96bec Add scene to default config (#35058) 2020-05-02 09:49:52 +02:00
Aaron Bach
d9b9a004d2 Fix Canary doing I/O in the event loop (#35039) 2020-05-01 21:01:29 -07:00
J. Nick Koston
963236916c Fix another race in august tests (#35054) 2020-05-01 21:01:15 -07:00
Paulus Schoutsen
187392deec Bump hass-nabucasa to 0.34.2 (#35046) 2020-05-01 21:00:45 -07:00
J. Nick Koston
842e09923a Cleanup homekit strings spacing (#35056) 2020-05-01 22:34:43 -05:00
HomeAssistant Azure
f4f2aff5b6 [ci skip] Translation update 2020-05-02 00:04:57 +00:00
Quentame
dff2ee2156 Bump python-synology to 0.7.4 (#35052) 2020-05-02 01:31:39 +02:00
Teemu R
ecdcfb835d Add yeelight meteorite (YLDL01YL, ceiling10) (#35018) 2020-05-01 13:00:44 -06:00
Franck Nijhof
e1ae455f1d Fix ONVIF YAML import (#35035) 2020-05-01 20:35:30 +02:00
Paulus Schoutsen
b3201523aa Fix translation merging for custom components without translations (#35032) 2020-05-01 11:34:09 -07:00
Teemu R
9436645648 Fix songpal on devices where source!=uri (#34699) 2020-05-01 19:43:30 +02:00
Mich-b
a65e656c03 Add more SNMP variable types (#33426)
* added support for more SNMP variable types

* Fix SNMP pull request formatting

* retry fix linting errors

* Created SNMP vartype dict

* Moved to Integer instead of Integer32 as default vartype

* Update homeassistant/components/snmp/switch.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/snmp/switch.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/snmp/switch.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-01 19:31:39 +02:00
Aaron Bach
8661cf463a Update AirVisual to use DataUpdateCoordinator (#34796)
* Update AirVisual to use DataUpdateCoordinator

* Empty commit to re-trigger build

* Don't include history or trends in config flow

* Code review
2020-05-01 11:29:58 -06:00
J. Nick Koston
e6be297fba Bump HAP-python to 2.8.3 (#35023)
* Fixes camera support
2020-05-01 11:03:20 -05:00
Erik Montnemery
2b13a8cde4 Include QoS and retain in MQTT debug info (#35011) 2020-05-01 08:41:57 -07:00
Markus Breitenberger
ea70d71e8f Use pulsectl library for PulseAudio connection (#34965)
Get rid of internal library code and use pulsectl library to communicate
with PulseAudio server.

This is a breaking change as the library uses the much more powerful
native interface instead of the CLI interface, requiring the need to
change the default port.

On the bright side, this also solves some issues with the existing
implementation:

  - There was no test if the complete list of loaded modules was
    already received. If not all data could be read at once, the
    remaining modules not yet in the buffer were considered absent,
    resulting in unreliable behavior when a lot of modules were loaded
    on the server.

  - A switch could be turned on before the list of loaded modules was
    loaded, leading to a loopback module being loaded even though this
    module was already active (#32016).
2020-05-01 16:46:36 +02:00
Franck Nijhof
8c65062271 Several optimizations to automations (#35007) 2020-05-01 16:37:25 +02:00
Erik Montnemery
f3d79104a7 Rename WaterHeaterDevice to WaterHeaterEntity (#34675)
* Rename WaterHeaterDevice to WaterHeaterEntity

* Fix stale name

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-01 16:29:14 +02:00
Franck Nijhof
1cfa46d80b Fix CI, incomplete change in melcloud (#35016) 2020-05-01 15:56:38 +02:00
Xiaonan Shen
be58c4f71a Fix unknown exception being caught (#35005) 2020-05-01 13:34:29 +02:00
Vilppu Vuorinen
66d3832be9 Fix MELCloud temperature unit (#35003)
The MELCLoud API produces and consumes only Celsius.
2020-05-01 13:33:46 +02:00
Franck Nijhof
02cca1a4da Merge pull request #35001 from home-assistant/rc 2020-05-01 10:35:19 +02:00
Guillaume DELVIT
8ec5e53cf4 Add full options to serial sensor platform (#34962)
Improve Serial sensor platform with full options for configuring the serial port.
bytesize, parity, stopbits, xonxoff, rtscts, dsrdtr.

The default values are unchanged so it is 100% compatible with previous config.
2020-05-01 10:29:22 +02:00
Vilppu Vuorinen
a2896b4764 Add flow and return sensors for MELCloud ATW device (#34693) 2020-05-01 08:56:03 +02:00
Paulus Schoutsen
421ebb087b Fix pylint CI 2020-04-30 23:50:16 -07:00
Jason Hunter
850b5cb02b Config flow for ONVIF (#34520) 2020-04-30 23:15:40 -07:00
Paulus Schoutsen
7e47481676 Fix MQTT test 2020-04-30 22:55:59 -07:00
Paulus Schoutsen
837b1384af Bumped version to 0.109.2 2020-04-30 22:41:44 -07:00
Paulus Schoutsen
af5cdc1f65 Lint roomba (#35000) 2020-04-30 22:41:37 -07:00
Xiaonan Shen
bc9125666f Fix roomba not reporting error (#34996) 2020-04-30 22:41:36 -07:00
Austin Mroczek
b01131ab9d Add allow extra to totalconnect config schema (#34993) 2020-04-30 22:41:35 -07:00
J. Nick Koston
b8070567bf Log the rachio webhook url (#34992) 2020-04-30 22:41:34 -07:00
Robert Svensson
77d89d13b6 UniFi - Disconnected clients wrongfully marked as wired not created (#34986) 2020-04-30 22:41:34 -07:00
Chris Talkington
12119f89e5 Support num_repeats for directv remote (#34982) 2020-04-30 22:41:20 -07:00
Chris Talkington
3a4b8625bd Support num_repeats for roku remote (#34981) 2020-04-30 22:40:26 -07:00
J. Nick Koston
42dd3ba748 Fix restoring isy994 brightness with no previous state (#34972) 2020-04-30 22:39:02 -07:00
J. Nick Koston
de18207ca3 Fix preservation of homekit fan speed on toggle (#34971) 2020-04-30 22:37:57 -07:00
Erik Montnemery
b68228c7e8 Fix MQTT debug info for same topic (#34952) 2020-04-30 22:37:56 -07:00
Maciej Bieniek
9ccd56c019 Bump brother to 0.1.14 (#34930) 2020-04-30 22:37:56 -07:00
Raman Gupta
4d49fe6b93 Don't attempt to set Vizio is_volume_muted property if Vizio API doesn't provide muted state (#34782) 2020-04-30 22:37:55 -07:00
J. Nick Koston
e7157f2164 Fix restoring isy994 brightness with no previous state (#34972) 2020-04-30 22:36:01 -07:00
J. Nick Koston
af62660b14 Attempt to fix flapping august lock test (#34998) 2020-04-30 22:35:23 -07:00
Erik Montnemery
82a478e2fb Fix MQTT debug info for same topic (#34952) 2020-04-30 22:34:44 -07:00
Robert Svensson
72e7beeb76 UniFi - Add simple options flow (#34990) 2020-04-30 22:33:22 -07:00
Paulus Schoutsen
03bb2a68b3 Lint roomba (#35000) 2020-04-30 22:27:34 -07:00
Paulus Schoutsen
8f9467492d Remove some passings of loop (#34995) 2020-04-30 21:34:51 -07:00
Xiaonan Shen
225059f8ea Fix roomba not reporting error (#34996) 2020-04-30 21:13:45 -07:00
Chris Talkington
bb08959131 Support num_repeats for roku remote (#34981) 2020-04-30 21:08:32 -07:00
Chris Talkington
1f66821256 Support num_repeats for directv remote (#34982) 2020-04-30 21:08:15 -07:00
Robert Svensson
7b90cbd2b2 UniFi - Disconnected clients wrongfully marked as wired not created (#34986) 2020-04-30 21:06:16 -07:00
Raman Gupta
3e06e6b4b3 Don't attempt to set Vizio is_volume_muted property if Vizio API doesn't provide muted state (#34782) 2020-04-30 21:05:45 -07:00
J. Nick Koston
793592b2b8 Config flow for homekit (#34560)
* Config flow for homekit

Allows multiple homekit bridges to run

HAP-python state is now stored at .storage/homekit.{entry_id}.state
aids is now stored at .storage/homekit.{entry_id}.aids

Overcomes 150 device limit by supporting
multiple bridges.

Name and port are now automatically allocated
to avoid conflicts which was one of the main
reasons pairing failed.

YAML configuration remains available in order to offer entity
specific configuration.

Entries created by config flow can add and remove
included domains and entities without having to restart

* Fix services as there are multiple now

* migrate in executor

* drop title from strings

* Update homeassistant/components/homekit/strings.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Make auto_start advanced mode only, add coverage

* put back title

* more references

* delete port since manual config is no longer needed

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-30 23:05:06 -05:00
Austin Mroczek
5699cb8a09 Add allow extra to totalconnect config schema (#34993) 2020-05-01 03:35:32 +02:00
J. Nick Koston
a2efc079f1 Add battery sensors to hunterdouglas_powerview (#34917) 2020-04-30 18:25:59 -07:00
J. Nick Koston
cfc0edff6b Log the rachio webhook url (#34992) 2020-04-30 20:41:24 -04:00
J. Nick Koston
208fa84a27 Update excess powerwall logging to be debug (#34994) 2020-04-30 20:40:31 -04:00
João Gabriel
4e55fa6c5c Refactor Remote class in panasonic_viera (#34911) 2020-05-01 02:35:02 +02:00
HomeAssistant Azure
bd72ddda3c [ci skip] Translation update 2020-05-01 00:02:55 +00:00
Paulus Schoutsen
6056753a9c Introduce a singleton decorator (#34803) 2020-04-30 16:47:14 -07:00
Paulus Schoutsen
76f392476b Use a future for mock coro (#34989) 2020-04-30 16:31:00 -07:00
Chris Talkington
ba7391528f Add unique id to esphome config flow (#34753) 2020-04-30 16:24:47 -07:00
J. Nick Koston
799d98eaf0 Cleanup homekit callbacks and jobs (#34975) 2020-04-30 15:49:16 -07:00
Franck Nijhof
928d9ec117 Fix not condition validation and entity/device extraction (#34959) 2020-05-01 00:15:53 +02:00
Martin Hjelmare
6fe00497d6 Fix webhook imports sorting (#34988) 2020-04-30 23:03:54 +02:00
Paulus Schoutsen
ec47216388 Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Daniel Perna
6b16c34fd0 Improve logging for unregistered webhooks (#34882)
* Improve logging for unregistered webhooks

* Address comment, KEY_REAL_IP

* Address comment, read(64)

* Lint
2020-04-30 22:07:07 +02:00
João Gabriel
d4b66717a4 Remove panasonic_viera from legacy discovery (#34909) 2020-04-30 22:04:53 +02:00
Ville Skyttä
435a88636a Address new issues flagged by flake8 3.8.0a2 (#34964) 2020-04-30 21:37:58 +02:00
J. Nick Koston
bf5cc22bef Fix preservation of homekit fan speed on toggle (#34971) 2020-04-30 11:34:25 -07:00
Maciej Bieniek
d43617c41d Bump brother to 0.1.14 (#34930) 2020-04-30 15:43:02 +02:00
alxrdn
55bf5514ad Add overlay options wrapper to rpi_camera (#34461)
* add overlay options wrapper to rpi_camera

* Refactor to set config yaml section under the top level integration domain key

* Remove return values that are not checked

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

* Remove superfluous debug log messages

* Return if not set up via discovery

* Add convenience reference to hass.data[DOMAIN]

* Black formatting

* Isort

* Exclude all rpi_camera modules

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-30 15:30:37 +02:00
Thomas Le Gentil
29a05a6a65 Add fortigate deprecation message (#34854) 2020-04-30 15:08:11 +02:00
Frederik Gladhorn
a65edc8dc1 Fix crash in NAD integration (#34571)
Some amplifiers/receivers do not report any volume (due to them not
knowing), for example NAD C 356BEE is documented to return an empty
string for volume.

At least don't crash when we get None back.
2020-04-30 14:52:53 +02:00
clssn
15b1a9ecea Add numato integration (#33816)
* Add support for Numato 32 port USB GPIO boards

Included are a binary_sensor, sensor and switch component
implementations. The binary_sensor interface pushes updates via
registered callback functions, so no need to poll here.

Unit tests are included to test against a Numato device mockup.

* Refactor numato configuration due to PR finding

* Resolve minor review findings

* Bump numato-gpio requirement

* Load numato platforms during domain setup

According to review finding

* Guard from platform setup without discovery_info

According to review finding

* Move numato API state into hass.data

According to review finding.

* Avoid side effects in numato entity constructors

According to review finding

* Keep only first line of numato module docstrings

Removed reference to the documentation. Requested by reviewer.

* Minor improvements inspired by review findings

* Fix async tests

Pytest fixture was returning from the yield too early executing teardown
code during test execution.

* Improve test coverage

* Configure GPIO ports early

Review finding

* Move read_gpio callback to outside the loop

Also continue on failed switch setup, resolve other minor review
findings and correct some error messages

* Bump numato-gpio requirement

This fixes a crash during cleanup. When any device had a communication
problem, its cleanup would raise an exception which was not handled,
fell through to the caller and prevented the remaining devices from
being cleaned up.

* Call services directly

Define local helper functions for better readability.
Resolves a review finding.

* Assert something in every test

So not only coverage is satisfied but things are actually tested
to be in the expected state.
Resolves a review finding.

* Clarify scope of notification tests

Make unit test for hass NumatoAPI independent of Home Assistant (very basic test of notifications).
Improve the regular operations test for notifications.

* Test for hass.states after operating switches

Resolves a review finding.

* Check for wrong port directions

* WIP: Split numato tests to multiple files

test_hass_binary_sensor_notification still fails.

* Remove pytest asyncio decorator

Apears to be redundant. Resolves a review finding.

* Call switch services directly.

Resolves a review finding.

* Remove obsolete inline pylint config

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

* Improve the numato_gpio module mockup

Resolves a review finding.

* Remove needless explicit conversions to str

Resolves review findings.

* Test setup of binary_sensor callbacks

* Fix test_hass_binary_sensor_notification

* Add forgotten await

Review finding.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-30 14:23:30 +02:00
Pascal Vizeli
becc120ad9 Merge pull request #34922 from home-assistant/rc
0.109.1
2020-04-30 11:00:49 +02:00
Chris Talkington
ade4e36da7 Use entry ID when IPP printer offers no identifier (#34316) 2020-04-30 00:22:05 -07:00
Chris Talkington
b4083dc14f Use entry ID when IPP printer offers no identifier (#34316) 2020-04-30 00:21:53 -07:00
Paulus Schoutsen
38f9559348 Bumped version to 0.109.1 2020-04-30 00:11:31 -07:00
J. Nick Koston
d974e64a8b Make sqlalchemy engine connect listener recorder specific (#34908) 2020-04-30 00:11:21 -07:00
J. Nick Koston
6f20a4a181 Avoid error when battery appears after homekit has started (#34906) 2020-04-30 00:11:20 -07:00
J. Nick Koston
6b2a006fea Fix handling homekit thermostat states (#34905) 2020-04-30 00:11:20 -07:00
jjlawren
88c755518f Reduce log level for WebOS connection error (#34904) 2020-04-30 00:11:19 -07:00
Paulus Schoutsen
e2475e67c6 Fix Toon doing I/O in event loop (#34896) 2020-04-30 00:11:18 -07:00
Paulus Schoutsen
d891810e95 Fix Garmin Connect doing I/O in event loop (#34895) 2020-04-30 00:11:18 -07:00
Aaron Bach
98bff965f5 Fix Flu Near You exception re: stale coroutines (#34880) 2020-04-30 00:11:17 -07:00
J. Nick Koston
d391b87227 Prevent homekit fans from going to 100% than speed when turning on (#34875) 2020-04-30 00:11:16 -07:00
J. Nick Koston
5f7711e7a6 Abort nexia import if the username is already configured (#34863) 2020-04-30 00:11:15 -07:00
Andrew Sayre
3bf1cf4f85 SmartThings continue correct config flow after external auth (#34862) 2020-04-30 00:11:14 -07:00
Pascal Vizeli
6d9aafd3b0 Fix CVE-2020-1967 (#34853) 2020-04-30 00:11:13 -07:00
Maciej Bieniek
81a2fb9615 Reload braviatv entry after options update (#34576)
* Reload entry after options update

* Undo update listener when unloading
2020-04-30 00:11:13 -07:00
jjlawren
f3c6f665af Reduce log level for WebOS connection error (#34904) 2020-04-30 00:10:02 -07:00
J. Nick Koston
e01ceb1a57 Fix handling homekit thermostat states (#34905) 2020-04-30 00:09:33 -07:00
J. Nick Koston
fcd58b7c9b Avoid error when battery appears after homekit has started (#34906) 2020-04-30 00:08:56 -07:00
J. Nick Koston
574d8d30a7 Make sqlalchemy engine connect listener recorder specific (#34908) 2020-04-30 00:08:40 -07:00
J. Nick Koston
8467b91390 Fix async scene conversion in Hunter Douglas Powerview (#34899)
* Fix async scene conversion in hunter douglas powerview

* Update homeassistant/components/hunterdouglas_powerview/scene.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-30 02:32:05 +02:00
HomeAssistant Azure
5d37eb8eeb [ci skip] Translation update 2020-04-30 00:03:17 +00:00
Paulus Schoutsen
7d71a2c979 Fix Toon doing I/O in event loop (#34896) 2020-04-29 16:34:55 -06:00
Paulus Schoutsen
58d9c96b5f Fix Garmin Connect doing I/O in event loop (#34895) 2020-04-29 16:34:24 -06:00
Franck Nijhof
b9f74f3d25 Merge branch 'master' into dev 2020-04-30 00:07:12 +02:00
J. Nick Koston
6c18a2cae2 Config flow for hunterdouglas_powerview (#34795)
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-29 14:24:57 -07:00
Andrew Sayre
6ae7f31947 SmartThings continue correct config flow after external auth (#34862) 2020-04-29 14:05:20 -07:00
J. Nick Koston
97c82089b4 Abort nexia import if the username is already configured (#34863) 2020-04-29 14:02:59 -07:00
J. Nick Koston
6ce0819287 Prevent homekit fans from going to 100% than speed when turning on (#34875) 2020-04-29 14:00:31 -07:00
J. Nick Koston
5516063f46 Prevent tplink tests from doing I/O (#34879) 2020-04-29 13:44:40 -07:00
Aaron Bach
b8a5597d3e Fix Flu Near You exception re: stale coroutines (#34880) 2020-04-29 14:29:44 -05:00
Brian Rogers
481b2035db Clean up Rachio binary sensor init (#34855)
* Update binary sensor

* Move online state to subclass
2020-04-29 11:39:09 -05:00
J. Nick Koston
f656f352a3 Remove side effects from rachio switch init (#34799)
* Remove side effects from rachio switch init

* Remove useless inits
2020-04-29 11:34:45 -05:00
Pascal Vizeli
a6ee2995bc Fix CVE-2020-1967 (#34853) 2020-04-29 18:06:25 +02:00
Maciej Bieniek
58bff0a183 Reload braviatv entry after options update (#34576)
* Reload entry after options update

* Undo update listener when unloading
2020-04-29 09:27:45 -05:00
Franck Nijhof
405062d2df Merge pull request #34850 from home-assistant/rc 2020-04-29 15:50:32 +02:00
Franck Nijhof
50144e883e Bumped version to 0.109.0 2020-04-29 14:15:35 +02:00
Franck Nijhof
e7e0f049d1 Update translations for Islamic Prayer Times 2020-04-29 13:52:10 +02:00
ollo69
15569f1e7f Fix tuya network failure startup (#34057)
* Tuya initialization retry on failure

* Rename exception

* Changed managed exception

* Manage different cases of ConnectionError

* Log messages correction

* Test always catching exceptions

* Update for Lint

* Update tuya library to 0.0.6

- Catch new library exception

* Tuya initialization retry on failure

* Rename exception

* Changed managed exception

* Manage different cases of ConnectionError

* Log messages correction

* Test always catching exceptions

* Update for Lint

* Update tuya library to 0.0.6

- Catch new library exception

* Catch wrong credential

* Revert "Catch wrong credential"

This reverts commit 7fb797de52.

* Catch wrong credential

* Remove trailing whitespace

* Black formatting

* Import Exception from tuyaapi

* Remove str to exception

* Force CI checks

* Force CI checks

* Rebase conflict

* Tuya initialization retry on failure

* Rename exception

* Changed managed exception

* Manage different cases of ConnectionError

* Log messages correction

* Test always catching exceptions

* Update for Lint

* Update tuya library to 0.0.6

- Catch new library exception

* Catch wrong credential

* Revert "Catch wrong credential"

This reverts commit 7fb797de52.

* Tuya initialization retry on failure

* Rename exception

* Changed managed exception

* Catch wrong credential

* Force CI checks

* Force CI checks

* Rebase conflict

* Rebase

* Force Test

* Force Test
2020-04-29 13:46:27 +02:00
Quentame
dad0109eca Bump python-synology to 0.7.3 (#34847) 2020-04-29 13:42:55 +02:00
Rami Mosleh
1e23019df8 Fix Islamic prayer times naming (#34784) 2020-04-29 13:42:50 +02:00
Quentame
2788de9b10 Bump python-synology to 0.7.3 (#34847) 2020-04-29 13:41:37 +02:00
Rami Mosleh
6e0d61e5e8 Fix Islamic prayer times naming (#34784) 2020-04-29 13:38:20 +02:00
Franck Nijhof
0bb83e5b7c Merge branch 'master' into rc 2020-04-29 12:15:16 +02:00
Franck Nijhof
aca1c5a5f8 Update translations for FRITZ!Box 2020-04-29 12:04:53 +02:00
Franck Nijhof
24fd395d09 Bump version to 0.110.0dev0 (#34827) 2020-04-29 08:56:43 +02:00
J. Nick Koston
13f4393042 Fix flapping reload tests (#34837) 2020-04-28 22:58:55 -07:00
HomeAssistant Azure
a3d048e9c0 [ci skip] Translation update 2020-04-28 22:25:55 -07:00
Paulus Schoutsen
66d938fcea Bumped version to 0.109.0b5 2020-04-28 22:24:09 -07:00
Bram Kragten
72d805d458 Updated frontend to 20200427.1 (#34831) 2020-04-28 22:23:56 -07:00
Quentame
1a2e6eae8e Bump python-synology to 0.7.2 (#34830) 2020-04-28 22:23:55 -07:00
Franck Nijhof
d634ed0bbb Fix meteoalarm exception handling with instance of KeyError (#34828) 2020-04-28 22:23:54 -07:00
Franck Nijhof
bdbeb1d68f Fix async call in sync context in steam_online (#34823) 2020-04-28 22:23:54 -07:00
Franck Nijhof
e8314e1d86 Fix sync call in async context generic_thermostat (#34822) 2020-04-28 22:23:53 -07:00
Robert Svensson
bf424caf4a UniFi - Add a second roaming event (#34819) 2020-04-28 22:23:52 -07:00
escoand
996af94bb8 Handle more fritzbox edge cases (#34802) 2020-04-28 22:23:52 -07:00
Chris Talkington
f47055a1b0 Remove legacy discovery for roku (#34794) 2020-04-28 22:23:51 -07:00
Chris Talkington
e416e0a9e9 Remove legacy discovery for directv (#34793)
* remove legacy discovery for directv

* Update __init__.py

* Update __init__.py
2020-04-28 22:23:50 -07:00
Paulus Schoutsen
fd690db01f Disable upnp SSDP discovery (#34756) 2020-04-28 22:23:49 -07:00
escoand
e03df37417 Add unique_id to fritzbox (#34716) 2020-04-28 22:23:48 -07:00
MatsNl
3f232f3dbd Fix atag timezone bug (#34686)
Co-authored-by: Boris Nelissen <borisnelissen91@gmail.com>
2020-04-28 22:23:48 -07:00
Franck Nijhof
942cd7caa5 Fix sync call in async context generic_thermostat (#34822) 2020-04-28 22:21:34 -07:00
Chris Talkington
5a93a6eec4 Remove legacy discovery for directv (#34793)
* remove legacy discovery for directv

* Update __init__.py

* Update __init__.py
2020-04-28 22:21:10 -07:00
Chris Talkington
c56391e972 Remove legacy discovery for roku (#34794) 2020-04-28 22:20:54 -07:00
Bram Kragten
de062bc2a6 Updated frontend to 20200427.1 (#34831) 2020-04-28 22:20:06 -07:00
Robert Svensson
976457ccef UniFi - Add a second roaming event (#34819) 2020-04-28 22:19:55 -07:00
escoand
f64c35c3f9 Handle more fritzbox edge cases (#34802) 2020-04-28 22:17:35 -07:00
J. Nick Koston
592f316b3f Fix race condition in august test under py38 (#34775) 2020-04-28 23:22:33 -05:00
J. Nick Koston
c82ece2721 Fix pylint CI (#34836) 2020-04-28 20:35:04 -05:00
Brendon Go
c695b6f6a5 Remove unnecessary space in greeneye_monitor unique_id (#34834) 2020-04-28 19:27:03 -05:00
Brendon Go
3debb7cdf3 Fix typo in arest sensor (#34833) 2020-04-28 19:25:32 -05:00
Franck Nijhof
79c3148fc0 Fix async call in sync context in steam_online (#34823) 2020-04-29 02:18:15 +02:00
HomeAssistant Azure
7faba60e83 [ci skip] Translation update 2020-04-29 00:03:31 +00:00
Franck Nijhof
b9bd757df1 Fix meteoalarm exception handling with instance of KeyError (#34828) 2020-04-29 01:59:25 +02:00
Frederik Gladhorn
5825cd7868 Fix async_setup type in components/homeassistant module (#34816) 2020-04-29 01:49:43 +02:00
starkillerOG
e46f1b69ba Add Xiaomi miio Alarm Control Panel (#32091)
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2020-04-29 01:44:31 +02:00
Yarmo Mackenbach
26241980d7 Update nederlandse_spoorwegen nsapi to 3.0.4 (#34681)
* NS version bumped to 3.0.4
2020-04-28 17:56:04 -05:00
Yarmo Mackenbach
ed7cacbf92 Removed defunct punctuality from nederlandse_spoorwegen (#34680) 2020-04-28 17:52:27 -05:00
Quentame
a217630fdd Bump python-synology to 0.7.2 (#34830) 2020-04-28 17:23:39 -05:00
J. Nick Koston
2f3bd80de4 Add missing blocks (#34832) 2020-04-28 15:10:23 -07:00
Paulus Schoutsen
0246761f94 Log threading exceptions properly (#34789) 2020-04-28 14:31:35 -07:00
Paulus Schoutsen
87801d8aca Minor helpers cleanup (#34786) 2020-04-28 14:31:25 -07:00
Paulus Schoutsen
28f6e79385 Parallelize collections helper (#34783) 2020-04-28 14:31:16 -07:00
Marcin
893f796df2 deCONZ - device triggers for Aqara Opple switches (#34815)
* Added Aqara Opple device triggers

* Update homeassistant/components/deconz/device_trigger.py

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>

* Update homeassistant/components/deconz/device_trigger.py

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>

* Update homeassistant/components/deconz/device_trigger.py

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>

* Fix flake8

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2020-04-28 22:06:08 +02:00
Paulus Schoutsen
c97ce05b09 Add script to copy backend translations to frontend (#34706) 2020-04-28 10:35:38 -07:00
Paulus Schoutsen
454c5d824a Attempt to fix CI (#34800) 2020-04-28 10:31:22 -07:00
MatsNl
c29c0e7e13 Fix atag timezone bug (#34686)
Co-authored-by: Boris Nelissen <borisnelissen91@gmail.com>
2020-04-28 09:20:04 -05:00
HomeAssistant Azure
e13f78dfc5 [ci skip] Translation update 2020-04-28 00:04:52 +00:00
Joakim Plate
b768c9cc64 Arcam fmj bump library to 0.4.4 (#34687)
* Bump arcam-fmj with better connection failed support

* Log unexpected exceptions in arcam client

* Consider undetected as 2ch to match OSD

* Ask for explicit update on start
2020-04-27 21:57:57 +02:00
escoand
8237ccfa03 Add unique_id to fritzbox (#34716) 2020-04-27 11:18:32 -07:00
HomeAssistant Azure
28a4af89d9 [ci skip] Translation update 2020-04-27 11:05:38 -07:00
HomeAssistant Azure
77cec174b8 [ci skip] Translation update 2020-04-27 11:05:33 -07:00
HomeAssistant Azure
511366f329 [ci skip] Translation update 2020-04-27 11:05:13 -07:00
HomeAssistant Azure
e4d320d5f5 [ci skip] Translation update 2020-04-27 11:05:04 -07:00
Paulus Schoutsen
b8ebb94bc6 Disable upnp SSDP discovery (#34756) 2020-04-27 11:02:25 -07:00
Paulus Schoutsen
d74ece92f9 Validate that discovered config flows set a unique ID (#34751)
Co-Authored-By: Franck Nijhof <git@frenck.dev>
2020-04-27 10:36:56 -07:00
Brian Rogers
360ac7e71f Add Rachio rain delay switch (#34741)
* Add Rachio Rain Delay Switch

* Typo

* Catch KeyError

* Use HA dt module in place of time
2020-04-27 12:23:16 -05:00
Paulus Schoutsen
ed925f9ef5 Set up config entries in parallel (#34755) 2020-04-27 10:05:02 -07:00
Aaron Bach
b876f7f11a Bump simplisafe-python to 9.2.0 (#34750) 2020-04-27 10:41:33 -06:00
Bram Kragten
097b1d112b Bumped version to 0.109.0b4 2020-04-27 15:43:28 +02:00
Bram Kragten
961327f76b Updated frontend to 20200427.0 (#34766) 2020-04-27 15:40:43 +02:00
Quentame
d7fbb8ed8e Bump python-synology to 0.7.1 (#34728) 2020-04-27 15:40:43 +02:00
escoand
79135f59fd Fix fritzbox errors again (#34710) 2020-04-27 15:40:42 +02:00
Bram Kragten
96ef92659f Updated frontend to 20200427.0 (#34766) 2020-04-27 15:38:14 +02:00
rajlaud
5e249aac5f Refactor squeezebox (#34731)
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2020-04-27 12:15:00 +02:00
Pascal Vizeli
be57d45653 Add hadolint to CI (#34758)
* Add hadolint to CI

* Fix lint & name

* Update azure-pipelines-ci.yml

Co-Authored-By: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-04-27 12:09:31 +02:00
Martin Hjelmare
e4590539e1 Make ps4 config flow tests robust (#34749) 2020-04-27 11:36:24 +02:00
Pascal Vizeli
bec8781558 cleanup 2020-04-27 09:19:38 +02:00
Pascal Vizeli
2cae17deb7 Fix dockerfile 2020-04-27 09:14:53 +02:00
Paulus Schoutsen
cc14dfa31c Allow ignoring discovery config flow helper (#34740) 2020-04-26 23:35:04 -07:00
Franck Nijhof
a643d6cd3e Upgrade pytest to 5.4.1 (#34739) 2020-04-26 22:54:39 -07:00
jrester
4b998ea6af Improve error handling for Powerwall (#34580)
* Improve error handling
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/config_flow.py
	modified:   homeassistant/components/powerwall/const.py
	modified:   homeassistant/components/powerwall/strings.json
	modified:   homeassistant/components/powerwall/translations/en.json

* Change exception name
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/config_flow.py

* Add test

* Rename PowerwallError to POWERWALL_ERROR

* Modify handling of APIChangedErrors
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/const.py
2020-04-26 19:14:53 -05:00
HomeAssistant Azure
aa2bfbb541 [ci skip] Translation update 2020-04-27 00:02:20 +00:00
Paulus Schoutsen
13c8c2e841 Add unique ID to TRADFRI (#34745) 2020-04-27 01:57:29 +02:00
Franck Nijhof
de3f0c788c Upgrade pytest-timeout to v1.3.4 (#34609) 2020-04-26 13:56:59 -07:00
Franck Nijhof
22fdccba02 Upgrade pytest-sugar to 0.9.3 (#34726) 2020-04-26 13:54:19 -07:00
Thomas Schamm
b85bd2cb99 Create a unique_id for velux cover (#34668) 2020-04-26 13:54:02 -07:00
Franck Nijhof
b6292d7c77 Upgrade pillow to 7.1.2 (#34733) 2020-04-26 13:53:02 -07:00
Quentame
1c84905bcd Bump python-synology to 0.7.1 (#34728) 2020-04-26 22:25:13 +02:00
rako77
ca6243c18a Add missing typing to Spotify (#34698) 2020-04-26 21:25:58 +02:00
Erik Montnemery
066e921a8b Rename SwitchDevice to SwitchEntity (#34673) 2020-04-26 18:50:37 +02:00
Erik Montnemery
e4333a7a44 Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
escoand
8402363568 Fix fritzbox errors again (#34710) 2020-04-25 23:57:44 -07:00
Aaron Bach
8ff1fc6f8b Bump pyairvisual and remove unused trends (#34707) 2020-04-25 21:30:12 -06:00
Paulus Schoutsen
0c066a0944 Bumped version to 0.109.0b3 2020-04-25 17:30:56 -07:00
Paulus Schoutsen
86ae02e5c5 Add frontend version WS command (#34701) 2020-04-25 17:30:47 -07:00
Quentame
17c31ed640 Fix Synology DSM translation (#34696) 2020-04-25 17:30:46 -07:00
cgtobi
7fa3950001 Fix zero value state rendering sensor unavailable (#34694)
Co-Authored-By: Franck Nijhof <git@frenck.dev>
2020-04-25 17:30:46 -07:00
Joakim Sørensen
9def9464e9 Add retry at startup (#34656) 2020-04-25 17:30:45 -07:00
escoand
f474631ac0 Fix fritzbox integration errors (#34639) 2020-04-25 17:30:44 -07:00
Paulus Schoutsen
f436e29a0d Add frontend version WS command (#34701) 2020-04-25 17:30:15 -07:00
Erik Montnemery
aa60d362fd Rename RemoteDevice to RemoteEntity (#34676) 2020-04-26 02:12:36 +02:00
Erik Montnemery
d3ed80cf53 Rename VacuumDevice to VacuumEntity (#34674) 2020-04-26 02:11:08 +02:00
HomeAssistant Azure
90e0a1af8a [ci skip] Translation update 2020-04-26 00:02:45 +00:00
Pascal Vizeli
9ca2ad53f9 Python 3.8 on CI (#34654) 2020-04-25 16:54:41 -07:00
Paulus Schoutsen
e7f8d6bbf7 Fix more tests on Python 3.8 (#34703) 2020-04-25 15:52:50 -07:00
Joakim Sørensen
5760fb94fe Add retry at startup (#34656) 2020-04-25 15:40:44 -07:00
escoand
147dfa06af Fix fritzbox integration errors (#34639) 2020-04-25 15:40:26 -07:00
Quentame
b44464e0fa Fix Synology DSM translation (#34696) 2020-04-26 00:37:41 +02:00
J. Nick Koston
fd339be458 Add ability to ignore myq discovery (#34652)
* Add ability to ignore myq discovery

* update test

* Update tests/components/myq/test_config_flow.py

Co-Authored-By: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/myq/test_config_flow.py

Co-Authored-By: Chris Talkington <chris@talkingtontech.com>

* reset ci

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-04-25 17:09:08 -05:00
J. Nick Koston
29383f98b5 Add ability to ignore tado discovery (#34650)
* Add ability to ignore tado discovery

* update test

* Update tests/components/tado/test_config_flow.py

Co-Authored-By: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/tado/test_config_flow.py

Co-Authored-By: Chris Talkington <chris@talkingtontech.com>

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-04-25 17:08:53 -05:00
J. Nick Koston
c4c2b4f9da Add ability to ignore rachio discovery (#34649)
* Add ability to ignore rachio discovery

* update test

* Update tests/components/rachio/test_config_flow.py

Co-Authored-By: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/rachio/test_config_flow.py

Co-Authored-By: Chris Talkington <chris@talkingtontech.com>

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-04-25 17:08:37 -05:00
Paulus Schoutsen
0d700f6a63 Fix tests for Python 3.8 (#34672) 2020-04-25 14:32:55 -07:00
cgtobi
d53cb951e7 Fix zero value state rendering sensor unavailable (#34694)
Co-Authored-By: Franck Nijhof <git@frenck.dev>
2020-04-25 22:15:31 +02:00
Erik Montnemery
8c5c963b96 Rename CoverDevice to CoverEntity (#34595) 2020-04-25 18:07:15 +02:00
Erik Montnemery
6f7f5b4034 Rename AlarmControlPanel to AlarmControlPanelEntity (#34590) 2020-04-25 18:05:28 +02:00
Erik Montnemery
29bc93ea98 Rename ClimateDevice to ClimateEntity (#34591) 2020-04-25 18:04:03 +02:00
Erik Montnemery
b30d117e7d Rename LockDevice to LockEntity (#34594) 2020-04-25 18:02:41 +02:00
Erik Montnemery
62bc02fdda Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
Bernhard B
56f7c3b55c Add Signalmessenger group recipients (#34419) 2020-04-25 15:14:19 +02:00
HomeAssistant Azure
5f775c1427 [ci skip] Translation update 2020-04-25 00:08:30 +00:00
Paulus Schoutsen
9a4a83cb91 Fix py38 tests (#34658) 2020-04-24 15:09:45 -07:00
Jason Hunter
40d3d64027 Fix recording duration flag (#34648) 2020-04-24 14:18:58 -07:00
Paulus Schoutsen
77443b3d09 Add Home Assistant Started event (#34657) 2020-04-24 14:13:39 -07:00
Quentame
b741199ed3 Log config flow errors (#34665) 2020-04-24 23:10:57 +02:00
Alexei Chetroi
9994554c56 Update ZHA dependency (#34661)
Bump up zigpy-deconz
2020-04-24 16:29:13 -04:00
Paulus Schoutsen
79fdac6674 Merge pull request #34655 from home-assistant/108.9 2020-04-24 10:59:28 -07:00
Aaron Bach
86d3321d59 Store integration type in AirVisual config entry (#34621) 2020-04-24 10:11:17 -07:00
Chris Talkington
1d22936a82 Restore Expected Behavior of Sonarr Upcoming Sensor (#34408) 2020-04-24 10:09:38 -07:00
Paulus Schoutsen
73535200c2 Bumped version to 0.108.9 2020-04-24 09:56:18 -07:00
Paulus Schoutsen
f3de26444e Delay sync for Google and limit updates to relevant info (#34622) 2020-04-24 09:56:12 -07:00
Paulus Schoutsen
a2fab264c4 Fix identifying Plex schema when used in packages (#34651) 2020-04-24 09:52:23 -07:00
Franck Nijhof
c93c6a66e8 Add NOT condition helper (#34624) 2020-04-24 09:40:23 -07:00
Paulus Schoutsen
6404882ec4 Allow flows to know if user is in advanced mode (#34629) 2020-04-24 09:31:56 -07:00
Ziv
4afa2a2651 Update dynalite library and minor changes (#34618) 2020-04-24 09:30:45 -07:00
J. Nick Koston
71617e8e8b Fix failing vilfo test that was doing i/o (#34647) 2020-04-24 10:55:01 -05:00
Bram Kragten
175204a65e Updated frontend to 20200424.0 (#34645) 2020-04-24 08:40:36 -07:00
Geronimo2015
d416029e82 Add onvif PTZ GotoPreset (#34420)
* Added PTZ GotoPreset support

* Update camera.py

Processed flake8 error

* Update services.yaml

Removed trailing spaces

* Update camera.py

black formatted code
2020-04-24 17:28:44 +02:00
Paulus Schoutsen
d3bbd9ec65 Delay sync for Google and limit updates to relevant info (#34622) 2020-04-24 10:49:11 +02:00
jjlawren
813e945d86 Remove deprecated cert_expiry config (#34628) 2020-04-24 09:46:07 +02:00
jjlawren
c582911879 Refactor Plex device/session updates (#34616) 2020-04-23 18:12:39 -07:00
J. Nick Koston
f94329dbbd Handle synology_dsm discovery broadcasting on multiple ip addresses (#34623) 2020-04-23 17:53:18 -07:00
HomeAssistant Azure
5ba0ccd43b [ci skip] Translation update 2020-04-24 00:04:36 +00:00
Franck Nijhof
5b7a4434c4 Fix BloomSky KeyError: 'monitored_conditions' (#34613)
Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>
2020-04-23 16:00:57 -07:00
Fabian Affolter
637ff5698c Move myStrom light and switch to async (#34079) 2020-04-23 16:00:17 -07:00
Paulus Schoutsen
afe15a2e6b Fix UVC doing I/O in event loop (#34610) 2020-04-23 15:52:36 -07:00
starkillerOG
7bfc1d2840 Use "arming" state during transition in manual alarm panel (#32950)
* Manual Alarm Control Panel: use proper "Arming" state

* Update previous and next attributes

* add CONF_ARMING_TIME

* Split up arming and pending time, pending_time --> arming_time

* update tests

* fix issort

* fix issort

* fix demo platform

* fix alarm test

* remove arming_time from the triggered state

* Match previous default "delay_time"

* fix tests

* fix arming state when triggering

* fix arming _arming_time_by_state for Triggering state

* change to not in list

* Update homeassistant/components/manual/alarm_control_panel.py

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

* async_update_ha_state -> async_write_ha_state

* black formatting

* add Callback

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

* import callback

* update device triggers alarm_control_panel

* Update test_device_trigger.py

* Update device_trigger.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-24 00:07:07 +02:00
Franck Nijhof
e9c5f3e74a Upgrade codecov to 2.0.22 (#34607) 2020-04-23 14:05:05 -07:00
J. Nick Koston
7ff196d043 Restore ability to overwrite homekit max temp bound (#34612) 2020-04-23 13:53:31 -07:00
Franck Nijhof
cc28150253 Upgrade pyupgrade to v2.2.1 (#34608) 2020-04-23 13:13:31 -07:00
Franck Nijhof
5a9ee9bd6c Upgrade mock-open to 1.4.0 (#34606) 2020-04-23 13:00:28 -07:00
Erik Montnemery
b022e08db9 Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
Franck Nijhof
0b64f49e3a Remove old style translations from Atag (#34585) 2020-04-23 12:53:22 -07:00
jjlawren
f922128a14 Add Plex play_media logging and troubleshooting tools (#34412) 2020-04-23 12:42:17 -07:00
Joakim Sørensen
4fa268ecb4 Limit clone/view stats to repos with push access (#34575) 2020-04-23 12:42:01 -07:00
Franck Nijhof
36413e112f Fix Garmin Connect i/o in event loop (#34598) 2020-04-23 12:33:37 -07:00
Franck Nijhof
0869d209d7 Upgrade pre-commit to 2.3.0 (#34604) 2020-04-23 12:33:15 -07:00
Robert Svensson
b578a76efa UniFi - Move some preloading of unavailable clients earlier in setup phase (#34599)
Improve readability of setting up switch platform
2020-04-23 21:29:38 +02:00
J. Nick Koston
a7e8446454 Remember homekit aids for entities without a unique id (#34587)
* Remember homekit aids for entities without a unique id

* add backwards compat

* increase cover
2020-04-23 12:07:55 -05:00
Aaron Bach
3ce89409d2 Add service to clear SimpliSafe notifications (#34481) 2020-04-23 10:53:06 -06:00
Aaron Bach
828f368323 Handle flaky SimpliSafe notification registration (#34475) 2020-04-23 10:52:11 -06:00
jrester
4a5cf5cd2b Powerwall sensor add is_active, round state attributes and change thresholding for charging status sensor (#34582)
* Change sensor values and thresholding

* Update tests
2020-04-23 10:00:38 -05:00
Robert Svensson
c3689d7416 UniFi - Store controller in config_entry.entry_id (#34553)
* Store controller in config_entry.entry_id

* Clean up imports
2020-04-23 16:48:24 +02:00
Martin Hjelmare
a0fbf9ba47 Remove hap pyc file (#34563) 2020-04-23 13:14:48 +02:00
MatthewFlamm
116f7934d3 Fix deleting and readding nws entry (#34555)
* fix deleting and readding nws

* Clean up

* Fix variable name clash

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-23 12:50:55 +02:00
Ziv
561b033ebb Add coverage to qwikswitch (#33939) 2020-04-23 08:44:28 +02:00
HomeAssistant Azure
da87ec8499 [ci skip] Translation update 2020-04-23 00:05:07 +00:00
Aaron Bach
4d292c2723 Add support for AirVisual Node/Pro units (#32815)
* Add support for AirVisual Node Pro units

* Fixed tests

* Updated dependencies

* Guard looks cleaner

* Limit options update to geography-based entries

* Docstring

* Use proper precision in display_temp

* Add availability for AirVisualNodeProSensor

* Updated translations

* Samba stuff in play

* Wrap up Samba

* Fix tests

* Remove unnecessary updates

* Normalize labels

* Bump requirements

* Don't include configuration.yaml support for this new functionality

* Fix tests

* Code review

* Code review

* Update coveragerc

* Code review
2020-04-23 01:41:14 +02:00
Erik Montnemery
4448eb94a1 Only subscribe when MQTT client is connected. (#34557) 2020-04-22 14:38:04 -07:00
Tom
d6ab36bf8e Set mqtt binary_sensor unavailable if expire_after specified (#34259)
* Set self._expired=True if expire_after specified

* Added test_expiration_on_discovery_and_discovery_update_of_binary_sensor to mqtt/test_binary_sensor.py

* Fixed flake8 error

* Fixed isort error
2020-04-22 23:29:49 +02:00
Quentame
a8cd7203df Bump python-synology to 0.7.0 (#34534) 2020-04-22 16:28:47 -05:00
Erik Montnemery
6631bbc6f5 Remove reconnect logic from MQTT client. (#34556) 2020-04-22 14:28:36 -07:00
jjlawren
116012680a Add All wrapper to deprecated Plex schema (#34552) 2020-04-22 14:20:14 -07:00
jrester
dbd1ca45c4 Update tesla-powerwall to version 0.2.8 (#34545)
* Update tesla-powerwall to version 0.2.7

* Update tesla-powerwall to version 0.2.8
2020-04-22 16:10:06 -05:00
Robert Svensson
224c874673 UniFi - Improve logging related to loosing connection to controller (#34547) 2020-04-22 20:45:09 +02:00
3503 changed files with 67183 additions and 16103 deletions

View File

@@ -16,11 +16,16 @@ omit =
homeassistant/components/adguard/switch.py
homeassistant/components/ads/*
homeassistant/components/aftership/sensor.py
homeassistant/components/agent_dvr/__init__.py
homeassistant/components/agent_dvr/camera.py
homeassistant/components/agent_dvr/const.py
homeassistant/components/agent_dvr/helpers.py
homeassistant/components/airly/__init__.py
homeassistant/components/airly/air_quality.py
homeassistant/components/airly/sensor.py
homeassistant/components/airly/const.py
homeassistant/components/airvisual/__init__.py
homeassistant/components/airvisual/air_quality.py
homeassistant/components/airvisual/sensor.py
homeassistant/components/aladdin_connect/cover.py
homeassistant/components/alarmdecoder/*
@@ -57,7 +62,7 @@ omit =
homeassistant/components/aten_pe/*
homeassistant/components/atome/*
homeassistant/components/aurora_abb_powerone/sensor.py
homeassistant/components/automatic/device_tracker.py
homeassistant/components/automatic/*
homeassistant/components/avea/light.py
homeassistant/components/avion/light.py
homeassistant/components/avri/sensor.py
@@ -89,12 +94,16 @@ omit =
homeassistant/components/braviatv/const.py
homeassistant/components/braviatv/media_player.py
homeassistant/components/broadlink/const.py
homeassistant/components/broadlink/device.py
homeassistant/components/broadlink/remote.py
homeassistant/components/broadlink/sensor.py
homeassistant/components/broadlink/switch.py
homeassistant/components/brottsplatskartan/sensor.py
homeassistant/components/browser/*
homeassistant/components/brunt/cover.py
homeassistant/components/bsblan/__init__.py
homeassistant/components/bsblan/climate.py
homeassistant/components/bsblan/const.py
homeassistant/components/bt_home_hub_5/device_tracker.py
homeassistant/components/bt_smarthub/device_tracker.py
homeassistant/components/buienradar/sensor.py
@@ -142,6 +151,9 @@ omit =
homeassistant/components/denon/media_player.py
homeassistant/components/denonavr/media_player.py
homeassistant/components/deutsche_bahn/sensor.py
homeassistant/components/devolo_home_control/__init__.py
homeassistant/components/devolo_home_control/const.py
homeassistant/components/devolo_home_control/switch.py
homeassistant/components/dht/sensor.py
homeassistant/components/digital_ocean/*
homeassistant/components/digitalloggers/switch.py
@@ -225,6 +237,9 @@ omit =
homeassistant/components/fleetgo/device_tracker.py
homeassistant/components/flexit/climate.py
homeassistant/components/flic/binary_sensor.py
homeassistant/components/flick_electric/__init__.py
homeassistant/components/flick_electric/const.py
homeassistant/components/flick_electric/sensor.py
homeassistant/components/flock/notify.py
homeassistant/components/flume/*
homeassistant/components/flunearyou/__init__.py
@@ -298,6 +313,7 @@ omit =
homeassistant/components/hitron_coda/device_tracker.py
homeassistant/components/hive/*
homeassistant/components/hlk_sw16/*
homeassistant/components/home_connect/*
homeassistant/components/homematic/*
homeassistant/components/homematic/climate.py
homeassistant/components/homematic/cover.py
@@ -310,7 +326,11 @@ omit =
homeassistant/components/huawei_lte/*
homeassistant/components/huawei_router/device_tracker.py
homeassistant/components/hue/light.py
homeassistant/components/hunterdouglas_powerview/__init__.py
homeassistant/components/hunterdouglas_powerview/scene.py
homeassistant/components/hunterdouglas_powerview/sensor.py
homeassistant/components/hunterdouglas_powerview/cover.py
homeassistant/components/hunterdouglas_powerview/entity.py
homeassistant/components/hydrawise/*
homeassistant/components/hyperion/light.py
homeassistant/components/ialarm/alarm_control_panel.py
@@ -343,11 +363,27 @@ omit =
homeassistant/components/iqvia/*
homeassistant/components/irish_rail_transport/sensor.py
homeassistant/components/iss/binary_sensor.py
homeassistant/components/isy994/*
homeassistant/components/isy994/__init__.py
homeassistant/components/isy994/binary_sensor.py
homeassistant/components/isy994/climate.py
homeassistant/components/isy994/cover.py
homeassistant/components/isy994/entity.py
homeassistant/components/isy994/fan.py
homeassistant/components/isy994/helpers.py
homeassistant/components/isy994/light.py
homeassistant/components/isy994/lock.py
homeassistant/components/isy994/sensor.py
homeassistant/components/isy994/services.py
homeassistant/components/isy994/switch.py
homeassistant/components/itach/remote.py
homeassistant/components/itunes/media_player.py
homeassistant/components/joaoapps_join/*
homeassistant/components/juicenet/*
homeassistant/components/juicenet/__init__.py
homeassistant/components/juicenet/const.py
homeassistant/components/juicenet/device.py
homeassistant/components/juicenet/entity.py
homeassistant/components/juicenet/sensor.py
homeassistant/components/juicenet/switch.py
homeassistant/components/kaiterra/*
homeassistant/components/kankun/switch.py
homeassistant/components/keba/*
@@ -398,7 +434,13 @@ omit =
homeassistant/components/luftdaten/*
homeassistant/components/lupusec/*
homeassistant/components/lutron/*
homeassistant/components/lutron_caseta/*
homeassistant/components/lutron_caseta/__init__.py
homeassistant/components/lutron_caseta/binary_sensor.py
homeassistant/components/lutron_caseta/cover.py
homeassistant/components/lutron_caseta/fan.py
homeassistant/components/lutron_caseta/light.py
homeassistant/components/lutron_caseta/scene.py
homeassistant/components/lutron_caseta/switch.py
homeassistant/components/lw12wifi/light.py
homeassistant/components/lyft/sensor.py
homeassistant/components/magicseaweed/sensor.py
@@ -428,6 +470,7 @@ omit =
homeassistant/components/miflora/sensor.py
homeassistant/components/mikrotik/hub.py
homeassistant/components/mikrotik/device_tracker.py
homeassistant/components/mill/__init__.py
homeassistant/components/mill/climate.py
homeassistant/components/mill/const.py
homeassistant/components/minecraft_server/__init__.py
@@ -502,7 +545,14 @@ omit =
homeassistant/components/ombi/*
homeassistant/components/onewire/sensor.py
homeassistant/components/onkyo/media_player.py
homeassistant/components/onvif/__init__.py
homeassistant/components/onvif/base.py
homeassistant/components/onvif/binary_sensor.py
homeassistant/components/onvif/camera.py
homeassistant/components/onvif/device.py
homeassistant/components/onvif/event.py
homeassistant/components/onvif/parsers.py
homeassistant/components/onvif/sensor.py
homeassistant/components/opencv/*
homeassistant/components/openevse/sensor.py
homeassistant/components/openexchangerates/sensor.py
@@ -527,7 +577,6 @@ omit =
homeassistant/components/osramlightify/light.py
homeassistant/components/otp/sensor.py
homeassistant/components/panasonic_bluray/media_player.py
homeassistant/components/panasonic_viera/__init__.py
homeassistant/components/panasonic_viera/media_player.py
homeassistant/components/pandora/media_player.py
homeassistant/components/pcal9535a/*
@@ -569,7 +618,6 @@ omit =
homeassistant/components/qrcode/image_processing.py
homeassistant/components/quantum_gateway/device_tracker.py
homeassistant/components/qvr_pro/*
homeassistant/components/qwikswitch/*
homeassistant/components/rachio/*
homeassistant/components/radarr/sensor.py
homeassistant/components/radiotherm/climate.py
@@ -599,7 +647,6 @@ omit =
homeassistant/components/ring/camera.py
homeassistant/components/ripple/sensor.py
homeassistant/components/rocketchat/notify.py
homeassistant/components/roku/remote.py
homeassistant/components/roomba/binary_sensor.py
homeassistant/components/roomba/braava.py
homeassistant/components/roomba/irobot_base.py
@@ -608,7 +655,7 @@ omit =
homeassistant/components/roomba/vacuum.py
homeassistant/components/route53/*
homeassistant/components/rova/sensor.py
homeassistant/components/rpi_camera/camera.py
homeassistant/components/rpi_camera/*
homeassistant/components/rpi_gpio/*
homeassistant/components/rpi_gpio/cover.py
homeassistant/components/rpi_gpio_pwm/light.py
@@ -672,7 +719,6 @@ omit =
homeassistant/components/somfy/*
homeassistant/components/somfy_mylink/*
homeassistant/components/sonarr/sensor.py
homeassistant/components/songpal/*
homeassistant/components/sonos/*
homeassistant/components/sony_projector/switch.py
homeassistant/components/spc/*
@@ -687,6 +733,7 @@ omit =
homeassistant/components/steam_online/sensor.py
homeassistant/components/stiebel_eltron/*
homeassistant/components/stookalert/*
homeassistant/components/stream/*
homeassistant/components/streamlabswater/*
homeassistant/components/suez_water/*
homeassistant/components/supervisord/sensor.py
@@ -773,6 +820,10 @@ omit =
homeassistant/components/ubus/device_tracker.py
homeassistant/components/ue_smart_radio/media_player.py
homeassistant/components/unifiled/*
homeassistant/components/upb/__init__.py
homeassistant/components/upb/const.py
homeassistant/components/upb/light.py
homeassistant/components/upb/scene.py
homeassistant/components/upcloud/*
homeassistant/components/upnp/*
homeassistant/components/upc_connect/*
@@ -816,6 +867,7 @@ omit =
homeassistant/components/webostv/*
homeassistant/components/wemo/*
homeassistant/components/whois/sensor.py
homeassistant/components/wiffi/*
homeassistant/components/wink/*
homeassistant/components/wirelesstag/*
homeassistant/components/worldtidesinfo/sensor.py
@@ -829,7 +881,17 @@ omit =
homeassistant/components/xfinity/device_tracker.py
homeassistant/components/xiaomi/camera.py
homeassistant/components/xiaomi_aqara/*
homeassistant/components/xiaomi_miio/*
homeassistant/components/xiaomi_miio/__init__.py
homeassistant/components/xiaomi_miio/air_quality.py
homeassistant/components/xiaomi_miio/alarm_control_panel.py
homeassistant/components/xiaomi_miio/device_tracker.py
homeassistant/components/xiaomi_miio/fan.py
homeassistant/components/xiaomi_miio/gateway.py
homeassistant/components/xiaomi_miio/light.py
homeassistant/components/xiaomi_miio/remote.py
homeassistant/components/xiaomi_miio/sensor.py
homeassistant/components/xiaomi_miio/switch.py
homeassistant/components/xiaomi_miio/vacuum.py
homeassistant/components/xiaomi_tv/media_player.py
homeassistant/components/xmpp/notify.py
homeassistant/components/xs1/*
@@ -844,8 +906,9 @@ omit =
homeassistant/components/zamg/weather.py
homeassistant/components/zengge/light.py
homeassistant/components/zeroconf/*
homeassistant/components/zerproc/__init__.py
homeassistant/components/zerproc/const.py
homeassistant/components/zestimate/sensor.py
homeassistant/components/zha/__init__.py
homeassistant/components/zha/api.py
homeassistant/components/zha/core/channels/*
homeassistant/components/zha/core/const.py
@@ -864,6 +927,10 @@ omit =
homeassistant/components/zoneminder/*
homeassistant/components/supla/*
homeassistant/components/zwave/util.py
homeassistant/components/ozw/__init__.py
homeassistant/components/ozw/discovery.py
homeassistant/components/ozw/entity.py
homeassistant/components/ozw/services.py
[report]
# Regexes for lines to exclude from consideration

5
.hadolint.yaml Normal file
View File

@@ -0,0 +1,5 @@
ignored:
- DL3006
- DL3008
- DL3013
- DL3018

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.1.0
rev: v2.3.0
hooks:
- id: pyupgrade
args: [--py37-plus]
@@ -18,9 +18,9 @@ repos:
- id: codespell
args:
- --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
- --skip="./.*,*.json"
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types: [json]
exclude_types: [csv, json]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:

View File

@@ -11,6 +11,9 @@ addons:
- libswscale-dev
- libswresample-dev
- libavfilter-dev
sources:
- sourceline: ppa:savoury1/ffmpeg4
matrix:
fast_finish: true
include:

View File

@@ -15,6 +15,7 @@ homeassistant/scripts/check_config.py @kellerza
# Integrations
homeassistant/components/abode/* @shred86
homeassistant/components/adguard/* @frenck
homeassistant/components/agent_dvr/* @ispysoftware
homeassistant/components/airly/* @bieniu
homeassistant/components/airvisual/* @bachya
homeassistant/components/alarmdecoder/* @ajschmidt8
@@ -47,12 +48,13 @@ homeassistant/components/avea/* @pattyland
homeassistant/components/avri/* @timvancann
homeassistant/components/awair/* @danielsjf
homeassistant/components/aws/* @awarecan @robbiet480
homeassistant/components/axis/* @kane610
homeassistant/components/axis/* @Kane610
homeassistant/components/azure_event_hub/* @eavanvalkenburg
homeassistant/components/azure_service_bus/* @hfurubotten
homeassistant/components/beewi_smartclim/* @alemuro
homeassistant/components/bitcoin/* @fabaff
homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blebox/* @gadgetmobile
homeassistant/components/blink/* @fronzbot
homeassistant/components/bmp280/* @belidzs
homeassistant/components/bmw_connected_drive/* @gerard33
@@ -61,6 +63,7 @@ homeassistant/components/braviatv/* @robbiet480 @bieniu
homeassistant/components/broadlink/* @danielhiversen @felipediel
homeassistant/components/brother/* @bieniu
homeassistant/components/brunt/* @eavanvalkenburg
homeassistant/components/bsblan/* @liudger
homeassistant/components/bt_smarthub/* @jxwolstenholme
homeassistant/components/buienradar/* @mjj4791 @ties
homeassistant/components/cast/* @emontnemery
@@ -82,12 +85,13 @@ homeassistant/components/cpuspeed/* @fabaff
homeassistant/components/cups/* @fabaff
homeassistant/components/daikin/* @fredrike
homeassistant/components/darksky/* @fabaff
homeassistant/components/deconz/* @kane610
homeassistant/components/deconz/* @Kane610
homeassistant/components/delijn/* @bollewolle
homeassistant/components/demo/* @home-assistant/core
homeassistant/components/denonavr/* @scarface-4711 @starkillerOG
homeassistant/components/derivative/* @afaucogney
homeassistant/components/device_automation/* @home-assistant/core
homeassistant/components/devolo_home_control/* @2Fake @Shutgun
homeassistant/components/digital_ocean/* @fabaff
homeassistant/components/directv/* @ctalkington
homeassistant/components/discogs/* @thibmaek
@@ -122,9 +126,11 @@ homeassistant/components/file/* @fabaff
homeassistant/components/filter/* @dgomes
homeassistant/components/fitbit/* @robbiet480
homeassistant/components/fixer/* @fabaff
homeassistant/components/flick_electric/* @ZephireNZ
homeassistant/components/flock/* @fabaff
homeassistant/components/flume/* @ChrisMandich @bdraco
homeassistant/components/flunearyou/* @bachya
homeassistant/components/forked_daapd/* @uvjustin
homeassistant/components/fortigate/* @kifeo
homeassistant/components/fortios/* @kimfrellsen
homeassistant/components/foscam/* @skgsergio
@@ -163,6 +169,7 @@ homeassistant/components/hikvisioncam/* @fbradyirl
homeassistant/components/hisense_aehw4a1/* @bannhead
homeassistant/components/history/* @home-assistant/core
homeassistant/components/hive/* @Rendili @KJonline
homeassistant/components/home_connect/* @DavidMStraub
homeassistant/components/homeassistant/* @home-assistant/core
homeassistant/components/homekit/* @bdraco
homeassistant/components/homekit_controller/* @Jc2k
@@ -174,6 +181,7 @@ homeassistant/components/http/* @home-assistant/core
homeassistant/components/huawei_lte/* @scop
homeassistant/components/huawei_router/* @abmantis
homeassistant/components/hue/* @balloob
homeassistant/components/hunterdouglas_powerview/* @bdraco
homeassistant/components/iammeter/* @lewei50
homeassistant/components/iaqualink/* @flz
homeassistant/components/icloud/* @Quentame
@@ -195,6 +203,7 @@ homeassistant/components/ipp/* @ctalkington
homeassistant/components/iqvia/* @bachya
homeassistant/components/irish_rail_transport/* @ttroy50
homeassistant/components/islamic_prayer_times/* @engrbm87
homeassistant/components/isy994/* @bdraco @shbatm
homeassistant/components/izone/* @Swamp-Ig
homeassistant/components/jewish_calendar/* @tsvi
homeassistant/components/juicenet/* @jesserockz
@@ -238,7 +247,7 @@ homeassistant/components/minecraft_server/* @elmurato
homeassistant/components/minio/* @tkislan
homeassistant/components/mobile_app/* @robbiet480
homeassistant/components/modbus/* @adamchengtkc @janiversen
homeassistant/components/monoprice/* @etsinko
homeassistant/components/monoprice/* @etsinko @OnFreund
homeassistant/components/moon/* @fabaff
homeassistant/components/mpd/* @fabaff
homeassistant/components/mqtt/* @home-assistant/core @emontnemery
@@ -266,6 +275,7 @@ homeassistant/components/nsw_fuel_station/* @nickw444
homeassistant/components/nsw_rural_fire_service_feed/* @exxamalte
homeassistant/components/nuheat/* @bdraco
homeassistant/components/nuki/* @pvizeli
homeassistant/components/numato/* @clssn
homeassistant/components/nut/* @bdraco
homeassistant/components/nws/* @MatthewFlamm
homeassistant/components/nzbget/* @chriscla
@@ -274,13 +284,16 @@ homeassistant/components/ohmconnect/* @robbiet480
homeassistant/components/ombi/* @larssont
homeassistant/components/onboarding/* @home-assistant/core
homeassistant/components/onewire/* @garbled1
homeassistant/components/onvif/* @hunterjm
homeassistant/components/openerz/* @misialq
homeassistant/components/opengarage/* @danielhiversen
homeassistant/components/opentherm_gw/* @mvn23
homeassistant/components/openuv/* @bachya
homeassistant/components/openweathermap/* @fabaff
homeassistant/components/opnsense/* @mtreinish
homeassistant/components/orangepi_gpio/* @pascallj
homeassistant/components/oru/* @bvlaicu
homeassistant/components/ozw/* @cgarwood @marcelveldt @MartinHjelmare
homeassistant/components/panasonic_viera/* @joogps
homeassistant/components/panel_custom/* @home-assistant/frontend
homeassistant/components/panel_iframe/* @home-assistant/frontend
@@ -288,7 +301,7 @@ homeassistant/components/pcal9535a/* @Shulyaka
homeassistant/components/persistent_notification/* @home-assistant/core
homeassistant/components/philips_js/* @elupus
homeassistant/components/pi4ioe5v9xxxx/* @antonverburg
homeassistant/components/pi_hole/* @fabaff @johnluetke
homeassistant/components/pi_hole/* @fabaff @johnluetke @shenxn
homeassistant/components/pilight/* @trekky12
homeassistant/components/plaato/* @JohNan
homeassistant/components/plant/* @ChristianKuehnel
@@ -356,13 +369,14 @@ homeassistant/components/solax/* @squishykid
homeassistant/components/soma/* @ratsept
homeassistant/components/somfy/* @tetienne
homeassistant/components/sonarr/* @ctalkington
homeassistant/components/songpal/* @rytilahti
homeassistant/components/songpal/* @rytilahti @shenxn
homeassistant/components/sonos/* @amelchio
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/speedtestdotnet/* @rohankapoorcom
homeassistant/components/spider/* @peternijssen
homeassistant/components/spotify/* @frenck
homeassistant/components/sql/* @dgomes
homeassistant/components/squeezebox/* @rajlaud
homeassistant/components/starline/* @anonym-tsk
homeassistant/components/statistics/* @fabaff
homeassistant/components/stiebel_eltron/* @fucm
@@ -405,12 +419,14 @@ homeassistant/components/tradfri/* @ggravlingen
homeassistant/components/trafikverket_train/* @endor-force
homeassistant/components/transmission/* @engrbm87 @JPHutchins
homeassistant/components/tts/* @pvizeli
homeassistant/components/tuya/* @ollo69
homeassistant/components/twentemilieu/* @frenck
homeassistant/components/twilio_call/* @robbiet480
homeassistant/components/twilio_sms/* @robbiet480
homeassistant/components/ubee/* @mzdrale
homeassistant/components/unifi/* @kane610
homeassistant/components/unifi/* @Kane610
homeassistant/components/unifiled/* @florisvdk
homeassistant/components/upb/* @gwww
homeassistant/components/upc_connect/* @pvizeli
homeassistant/components/upcloud/* @scop
homeassistant/components/updater/* @home-assistant/core
@@ -435,6 +451,7 @@ homeassistant/components/weather/* @fabaff
homeassistant/components/webostv/* @bendavid
homeassistant/components/websocket_api/* @home-assistant/core
homeassistant/components/wemo/* @sqldiablo
homeassistant/components/wiffi/* @mampfes
homeassistant/components/withings/* @vangorra
homeassistant/components/wled/* @frenck
homeassistant/components/workday/* @fabaff
@@ -454,6 +471,7 @@ homeassistant/components/yessssms/* @flowolf
homeassistant/components/yi/* @bachya
homeassistant/components/yr/* @danielhiversen
homeassistant/components/zeroconf/* @robbiet480 @Kane610
homeassistant/components/zerproc/* @emlove
homeassistant/components/zha/* @dmulcahey @adminiuga
homeassistant/components/zone/* @home-assistant/core
homeassistant/components/zoneminder/* @rohankapoorcom

View File

@@ -1,7 +1,7 @@
FROM python:3.7
FROM python:3.8
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
RUN \
apt-get update && apt-get install -y --no-install-recommends \
libudev-dev \
libavformat-dev \
libavcodec-dev \
@@ -18,8 +18,7 @@ WORKDIR /usr/src
# Setup hass-release
RUN git clone --depth 1 https://github.com/home-assistant/hass-release \
&& cd hass-release \
&& pip3 install -e .
&& pip3 install -e hass-release/
WORKDIR /workspaces

View File

@@ -4,9 +4,9 @@ trigger:
batch: true
branches:
include:
- rc
- dev
- master
- rc
- dev
- master
pr:
- rc
- dev
@@ -14,205 +14,229 @@ pr:
resources:
containers:
- container: 37
image: homeassistant/ci-azure:3.7
- container: 37
image: homeassistant/ci-azure:3.7
- container: 38
image: homeassistant/ci-azure:3.8
repositories:
- repository: azure
type: github
name: 'home-assistant/ci-azure'
endpoint: 'home-assistant'
name: "home-assistant/ci-azure"
endpoint: "home-assistant"
variables:
- name: PythonMain
value: '37'
value: "37"
- name: versionHadolint
value: "v1.17.6"
stages:
- stage: "Overview"
jobs:
- job: "Lint"
pool:
vmImage: "ubuntu-latest"
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "requirements_test.txt | homeassistant/package_constraints.txt"
build: |
python -m venv venv
- stage: 'Overview'
jobs:
- job: 'Lint'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test.txt | homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run --hook-stage manual check-executables-have-shebangs --all-files
displayName: "Run executables check"
- script: |
. venv/bin/activate
pre-commit run codespell --all-files
displayName: "Run codespell"
- script: |
. 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"
- script: |
. venv/bin/activate
pre-commit run isort --all-files --show-diff-on-failure
displayName: "Run isort"
- script: |
. venv/bin/activate
pre-commit run check-json --all-files
displayName: "Run check-json"
- script: |
. venv/bin/activate
pre-commit run yamllint --all-files
displayName: "Run yamllint"
- script: |
. venv/bin/activate
pre-commit run pyupgrade --all-files --show-diff-on-failure
displayName: "Run pyupgrade"
# Prettier seems to hang on Azure, unknown why yet.
# Temporarily disable the check to no block PRs
# - script: |
# . venv/bin/activate
# pre-commit run prettier --all-files --show-diff-on-failure
# displayName: 'Run prettier'
- job: "Validate"
pool:
vmImage: "ubuntu-latest"
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "homeassistant/package_constraints.txt"
build: |
python -m venv venv
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run --hook-stage manual check-executables-have-shebangs --all-files
displayName: 'Run executables check'
- script: |
. venv/bin/activate
pre-commit run codespell --all-files
displayName: 'Run codespell'
- script: |
. 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'
- script: |
. venv/bin/activate
pre-commit run isort --all-files --show-diff-on-failure
displayName: 'Run isort'
- script: |
. venv/bin/activate
pre-commit run check-json --all-files
displayName: 'Run check-json'
- script: |
. venv/bin/activate
pre-commit run yamllint --all-files
displayName: 'Run yamllint'
- script: |
. venv/bin/activate
pre-commit run pyupgrade --all-files --show-diff-on-failure
displayName: 'Run pyupgrade'
# Prettier seems to hang on Azure, unknown why yet.
# Temporarily disable the check to no block PRs
# - script: |
# . venv/bin/activate
# pre-commit run prettier --all-files --show-diff-on-failure
# displayName: 'Run prettier'
- job: 'Validate'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -e .
- script: |
. venv/bin/activate
python -m script.hassfest --action validate
displayName: "Validate manifests"
- script: |
. venv/bin/activate
./script/gen_requirements_all.py validate
displayName: "requirements_all validate"
- job: "CheckFormat"
pool:
vmImage: "ubuntu-latest"
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "requirements_test.txt | homeassistant/package_constraints.txt"
build: |
python -m venv venv
. venv/bin/activate
pip install -e .
- script: |
. venv/bin/activate
python -m script.hassfest --action validate
displayName: 'Validate manifests'
- script: |
. venv/bin/activate
./script/gen_requirements_all.py validate
displayName: 'requirements_all validate'
- job: 'CheckFormat'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test.txt | homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run black --all-files --show-diff-on-failure
displayName: "Check Black formatting"
- job: "Docker"
pool:
vmImage: "ubuntu-latest"
steps:
- script: sudo docker pull hadolint/hadolint:$(versionHadolint)
displayName: "Install Hadolint"
- script: |
set -e
for dockerfile in Dockerfile Dockerfile.dev
do
echo "Linting: $dockerfile"
docker run --rm -i \
-v "$(pwd)/.hadolint.yaml:/.hadolint.yaml:ro" \
hadolint/hadolint:$(versionHadolint) < "$dockerfile"
done
displayName: "Run Hadolint"
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run black --all-files --show-diff-on-failure
displayName: 'Check Black formatting'
- stage: "Tests"
dependsOn:
- "Overview"
jobs:
- job: "PyTest"
pool:
vmImage: "ubuntu-latest"
strategy:
maxParallel: 3
matrix:
Python37:
python.container: "37"
Python38:
python.container: "38"
container: $[ variables['python.container'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "requirements_test_all.txt | homeassistant/package_constraints.txt"
build: |
set -e
python -m venv venv
- stage: 'Tests'
dependsOn:
- 'Overview'
jobs:
- job: 'PyTest'
pool:
vmImage: 'ubuntu-latest'
strategy:
maxParallel: 3
matrix:
Python37:
python.container: '37'
container: $[ variables['python.container'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test_all.txt | homeassistant/package_constraints.txt'
build: |
set -e
python -m venv venv
. venv/bin/activate
pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
# Find offending deps with `pipdeptree -r -p typing`
pip uninstall -y typing
- script: |
. venv/bin/activate
pip install -e .
displayName: "Install Home Assistant"
- script: |
set -e
. venv/bin/activate
pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
# Find offending deps with `pipdeptree -r -p typing`
pip uninstall -y typing
- script: |
. venv/bin/activate
pip install -e .
displayName: 'Install Home Assistant'
- script: |
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar tests
script/check_dirty
displayName: "Run pytest for python $(python.container)"
condition: and(succeeded(), ne(variables['python.container'], variables['PythonMain']))
- script: |
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar tests
script/check_dirty
displayName: 'Run pytest for python $(python.container)'
condition: and(succeeded(), ne(variables['python.container'], variables['PythonMain']))
- script: |
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 -n auto --dist=loadfile --cov homeassistant --cov-report html -qq -o console_output_style=count -p no:sugar tests
codecov --token $(codecovToken)
script/check_dirty
displayName: "Run pytest for python $(python.container) / coverage"
condition: and(succeeded(), eq(variables['python.container'], variables['PythonMain']))
. venv/bin/activate
pytest --timeout=9 --durations=10 -n auto --dist=loadfile --cov homeassistant --cov-report html -qq -o console_output_style=count -p no:sugar tests
codecov --token $(codecovToken)
script/check_dirty
displayName: 'Run pytest for python $(python.container) / coverage'
condition: and(succeeded(), eq(variables['python.container'], variables['PythonMain']))
- stage: "FullCheck"
dependsOn:
- "Overview"
jobs:
- job: "Pylint"
pool:
vmImage: "ubuntu-latest"
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "requirements_all.txt | requirements_test.txt | homeassistant/package_constraints.txt"
build: |
set -e
python -m venv venv
- stage: 'FullCheck'
dependsOn:
- 'Overview'
jobs:
- job: 'Pylint'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_all.txt | requirements_test.txt | homeassistant/package_constraints.txt'
build: |
set -e
python -m venv venv
. venv/bin/activate
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
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
# Find offending deps with `pipdeptree -r -p typing`
pip uninstall -y typing
- script: |
. venv/bin/activate
pip install -e .
displayName: "Install Home Assistant"
- script: |
. venv/bin/activate
pylint homeassistant
displayName: "Run pylint"
- job: "Mypy"
pool:
vmImage: "ubuntu-latest"
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "requirements_test.txt | setup.py | homeassistant/package_constraints.txt"
build: |
python -m venv venv
. venv/bin/activate
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: |
. venv/bin/activate
pip install -e .
displayName: 'Install Home Assistant'
- script: |
. venv/bin/activate
pylint homeassistant
displayName: 'Run pylint'
- job: 'Mypy'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test.txt | setup.py | homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run mypy --all-files
displayName: 'Run mypy'
. venv/bin/activate
pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run mypy --all-files
displayName: "Run mypy"

View File

@@ -1,11 +1,11 @@
{
"image": "homeassistant/{arch}-homeassistant",
"build_from": {
"aarch64": "homeassistant/aarch64-homeassistant-base:7.1.0",
"armhf": "homeassistant/armhf-homeassistant-base:7.1.0",
"armv7": "homeassistant/armv7-homeassistant-base:7.1.0",
"amd64": "homeassistant/amd64-homeassistant-base:7.1.0",
"i386": "homeassistant/i386-homeassistant-base:7.1.0"
"aarch64": "homeassistant/aarch64-homeassistant-base:7.2.0",
"armhf": "homeassistant/armhf-homeassistant-base:7.2.0",
"armv7": "homeassistant/armv7-homeassistant-base:7.2.0",
"amd64": "homeassistant/amd64-homeassistant-base:7.2.0",
"i386": "homeassistant/i386-homeassistant-base:7.2.0"
},
"labels": {
"io.hass.type": "core"

View File

@@ -8,6 +8,8 @@ import sys
import threading
from typing import List
import yarl
from homeassistant.const import REQUIRED_PYTHON_VER, RESTART_EXIT_CODE, __version__
@@ -256,10 +258,17 @@ async def setup_and_run_hass(config_dir: str, args: argparse.Namespace) -> int:
if hass is None:
return 1
if args.open_ui and hass.config.api is not None:
if args.open_ui:
import webbrowser # pylint: disable=import-outside-toplevel
hass.add_job(webbrowser.open, hass.config.api.base_url)
if hass.config.api is not None:
scheme = "https" if hass.config.api.use_ssl else "http"
url = str(
yarl.URL.build(
scheme=scheme, host="127.0.0.1", port=hass.config.api.port
)
)
hass.add_job(webbrowser.open, url)
return await hass.async_run()

View File

@@ -61,8 +61,7 @@ class CommandLineAuthProvider(AuthProvider):
"""Validate a username and password."""
env = {"username": username, "password": password}
try:
# pylint: disable=no-member
process = await asyncio.subprocess.create_subprocess_exec(
process = await asyncio.subprocess.create_subprocess_exec( # pylint: disable=no-member
self.config[CONF_COMMAND],
*self.config[CONF_ARGS],
env=env,

View File

@@ -138,8 +138,9 @@ class Data:
if not bcrypt.checkpw(password.encode(), user_hash):
raise InvalidAuth
# pylint: disable=no-self-use
def hash_password(self, password: str, for_storage: bool = False) -> bytes:
def hash_password( # pylint: disable=no-self-use
self, password: str, for_storage: bool = False
) -> bytes:
"""Encode a password."""
hashed: bytes = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))

View File

@@ -249,6 +249,10 @@ def async_enable_logging(
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
sys.excepthook = lambda *args: logging.getLogger(None).exception(
"Uncaught exception", exc_info=args # type: ignore
)
# Log errors to a file if we have write access to file or config dir
if log_file is None:
err_log_path = hass.config.path(ERROR_LOG_FILENAME)

View File

@@ -25,7 +25,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
)
class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanel):
class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanelEntity):
"""An alarm_control_panel implementation for Abode."""
@property

View File

@@ -3,7 +3,7 @@ import abodepy.helpers.constants as CONST
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_WINDOW,
BinarySensorDevice,
BinarySensorEntity,
)
from . import AbodeDevice
@@ -30,7 +30,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities)
class AbodeBinarySensor(AbodeDevice, BinarySensorDevice):
class AbodeBinarySensor(AbodeDevice, BinarySensorEntity):
"""A binary sensor implementation for Abode device."""
@property

View File

@@ -1,7 +1,7 @@
"""Support for Abode Security System covers."""
import abodepy.helpers.constants as CONST
from homeassistant.components.cover import CoverDevice
from homeassistant.components.cover import CoverEntity
from . import AbodeDevice
from .const import DOMAIN
@@ -19,7 +19,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities)
class AbodeCover(AbodeDevice, CoverDevice):
class AbodeCover(AbodeDevice, CoverEntity):
"""Representation of an Abode cover."""
@property

View File

@@ -10,7 +10,7 @@ from homeassistant.components.light import (
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_COLOR_TEMP,
Light,
LightEntity,
)
from homeassistant.util.color import (
color_temperature_kelvin_to_mired,
@@ -33,7 +33,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities)
class AbodeLight(AbodeDevice, Light):
class AbodeLight(AbodeDevice, LightEntity):
"""Representation of an Abode light."""
def turn_on(self, **kwargs):

View File

@@ -1,7 +1,7 @@
"""Support for the Abode Security System locks."""
import abodepy.helpers.constants as CONST
from homeassistant.components.lock import LockDevice
from homeassistant.components.lock import LockEntity
from . import AbodeDevice
from .const import DOMAIN
@@ -19,7 +19,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities)
class AbodeLock(AbodeDevice, LockDevice):
class AbodeLock(AbodeDevice, LockEntity):
"""Representation of an Abode lock."""
def lock(self, **kwargs):

View File

@@ -3,7 +3,10 @@
"step": {
"user": {
"title": "Fill in your Abode login information",
"data": { "username": "Email Address", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": {
@@ -15,4 +18,4 @@
"single_instance_allowed": "Only a single configuration of Abode is allowed."
}
}
}
}

View File

@@ -1,7 +1,7 @@
"""Support for Abode Security System switches."""
import abodepy.helpers.constants as CONST
from homeassistant.components.switch import SwitchDevice
from homeassistant.components.switch import SwitchEntity
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import AbodeAutomation, AbodeDevice
@@ -28,7 +28,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities)
class AbodeSwitch(AbodeDevice, SwitchDevice):
class AbodeSwitch(AbodeDevice, SwitchEntity):
"""Representation of an Abode switch."""
def turn_on(self, **kwargs):
@@ -45,7 +45,7 @@ class AbodeSwitch(AbodeDevice, SwitchDevice):
return self._device.is_on
class AbodeAutomationSwitch(AbodeAutomation, SwitchDevice):
class AbodeAutomationSwitch(AbodeAutomation, SwitchEntity):
"""A switch implementation for Abode automations."""
async def async_added_to_hass(self):

View File

@@ -12,7 +12,7 @@
"user": {
"data": {
"password": "Password",
"username": "Email Address"
"username": "Email"
},
"title": "Fill in your Abode login information"
}

View File

@@ -0,0 +1,7 @@
{
"config": {
"error": {
"connection_error": "Yhteytt\u00e4 Abodeen ei voi muodostaa."
}
}
}

View File

@@ -1,7 +1,7 @@
{
"config": {
"abort": {
"single_instance_allowed": "\ud558\ub098\uc758 Abode \ub9cc \uad6c\uc131 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
"single_instance_allowed": "\ud558\ub098\uc758 Abode \ub9cc \uad6c\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
},
"error": {
"connection_error": "Abode \uc5d0 \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",
@@ -12,9 +12,9 @@
"user": {
"data": {
"password": "\ube44\ubc00\ubc88\ud638",
"username": "\uc774\uba54\uc77c \uc8fc\uc18c"
"username": "\uc774\uba54\uc77c"
},
"title": "Abode \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694"
"title": "Abode \uc0ac\uc6a9\uc790 \uc815\ubcf4 \uc785\ub825\ud558\uae30"
}
}
}

View File

@@ -6,7 +6,7 @@
"error": {
"connection_error": "Kan ikke koble til Abode.",
"identifier_exists": "Kontoen er allerede registrert.",
"invalid_credentials": "Ugyldig brukerinformasjon"
"invalid_credentials": "Ugyldig legitimasjon"
},
"step": {
"user": {

View File

@@ -11,8 +11,8 @@
"step": {
"user": {
"data": {
"password": "Has\u0142o",
"username": "Adres e-mail"
"password": "[%key_id:common::config_flow::data::password%]",
"username": "[%key_id:common::config_flow::data::email%]"
},
"title": "Wprowad\u017a informacje logowania Abode"
}

View File

@@ -12,7 +12,7 @@
"user": {
"data": {
"password": "\u5bc6\u78bc",
"username": "\u96fb\u5b50\u90f5\u4ef6\u5730\u5740"
"username": "\u96fb\u5b50\u90f5\u4ef6"
},
"title": "\u586b\u5beb Abode \u767b\u5165\u8cc7\u8a0a"
}

View File

@@ -2,6 +2,6 @@
"domain": "acer_projector",
"name": "Acer Projector",
"documentation": "https://www.home-assistant.io/integrations/acer_projector",
"requirements": ["pyserial==3.1.1"],
"requirements": ["pyserial==3.4"],
"codeowners": []
}

View File

@@ -5,7 +5,7 @@ import re
import serial
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
from homeassistant.const import (
CONF_FILENAME,
CONF_NAME,
@@ -69,7 +69,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([AcerSwitch(serial_port, name, timeout, write_timeout)], True)
class AcerSwitch(SwitchDevice):
class AcerSwitch(SwitchEntity):
"""Represents an Acer Projector as a switch."""
def __init__(self, serial_port, name, timeout, write_timeout, **kwargs):

View File

@@ -206,4 +206,5 @@ class AdGuardHomeDeviceEntity(AdGuardHomeEntity):
"name": "AdGuard Home",
"manufacturer": "AdGuard Team",
"sw_version": self.hass.data[DOMAIN].get(DATA_ADGUARD_VERION),
"entry_type": "service",
}

View File

@@ -4,10 +4,10 @@
"user": {
"description": "Set up your AdGuard Home instance to allow monitoring and control.",
"data": {
"host": "Host",
"password": "Password",
"port": "Port",
"username": "Username",
"host": "[%key:common::config_flow::data::host%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]",
"username": "[%key:common::config_flow::data::username%]",
"ssl": "AdGuard Home uses a SSL certificate",
"verify_ssl": "AdGuard Home uses a proper certificate"
}

View File

@@ -10,7 +10,7 @@ from homeassistant.components.adguard.const import (
DATA_ADGUARD_VERION,
DOMAIN,
)
from homeassistant.components.switch import SwitchDevice
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.exceptions import PlatformNotReady
from homeassistant.helpers.typing import HomeAssistantType
@@ -45,7 +45,7 @@ async def async_setup_entry(
async_add_entities(switches, True)
class AdGuardHomeSwitch(AdGuardHomeDeviceEntity, SwitchDevice):
class AdGuardHomeSwitch(AdGuardHomeDeviceEntity, SwitchEntity):
"""Defines a AdGuard Home switch."""
def __init__(

View File

@@ -16,9 +16,7 @@
},
"user": {
"data": {
"host": "\u0410\u0434\u0440\u0435\u0441",
"password": "\u041f\u0430\u0440\u043e\u043b\u0430",
"port": "\u041f\u043e\u0440\u0442",
"ssl": "AdGuard Home \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442",
"username": "\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u043e \u0438\u043c\u0435",
"verify_ssl": "AdGuard Home \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u043d\u0430\u0434\u0435\u0436\u0434\u0435\u043d \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"

View File

@@ -16,11 +16,11 @@
},
"user": {
"data": {
"host": "Amfitri\u00f3",
"password": "Contrasenya",
"port": "Port",
"host": "[%key::common::config_flow::data::host%]",
"password": "[%key::common::config_flow::data::password%]",
"port": "[%key::common::config_flow::data::port%]",
"ssl": "AdGuard Home utilitza un certificat SSL",
"username": "Nom d'usuari",
"username": "[%key::common::config_flow::data::username%]",
"verify_ssl": "AdGuard Home utilitza un certificat adequat"
},
"description": "Configuraci\u00f3 de la inst\u00e0ncia d'AdGuard Home, permet el control i la monitoritzaci\u00f3.",

View File

@@ -16,9 +16,7 @@
},
"user": {
"data": {
"host": "V\u00e6rt",
"password": "Adgangskode",
"port": "Port",
"ssl": "AdGuard Home bruger et SSL-certifikat",
"username": "Brugernavn",
"verify_ssl": "AdGuard Home bruger et korrekt certifikat"

View File

@@ -17,7 +17,6 @@
"user": {
"data": {
"password": "Contrase\u00f1a",
"port": "Puerto",
"ssl": "AdGuard Home utiliza un certificado SSL",
"username": "Nombre de usuario",
"verify_ssl": "AdGuard Home utiliza un certificado adecuado"

View File

@@ -0,0 +1,15 @@
{
"config": {
"error": {
"connection_error": "Yhdist\u00e4minen ep\u00e4onnistui."
},
"step": {
"user": {
"data": {
"host": "Palvelin",
"port": "Portti"
}
}
}
}
}

View File

@@ -0,0 +1,12 @@
{
"config": {
"step": {
"user": {
"data": {
"host": "Host",
"port": "\u05e4\u05d5\u05e8\u05d8"
}
}
}
}
}

View File

@@ -6,8 +6,7 @@
"step": {
"user": {
"data": {
"password": "Kata sandi",
"port": "Port"
"password": "Kata sandi"
}
}
}

View File

@@ -4,7 +4,7 @@
"adguard_home_addon_outdated": "\uc774 \ud1b5\ud569 \uad6c\uc131\uc694\uc18c\ub294 AdGuard Home {minimal_version} \uc774\uc0c1\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \ud604\uc7ac \ubc84\uc804\uc740 {current_version} \uc785\ub2c8\ub2e4. Hass.io AdGuard Home \uc560\ub4dc\uc628\uc744 \uc5c5\ub370\uc774\ud2b8 \ud574\uc8fc\uc138\uc694.",
"adguard_home_outdated": "\uc774 \ud1b5\ud569 \uad6c\uc131\uc694\uc18c\ub294 AdGuard Home {minimal_version} \uc774\uc0c1\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \ud604\uc7ac \ubc84\uc804\uc740 {current_version} \uc785\ub2c8\ub2e4.",
"existing_instance_updated": "\uae30\uc874 \uad6c\uc131\uc744 \uc5c5\ub370\uc774\ud2b8\ud588\uc2b5\ub2c8\ub2e4.",
"single_instance_allowed": "\ud558\ub098\uc758 AdGuard Home \ub9cc \uad6c\uc131 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
"single_instance_allowed": "\ud558\ub098\uc758 AdGuard Home \ub9cc \uad6c\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
},
"error": {
"connection_error": "\uc5f0\uacb0\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4."
@@ -24,7 +24,7 @@
"verify_ssl": "AdGuard Home \uc740 \uc62c\ubc14\ub978 \uc778\uc99d\uc11c\ub97c \uc0ac\uc6a9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4"
},
"description": "\ubaa8\ub2c8\ud130\ub9c1 \ubc0f \uc81c\uc5b4\uac00 \uac00\ub2a5\ud558\ub3c4\ub85d AdGuard Home \uc778\uc2a4\ud134\uc2a4\ub97c \uc124\uc815\ud574\uc8fc\uc138\uc694.",
"title": "AdGuard Home \uc5f0\uacb0"
"title": "AdGuard Home \uc5f0\uacb0\ud558\uae30"
}
}
}

View File

@@ -16,7 +16,7 @@
},
"user": {
"data": {
"host": "Apparat",
"host": "Host",
"password": "Passwuert",
"port": "Port",
"ssl": "AdGuard Home benotzt een SSL Zertifikat",

View File

@@ -16,9 +16,7 @@
},
"user": {
"data": {
"host": "Host",
"password": "Wachtwoord",
"port": "Poort",
"ssl": "AdGuard Home maakt gebruik van een SSL certificaat",
"username": "Gebruikersnaam",
"verify_ssl": "AdGuard Home maakt gebruik van een goed certificaat"

View File

@@ -17,10 +17,8 @@
"user": {
"data": {
"host": "Vert",
"password": "Passord",
"port": "",
"ssl": "AdGuard Hjem bruker et SSL-sertifikat",
"username": "Brukernavn",
"verify_ssl": "AdGuard Home bruker et riktig sertifikat"
},
"description": "Sett opp din AdGuard Hjem instans for \u00e5 tillate overv\u00e5king og kontroll.",

View File

@@ -7,7 +7,7 @@
"single_instance_allowed": "Dozwolona jest tylko jedna konfiguracja AdGuard Home."
},
"error": {
"connection_error": "Nie mo\u017cna nawi\u0105za\u0107 po\u0142\u0105czenia."
"connection_error": "[%key_id:common::config_flow::error::cannot_connect%]"
},
"step": {
"hassio_confirm": {
@@ -16,11 +16,11 @@
},
"user": {
"data": {
"host": "Host",
"password": "Has\u0142o",
"port": "Port",
"host": "[%key_id:common::config_flow::data::host%]",
"password": "[%key_id:common::config_flow::data::password%]",
"port": "[%key_id:common::config_flow::data::port%]",
"ssl": "AdGuard Home u\u017cywa certyfikatu SSL",
"username": "Nazwa u\u017cytkownika",
"username": "[%key_id:common::config_flow::data::username%]",
"verify_ssl": "AdGuard Home u\u017cywa odpowiedniego certyfikatu."
},
"description": "Skonfiguruj instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i kontrol\u0119.",

View File

@@ -14,9 +14,7 @@
},
"user": {
"data": {
"host": "Host",
"password": "Senha",
"port": "Porta",
"ssl": "O AdGuard Home usa um certificado SSL",
"username": "Nome de usu\u00e1rio",
"verify_ssl": "O AdGuard Home usa um certificado apropriado"

View File

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

View File

@@ -23,7 +23,7 @@
"username": "\u041b\u043e\u0433\u0438\u043d",
"verify_ssl": "AdGuard Home \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"
},
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f AdGuard Home.",
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 Home Assistant \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f AdGuard Home.",
"title": "AdGuard Home"
}
}

View File

@@ -16,9 +16,7 @@
},
"user": {
"data": {
"host": "V\u00e4rd",
"password": "L\u00f6senord",
"port": "Port",
"ssl": "AdGuard Home anv\u00e4nder ett SSL-certifikat",
"username": "Anv\u00e4ndarnamn",
"verify_ssl": "AdGuard Home anv\u00e4nder ett korrekt certifikat"

View File

@@ -3,9 +3,7 @@
"step": {
"user": {
"data": {
"host": "\u0110\u1ecba ch\u1ec9",
"password": "M\u1eadt kh\u1ea9u",
"port": "C\u1ed5ng",
"username": "T\u00ean \u0111\u0103ng nh\u1eadp"
}
}

View File

@@ -7,7 +7,6 @@
"user": {
"data": {
"password": "\u5bc6\u7801",
"port": "\u7aef\u53e3",
"username": "\u7528\u6237\u540d"
}
}

View File

@@ -6,7 +6,7 @@ import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES_SCHEMA,
PLATFORM_SCHEMA,
BinarySensorDevice,
BinarySensorEntity,
)
from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME
import homeassistant.helpers.config_validation as cv
@@ -37,7 +37,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([ads_sensor])
class AdsBinarySensor(AdsEntity, BinarySensorDevice):
class AdsBinarySensor(AdsEntity, BinarySensorEntity):
"""Representation of ADS binary sensors."""
def __init__(self, ads_hub, name, ads_var, device_class):

View File

@@ -11,7 +11,7 @@ from homeassistant.components.cover import (
SUPPORT_OPEN,
SUPPORT_SET_POSITION,
SUPPORT_STOP,
CoverDevice,
CoverEntity,
)
from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME
import homeassistant.helpers.config_validation as cv
@@ -78,7 +78,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
)
class AdsCover(AdsEntity, CoverDevice):
class AdsCover(AdsEntity, CoverEntity):
"""Representation of ADS cover."""
def __init__(

View File

@@ -7,7 +7,7 @@ from homeassistant.components.light import (
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
@@ -43,7 +43,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([AdsLight(ads_hub, ads_var_enable, ads_var_brightness, name)])
class AdsLight(AdsEntity, Light):
class AdsLight(AdsEntity, LightEntity):
"""Representation of ADS light."""
def __init__(self, ads_hub, ads_var_enable, ads_var_brightness, name):

View File

@@ -3,7 +3,7 @@ import logging
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
@@ -31,7 +31,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([AdsSwitch(ads_hub, name, ads_var)])
class AdsSwitch(AdsEntity, SwitchDevice):
class AdsSwitch(AdsEntity, SwitchEntity):
"""Representation of an ADS switch device."""
async def async_added_to_hass(self):

View File

@@ -0,0 +1,82 @@
"""Support for Agent."""
import asyncio
import logging
from agent import AgentError
from agent.a import Agent
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import CONNECTION, DOMAIN as AGENT_DOMAIN, SERVER_URL
ATTRIBUTION = "ispyconnect.com"
DEFAULT_BRAND = "Agent DVR by ispyconnect.com"
_LOGGER = logging.getLogger(__name__)
FORWARDS = ["camera"]
async def async_setup(hass, config):
"""Old way to set up integrations."""
return True
async def async_setup_entry(hass, config_entry):
"""Set up the Agent component."""
hass.data.setdefault(AGENT_DOMAIN, {})
server_origin = config_entry.data[SERVER_URL]
agent_client = Agent(server_origin, async_get_clientsession(hass))
try:
await agent_client.update()
except AgentError:
await agent_client.close()
raise ConfigEntryNotReady
if not agent_client.is_available:
raise ConfigEntryNotReady
await agent_client.get_devices()
hass.data[AGENT_DOMAIN][config_entry.entry_id] = {CONNECTION: agent_client}
device_registry = await dr.async_get_registry(hass)
device_registry.async_get_or_create(
config_entry_id=config_entry.entry_id,
identifiers={(AGENT_DOMAIN, agent_client.unique)},
manufacturer="iSpyConnect",
name=f"Agent {agent_client.name}",
model="Agent DVR",
sw_version=agent_client.version,
)
for forward in FORWARDS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, forward)
)
return True
async def async_unload_entry(hass, config_entry):
"""Unload a config entry."""
unload_ok = all(
await asyncio.gather(
*[
hass.config_entries.async_forward_entry_unload(config_entry, forward)
for forward in FORWARDS
]
)
)
await hass.data[AGENT_DOMAIN][config_entry.entry_id][CONNECTION].close()
if unload_ok:
hass.data[AGENT_DOMAIN].pop(config_entry.entry_id)
return unload_ok

View File

@@ -0,0 +1,215 @@
"""Support for Agent camera streaming."""
from datetime import timedelta
import logging
from agent import AgentError
from homeassistant.components.camera import SUPPORT_ON_OFF
from homeassistant.components.mjpeg.camera import (
CONF_MJPEG_URL,
CONF_STILL_IMAGE_URL,
MjpegCamera,
filter_urllib3_logging,
)
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME
from homeassistant.helpers import entity_platform
from .const import (
ATTRIBUTION,
CAMERA_SCAN_INTERVAL_SECS,
CONNECTION,
DOMAIN as AGENT_DOMAIN,
)
SCAN_INTERVAL = timedelta(seconds=CAMERA_SCAN_INTERVAL_SECS)
_LOGGER = logging.getLogger(__name__)
_DEV_EN_ALT = "enable_alerts"
_DEV_DS_ALT = "disable_alerts"
_DEV_EN_REC = "start_recording"
_DEV_DS_REC = "stop_recording"
_DEV_SNAP = "snapshot"
CAMERA_SERVICES = {
_DEV_EN_ALT: "async_enable_alerts",
_DEV_DS_ALT: "async_disable_alerts",
_DEV_EN_REC: "async_start_recording",
_DEV_DS_REC: "async_stop_recording",
_DEV_SNAP: "async_snapshot",
}
async def async_setup_entry(
hass, config_entry, async_add_entities, discovery_info=None
):
"""Set up the Agent cameras."""
filter_urllib3_logging()
cameras = []
server = hass.data[AGENT_DOMAIN][config_entry.entry_id][CONNECTION]
if not server.devices:
_LOGGER.warning("Could not fetch cameras from Agent server")
return
for device in server.devices:
if device.typeID == 2:
camera = AgentCamera(device)
cameras.append(camera)
async_add_entities(cameras)
platform = entity_platform.current_platform.get()
for service, method in CAMERA_SERVICES.items():
platform.async_register_entity_service(service, {}, method)
class AgentCamera(MjpegCamera):
"""Representation of an Agent Device Stream."""
def __init__(self, device):
"""Initialize as a subclass of MjpegCamera."""
self._servername = device.client.name
self.server_url = device.client._server_url
device_info = {
CONF_NAME: device.name,
CONF_MJPEG_URL: f"{self.server_url}{device.mjpeg_image_url}&size=640x480",
CONF_STILL_IMAGE_URL: f"{self.server_url}{device.still_image_url}&size=640x480",
}
self.device = device
self._removed = False
self._name = f"{self._servername} {device.name}"
self._unique_id = f"{device._client.unique}_{device.typeID}_{device.id}"
super().__init__(device_info)
@property
def device_info(self):
"""Return the device info for adding the entity to the agent object."""
return {
"identifiers": {(AGENT_DOMAIN, self._unique_id)},
"name": self._name,
"manufacturer": "Agent",
"model": "Camera",
"sw_version": self.device.client.version,
}
async def async_update(self):
"""Update our state from the Agent API."""
try:
await self.device.update()
if self._removed:
_LOGGER.debug("%s reacquired", self._name)
self._removed = False
except AgentError:
if self.device.client.is_available: # server still available - camera error
if not self._removed:
_LOGGER.error("%s lost", self._name)
self._removed = True
@property
def device_state_attributes(self):
"""Return the Agent DVR camera state attributes."""
return {
ATTR_ATTRIBUTION: ATTRIBUTION,
"editable": False,
"enabled": self.is_on,
"connected": self.connected,
"detected": self.is_detected,
"alerted": self.is_alerted,
"has_ptz": self.device.has_ptz,
"alerts_enabled": self.device.alerts_active,
}
@property
def should_poll(self) -> bool:
"""Update the state periodically."""
return True
@property
def is_recording(self) -> bool:
"""Return whether the monitor is recording."""
return self.device.recording
@property
def is_alerted(self) -> bool:
"""Return whether the monitor has alerted."""
return self.device.alerted
@property
def is_detected(self) -> bool:
"""Return whether the monitor has alerted."""
return self.device.detected
@property
def available(self) -> bool:
"""Return True if entity is available."""
return self.device.client.is_available
@property
def connected(self) -> bool:
"""Return True if entity is connected."""
return self.device.connected
@property
def supported_features(self) -> int:
"""Return supported features."""
return SUPPORT_ON_OFF
@property
def is_on(self) -> bool:
"""Return true if on."""
return self.device.online
@property
def icon(self):
"""Return the icon to use in the frontend, if any."""
if self.is_on:
return "mdi:camcorder"
return "mdi:camcorder-off"
@property
def motion_detection_enabled(self):
"""Return the camera motion detection status."""
return self.device.detector_active
@property
def unique_id(self) -> str:
"""Return a unique identifier for this agent object."""
return self._unique_id
async def async_enable_alerts(self):
"""Enable alerts."""
await self.device.alerts_on()
async def async_disable_alerts(self):
"""Disable alerts."""
await self.device.alerts_off()
async def async_enable_motion_detection(self):
"""Enable motion detection."""
await self.device.detector_on()
async def async_disable_motion_detection(self):
"""Disable motion detection."""
await self.device.detector_off()
async def async_start_recording(self):
"""Start recording."""
await self.device.record()
async def async_stop_recording(self):
"""Stop recording."""
await self.device.record_stop()
async def async_turn_on(self):
"""Enable the camera."""
await self.device.enable()
async def async_snapshot(self):
"""Take a snapshot."""
await self.device.snapshot()
async def async_turn_off(self):
"""Disable the camera."""
await self.device.disable()

View File

@@ -0,0 +1,81 @@
"""Config flow to configure Agent devices."""
import logging
from agent import AgentConnectionError, AgentError
from agent.a import Agent
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import DOMAIN, SERVER_URL # pylint:disable=unused-import
from .helpers import generate_url
DEFAULT_PORT = 8090
_LOGGER = logging.getLogger(__name__)
class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle an Agent config flow."""
def __init__(self):
"""Initialize the Agent config flow."""
self.device_config = {}
async def async_step_user(self, info=None):
"""Handle an Agent config flow."""
errors = {}
if info is not None:
host = info[CONF_HOST]
port = info[CONF_PORT]
server_origin = generate_url(host, port)
agent_client = Agent(server_origin, async_get_clientsession(self.hass))
try:
await agent_client.update()
except AgentConnectionError:
pass
except AgentError:
pass
await agent_client.close()
if agent_client.is_available:
await self.async_set_unique_id(agent_client.unique)
self._abort_if_unique_id_configured(
updates={
CONF_HOST: info[CONF_HOST],
CONF_PORT: info[CONF_PORT],
SERVER_URL: server_origin,
}
)
self.device_config = {
CONF_HOST: host,
CONF_PORT: port,
SERVER_URL: server_origin,
}
return await self._create_entry(agent_client.name)
errors["base"] = "device_unavailable"
data = {
vol.Required(CONF_HOST): str,
vol.Required(CONF_PORT, default=DEFAULT_PORT): int,
}
return self.async_show_form(
step_id="user",
description_placeholders=self.device_config,
data_schema=vol.Schema(data),
errors=errors,
)
async def _create_entry(self, server_name):
"""Create entry for device."""
return self.async_create_entry(title=server_name, data=self.device_config)

View File

@@ -0,0 +1,11 @@
"""Constants for agent_dvr component."""
DOMAIN = "agent_dvr"
SERVERS = "servers"
DEVICES = "devices"
ENTITIES = "entities"
CAMERA_SCAN_INTERVAL_SECS = 5
SERVICE_UPDATE = "update"
SIGNAL_UPDATE_AGENT = "agent_update"
ATTRIBUTION = "Data provided by ispyconnect.com"
SERVER_URL = "server_url"
CONNECTION = "connection"

View File

@@ -0,0 +1,13 @@
"""Helpers for Agent DVR component."""
def generate_url(host, port) -> str:
"""Create a URL from the host and port."""
server_origin = host
if "://" not in host:
server_origin = f"http://{host}"
if server_origin[-1] == "/":
server_origin = server_origin[:-1]
return f"{server_origin}:{port}/"

View File

@@ -0,0 +1,8 @@
{
"domain": "agent_dvr",
"name": "Agent DVR",
"documentation": "https://www.home-assistant.io/integrations/agent_dvr/",
"requirements": ["agent-py==0.0.20"],
"config_flow": true,
"codeowners": ["@ispysoftware"]
}

View File

@@ -0,0 +1,34 @@
start_recording:
description: Enable continuous recording.
fields:
entity_id:
description: "Name(s) of the entity to start recording."
example: "camera.camera_1"
stop_recording:
description: Disable continuous recording.
fields:
entity_id:
description: "Name(s) of the entity to stop recording."
example: "camera.camera_1"
enable_alerts:
description: Enable alerts
fields:
entity_id:
description: "Name(s) of the entity to enable alerts."
example: "camera.camera_1"
disable_alerts:
description: Disable alerts
fields:
entity_id:
description: "Name(s) of the entity to disable alerts."
example: "camera.camera_1"
snapshot:
description: Take a photo
fields:
entity_id:
description: "Name(s) of the entity to take a snapshot."
example: "camera.camera_1"

View File

@@ -0,0 +1,21 @@
{
"title": "Agent DVR",
"config": {
"step": {
"user": {
"title": "Set up Agent DVR",
"data": {
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
"abort": {
"already_configured": "Device is already configured"
},
"error": {
"already_in_progress": "Config flow for device is already in progress.",
"device_unavailable": "Device is not available"
}
}
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Dispositiu ja est\u00e0 configurat"
},
"error": {
"already_in_progress": "El flux de dades de configuraci\u00f3 pel dispositiu ja est\u00e0 en curs.",
"device_unavailable": "Dispositiu no est\u00e0 disponible"
},
"step": {
"user": {
"data": {
"host": "Amfitri\u00f3",
"port": "Port"
},
"title": "Configuraci\u00f3 de Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Ger\u00e4t ist bereits konfiguriert"
},
"error": {
"already_in_progress": "Der Konfigurationsfluss f\u00fcr das Ger\u00e4t wird bereits ausgef\u00fchrt.",
"device_unavailable": "Ger\u00e4t ist nicht verf\u00fcgbar"
},
"step": {
"user": {
"data": {
"host": "Host",
"port": "Port"
},
"title": "Richten Sie den Agent DVR ein"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Device is already configured"
},
"error": {
"already_in_progress": "Config flow for device is already in progress.",
"device_unavailable": "Device is not available"
},
"step": {
"user": {
"data": {
"host": "Host",
"port": "Port"
},
"title": "Set up Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "El dispositivo ya est\u00e1 configurado"
},
"error": {
"already_in_progress": "La configuraci\u00f3n del flujo para el dispositivo ya est\u00e1 en marcha.",
"device_unavailable": "El dispositivo no est\u00e1 disponible"
},
"step": {
"user": {
"data": {
"host": "Host",
"port": "Puerto"
},
"title": "Configurar el Agente de DVR"
}
}
},
"title": "Agente DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Laite on jo m\u00e4\u00e4ritetty"
},
"error": {
"already_in_progress": "Laitteen m\u00e4\u00e4ritysvirta on jo k\u00e4ynniss\u00e4.",
"device_unavailable": "Laite ei ole k\u00e4ytett\u00e4viss\u00e4"
},
"step": {
"user": {
"data": {
"host": "Palvelin",
"port": "Portti"
},
"title": "Asenna Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,20 @@
{
"config": {
"abort": {
"already_configured": "L'appareil est d\u00e9j\u00e0 configur\u00e9"
},
"error": {
"already_in_progress": "La configuration de l'appareil est d\u00e9j\u00e0 en cours.",
"device_unavailable": "L'appareil n'est pas disponible"
},
"step": {
"user": {
"data": {
"host": "H\u00f4te",
"port": "Port"
}
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,18 @@
{
"config": {
"abort": {
"already_configured": "\u05d4\u05de\u05db\u05e9\u05d9\u05e8 \u05db\u05d1\u05e8 \u05de\u05d5\u05d2\u05d3\u05e8"
},
"error": {
"device_unavailable": "\u05d4\u05de\u05db\u05e9\u05d9\u05e8 \u05d0\u05d9\u05e0\u05d5 \u05d6\u05de\u05d9\u05df"
},
"step": {
"user": {
"data": {
"host": "Host",
"port": "\u05e4\u05d5\u05e8\u05d8"
}
}
}
}
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Il dispositivo \u00e8 gi\u00e0 configurato"
},
"error": {
"already_in_progress": "Il flusso di configurazione per il dispositivo \u00e8 gi\u00e0 in corso.",
"device_unavailable": "Il dispositivo non \u00e8 disponibile"
},
"step": {
"user": {
"data": {
"host": "Host",
"port": "Porta"
},
"title": "Configurare Agent DVR"
}
}
},
"title": "Agente DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "\uae30\uae30\uac00 \uc774\ubbf8 \uad6c\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4"
},
"error": {
"already_in_progress": "\uae30\uae30 \uad6c\uc131\uc774 \uc774\ubbf8 \uc9c4\ud589 \uc911\uc785\ub2c8\ub2e4.",
"device_unavailable": "\uae30\uae30\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"
},
"step": {
"user": {
"data": {
"host": "\ud638\uc2a4\ud2b8",
"port": "\ud3ec\ud2b8"
},
"title": "Agent DVR \uc124\uc815\ud558\uae30"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Apparat ass scho konfigur\u00e9iert"
},
"error": {
"already_in_progress": "Konfiguratioun's Oflaf fir den Apparat ass schonn am gaangen.",
"device_unavailable": "Apparat ass net erreechbar"
},
"step": {
"user": {
"data": {
"host": "Apparat",
"port": "Port"
},
"title": "Agent DVR ariichten"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Enheten er allerede konfigurert"
},
"error": {
"already_in_progress": "Konfigurasjonsflyt for enhet p\u00e5g\u00e5r allerede.",
"device_unavailable": "Enheten er ikke tilgjengelig"
},
"step": {
"user": {
"data": {
"host": "Vert",
"port": "Port"
},
"title": "Konfigurere Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "[%key_id:common::config_flow::abort::already_configured_device%]"
},
"error": {
"already_in_progress": "Konfiguracja urz\u0105dzenia jest ju\u017c w toku.",
"device_unavailable": "Urz\u0105dzenie nie jest dost\u0119pne."
},
"step": {
"user": {
"data": {
"host": "[%key_id:common::config_flow::data::host%]",
"port": "[%key_id:common::config_flow::data::port%]"
},
"title": "Konfiguracja Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430."
},
"error": {
"already_in_progress": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.",
"device_unavailable": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e."
},
"step": {
"user": {
"data": {
"host": "\u0425\u043e\u0441\u0442",
"port": "\u041f\u043e\u0440\u0442"
},
"title": "Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Enheten \u00e4r redan konfigurerad"
},
"error": {
"already_in_progress": "Konfigurationsfl\u00f6de f\u00f6r enhet p\u00e5g\u00e5r redan.",
"device_unavailable": "Enheten \u00e4r inte tillg\u00e4nglig"
},
"step": {
"user": {
"data": {
"host": "V\u00e4rd",
"port": "Port"
},
"title": "Konfigurera DVR Agent"
}
}
},
"title": "DVR Agent"
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "\u8a2d\u5099\u5df2\u7d93\u8a2d\u5b9a\u5b8c\u6210"
},
"error": {
"already_in_progress": "\u8a2d\u5099\u8a2d\u5b9a\u5df2\u7d93\u9032\u884c\u4e2d\u3002",
"device_unavailable": "\u8a2d\u5099\u7121\u6cd5\u4f7f\u7528"
},
"step": {
"user": {
"data": {
"host": "\u4e3b\u6a5f\u7aef",
"port": "\u901a\u8a0a\u57e0"
},
"title": "\u8a2d\u5b9a Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -69,18 +69,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(sensors, False)
def round_state(func):
"""Round state."""
def _decorator(self):
res = func(self)
if isinstance(res, float):
return round(res)
return res
return _decorator
class AirlySensor(Entity):
"""Define an Airly sensor."""

View File

@@ -6,7 +6,7 @@
"description": "Set up Airly air quality integration. To generate API key go to https://developer.airly.eu/register",
"data": {
"name": "Name of the integration",
"api_key": "Airly API key",
"api_key": "[%key:common::config_flow::data::api_key%]",
"latitude": "Latitude",
"longitude": "Longitude"
}
@@ -20,4 +20,4 @@
"already_configured": "Airly integration for these coordinates is already configured."
}
}
}
}

View File

@@ -15,7 +15,7 @@
"longitude": "Longitud",
"name": "Nom de la integraci\u00f3"
},
"description": "Configura una integraci\u00f3 de qualitat d\u2019aire Airly. Per generar la clau API, v\u00e9s a https://developer.airly.eu/register",
"description": "Configura una integraci\u00f3 de qualitat d'aire Airly. Per generar la clau API, v\u00e9s a https://developer.airly.eu/register",
"title": "Airly"
}
}

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API key",
"api_key": "API Key",
"latitude": "Latitude",
"longitude": "Longitude",
"name": "Name of the integration"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API \ud0a4",
"api_key": "API \ud0a4",
"latitude": "\uc704\ub3c4",
"longitude": "\uacbd\ub3c4",
"name": "\ud1b5\ud569 \uad6c\uc131\uc694\uc18c\uc758 \uc774\ub984"

View File

@@ -1,7 +1,7 @@
{
"config": {
"abort": {
"already_configured": "Airly integrering for disse koordinatene er allerede konfigurert."
"already_configured": "Airly integrasjonen for disse koordinatene er allerede konfigurert."
},
"error": {
"auth": "API-n\u00f8kkelen er ikke korrekt.",
@@ -15,7 +15,7 @@
"longitude": "Lengdegrad",
"name": "Navn p\u00e5 integrasjonen"
},
"description": "Sett opp Airly luftkvalitet integrering. For \u00e5 generere API-n\u00f8kkel g\u00e5 til https://developer.airly.eu/register",
"description": "Sett opp Airly luftkvalitet integrasjon. For \u00e5 opprette API-n\u00f8kkel, g\u00e5 til [https://developer.airly.eu/register](https://developer.airly.eu/register)",
"title": ""
}
}

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Klucz API Airly",
"api_key": "[%key_id:common::config_flow::data::api_key%] Airly",
"latitude": "Szeroko\u015b\u0107 geograficzna",
"longitude": "D\u0142ugo\u015b\u0107 geograficzna",
"name": "Nazwa integracji"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API \u5bc6\u9470",
"api_key": "API \u5bc6\u9470",
"latitude": "\u7def\u5ea6",
"longitude": "\u7d93\u5ea6",
"name": "\u6574\u5408\u540d\u7a31"

View File

@@ -1,38 +1,44 @@
"""The airvisual component."""
import logging
import asyncio
from datetime import timedelta
from math import ceil
from pyairvisual import Client
from pyairvisual.errors import AirVisualError, InvalidKeyError
from pyairvisual.errors import AirVisualError, NodeProError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_API_KEY,
CONF_IP_ADDRESS,
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_PASSWORD,
CONF_SHOW_ON_MAP,
CONF_STATE,
)
from homeassistant.core import callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client, config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import (
CONF_CITY,
CONF_COUNTRY,
CONF_GEOGRAPHIES,
DATA_CLIENT,
DEFAULT_SCAN_INTERVAL,
CONF_INTEGRATION_TYPE,
DATA_COORDINATOR,
DOMAIN,
TOPIC_UPDATE,
INTEGRATION_TYPE_GEOGRAPHY,
INTEGRATION_TYPE_NODE_PRO,
LOGGER,
)
_LOGGER = logging.getLogger(__name__)
DATA_LISTENER = "listener"
PLATFORMS = ["air_quality", "sensor"]
DEFAULT_ATTRIBUTION = "Data provided by AirVisual"
DEFAULT_NODE_PRO_UPDATE_INTERVAL = timedelta(minutes=1)
DEFAULT_OPTIONS = {CONF_SHOW_ON_MAP: True}
GEOGRAPHY_COORDINATES_SCHEMA = vol.Schema(
@@ -66,6 +72,9 @@ CONFIG_SCHEMA = vol.Schema({DOMAIN: CLOUD_API_SCHEMA}, extra=vol.ALLOW_EXTRA)
@callback
def async_get_geography_id(geography_dict):
"""Generate a unique ID from a geography dict."""
if not geography_dict:
return
if CONF_CITY in geography_dict:
return ", ".join(
(
@@ -79,9 +88,56 @@ def async_get_geography_id(geography_dict):
)
@callback
def async_get_cloud_api_update_interval(hass, api_key):
"""Get a leveled scan interval for a particular cloud API key.
This will shift based on the number of active consumers, thus keeping the user
under the monthly API limit.
"""
num_consumers = len(async_get_cloud_coordinators_by_api_key(hass, api_key))
# Assuming 10,000 calls per month and a "smallest possible month" of 28 days; note
# that we give a buffer of 1500 API calls for any drift, restarts, etc.:
minutes_between_api_calls = ceil(1 / (8500 / 28 / 24 / 60 / num_consumers))
LOGGER.debug(
"Leveling API key usage (%s): %s consumers, %s minutes between updates",
api_key,
num_consumers,
minutes_between_api_calls,
)
return timedelta(minutes=minutes_between_api_calls)
@callback
def async_get_cloud_coordinators_by_api_key(hass, api_key):
"""Get all DataUpdateCoordinator objects related to a particular API key."""
coordinators = []
for entry_id, coordinator in hass.data[DOMAIN][DATA_COORDINATOR].items():
config_entry = hass.config_entries.async_get_entry(entry_id)
if config_entry.data.get(CONF_API_KEY) == api_key:
coordinators.append(coordinator)
return coordinators
@callback
def async_sync_geo_coordinator_update_intervals(hass, api_key):
"""Sync the update interval for geography-based data coordinators (by API key)."""
update_interval = async_get_cloud_api_update_interval(hass, api_key)
for coordinator in async_get_cloud_coordinators_by_api_key(hass, api_key):
LOGGER.debug(
"Updating interval for coordinator: %s, %s",
coordinator.name,
update_interval,
)
coordinator.update_interval = update_interval
async def async_setup(hass, config):
"""Set up the AirVisual component."""
hass.data[DOMAIN] = {DATA_CLIENT: {}, DATA_LISTENER: {}}
hass.data[DOMAIN] = {DATA_COORDINATOR: {}}
if DOMAIN not in config:
return True
@@ -103,44 +159,127 @@ async def async_setup(hass, config):
return True
async def async_setup_entry(hass, config_entry):
"""Set up AirVisual as config entry."""
@callback
def _standardize_geography_config_entry(hass, config_entry):
"""Ensure that geography config entries have appropriate properties."""
entry_updates = {}
if not config_entry.unique_id:
# If the config entry doesn't already have a unique ID, set one:
entry_updates["unique_id"] = config_entry.data[CONF_API_KEY]
if not config_entry.options:
# If the config entry doesn't already have any options set, set defaults:
entry_updates["options"] = DEFAULT_OPTIONS
entry_updates["options"] = {CONF_SHOW_ON_MAP: True}
if CONF_INTEGRATION_TYPE not in config_entry.data:
# If the config entry data doesn't contain the integration type, add it:
entry_updates["data"] = {
**config_entry.data,
CONF_INTEGRATION_TYPE: INTEGRATION_TYPE_GEOGRAPHY,
}
if entry_updates:
hass.config_entries.async_update_entry(config_entry, **entry_updates)
if not entry_updates:
return
hass.config_entries.async_update_entry(config_entry, **entry_updates)
@callback
def _standardize_node_pro_config_entry(hass, config_entry):
"""Ensure that Node/Pro config entries have appropriate properties."""
entry_updates = {}
if CONF_INTEGRATION_TYPE not in config_entry.data:
# If the config entry data doesn't contain the integration type, add it:
entry_updates["data"] = {
**config_entry.data,
CONF_INTEGRATION_TYPE: INTEGRATION_TYPE_NODE_PRO,
}
if not entry_updates:
return
hass.config_entries.async_update_entry(config_entry, **entry_updates)
async def async_setup_entry(hass, config_entry):
"""Set up AirVisual as config entry."""
websession = aiohttp_client.async_get_clientsession(hass)
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = AirVisualData(
hass, Client(websession, api_key=config_entry.data[CONF_API_KEY]), config_entry
)
if CONF_API_KEY in config_entry.data:
_standardize_geography_config_entry(hass, config_entry)
try:
await hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id].async_update()
except InvalidKeyError:
_LOGGER.error("Invalid API key provided")
raise ConfigEntryNotReady
client = Client(api_key=config_entry.data[CONF_API_KEY], session=websession)
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, "sensor")
)
async def async_update_data():
"""Get new data from the API."""
if CONF_CITY in config_entry.data:
api_coro = client.api.city(
config_entry.data[CONF_CITY],
config_entry.data[CONF_STATE],
config_entry.data[CONF_COUNTRY],
)
else:
api_coro = client.api.nearest_city(
config_entry.data[CONF_LATITUDE], config_entry.data[CONF_LONGITUDE],
)
async def refresh(event_time):
"""Refresh data from AirVisual."""
await hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id].async_update()
try:
return await api_coro
except AirVisualError as err:
raise UpdateFailed(f"Error while retrieving data: {err}")
hass.data[DOMAIN][DATA_LISTENER][config_entry.entry_id] = async_track_time_interval(
hass, refresh, DEFAULT_SCAN_INTERVAL
)
coordinator = DataUpdateCoordinator(
hass,
LOGGER,
name=async_get_geography_id(config_entry.data),
# We give a placeholder update interval in order to create the coordinator;
# then, below, we use the coordinator's presence (along with any other
# coordinators using the same API key) to calculate an actual, leveled
# update interval:
update_interval=timedelta(minutes=5),
update_method=async_update_data,
)
config_entry.add_update_listener(async_update_options)
hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator
async_sync_geo_coordinator_update_intervals(
hass, config_entry.data[CONF_API_KEY]
)
# Only geography-based entries have options:
config_entry.add_update_listener(async_update_options)
else:
_standardize_node_pro_config_entry(hass, config_entry)
client = Client(session=websession)
async def async_update_data():
"""Get new data from the API."""
try:
return await client.node.from_samba(
config_entry.data[CONF_IP_ADDRESS],
config_entry.data[CONF_PASSWORD],
include_history=False,
include_trends=False,
)
except NodeProError as err:
raise UpdateFailed(f"Error while retrieving data: {err}")
coordinator = DataUpdateCoordinator(
hass,
LOGGER,
name="Node/Pro data",
update_interval=DEFAULT_NODE_PRO_UPDATE_INTERVAL,
update_method=async_update_data,
)
hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator
await coordinator.async_refresh()
for component in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, component)
)
return True
@@ -149,7 +288,7 @@ async def async_migrate_entry(hass, config_entry):
"""Migrate an old config entry."""
version = config_entry.version
_LOGGER.debug("Migrating from version %s", version)
LOGGER.debug("Migrating from version %s", version)
# 1 -> 2: One geography per config entry
if version == 1:
@@ -178,65 +317,95 @@ async def async_migrate_entry(hass, config_entry):
)
)
_LOGGER.info("Migration to version %s successful", version)
LOGGER.info("Migration to version %s successful", version)
return True
async def async_unload_entry(hass, config_entry):
"""Unload an AirVisual config entry."""
hass.data[DOMAIN][DATA_CLIENT].pop(config_entry.entry_id)
unload_ok = all(
await asyncio.gather(
*[
hass.config_entries.async_forward_entry_unload(config_entry, component)
for component in PLATFORMS
]
)
)
if unload_ok:
hass.data[DOMAIN][DATA_COORDINATOR].pop(config_entry.entry_id)
if config_entry.data[CONF_INTEGRATION_TYPE] == INTEGRATION_TYPE_GEOGRAPHY:
# Re-calculate the update interval period for any remaining consumes of this
# API key:
async_sync_geo_coordinator_update_intervals(
hass, config_entry.data[CONF_API_KEY]
)
remove_listener = hass.data[DOMAIN][DATA_LISTENER].pop(config_entry.entry_id)
remove_listener()
await hass.config_entries.async_forward_entry_unload(config_entry, "sensor")
return True
return unload_ok
async def async_update_options(hass, config_entry):
"""Handle an options update."""
airvisual = hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id]
airvisual.async_update_options(config_entry.options)
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id]
await coordinator.async_request_refresh()
class AirVisualData:
"""Define a class to manage data from the AirVisual cloud API."""
class AirVisualEntity(Entity):
"""Define a generic AirVisual entity."""
def __init__(self, hass, client, config_entry):
def __init__(self, coordinator):
"""Initialize."""
self._client = client
self._hass = hass
self.data = {}
self.geography_data = config_entry.data
self.geography_id = config_entry.unique_id
self.options = config_entry.options
self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION}
self._icon = None
self._unit = None
self.coordinator = coordinator
@property
def available(self):
"""Return if entity is available."""
return self.coordinator.last_update_success
@property
def device_state_attributes(self):
"""Return the device state attributes."""
return self._attrs
@property
def icon(self):
"""Return the icon."""
return self._icon
@property
def should_poll(self) -> bool:
"""Disable polling."""
return False
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
return self._unit
async def async_added_to_hass(self):
"""Register callbacks."""
@callback
def update():
"""Update the state."""
self.update_from_latest_data()
self.async_write_ha_state()
self.async_on_remove(self.coordinator.async_add_listener(update))
self.update_from_latest_data()
async def async_update(self):
"""Get new data for all locations from the AirVisual cloud API."""
if CONF_CITY in self.geography_data:
api_coro = self._client.api.city(
self.geography_data[CONF_CITY],
self.geography_data[CONF_STATE],
self.geography_data[CONF_COUNTRY],
)
else:
api_coro = self._client.api.nearest_city(
self.geography_data[CONF_LATITUDE], self.geography_data[CONF_LONGITUDE],
)
"""Update the entity.
try:
self.data[self.geography_id] = await api_coro
except AirVisualError as err:
_LOGGER.error("Error while retrieving data: %s", err)
self.data[self.geography_id] = {}
_LOGGER.debug("Received new data")
async_dispatcher_send(self._hass, TOPIC_UPDATE)
Only used by the generic entity update service.
"""
await self.coordinator.async_request_refresh()
@callback
def async_update_options(self, options):
"""Update the data manager's options."""
self.options = options
async_dispatcher_send(self._hass, TOPIC_UPDATE)
def update_from_latest_data(self):
"""Update the entity from the latest data."""
raise NotImplementedError

View File

@@ -0,0 +1,112 @@
"""Support for AirVisual Node/Pro units."""
from homeassistant.components.air_quality import AirQualityEntity
from homeassistant.const import CONCENTRATION_MICROGRAMS_PER_CUBIC_METER
from homeassistant.core import callback
from . import AirVisualEntity
from .const import (
CONF_INTEGRATION_TYPE,
DATA_COORDINATOR,
DOMAIN,
INTEGRATION_TYPE_NODE_PRO,
)
ATTR_HUMIDITY = "humidity"
ATTR_SENSOR_LIFE = "{0}_sensor_life"
ATTR_VOC = "voc"
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up AirVisual air quality entities based on a config entry."""
# Geography-based AirVisual integrations don't utilize this platform:
if config_entry.data[CONF_INTEGRATION_TYPE] != INTEGRATION_TYPE_NODE_PRO:
return
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id]
async_add_entities([AirVisualNodeProSensor(coordinator)], True)
class AirVisualNodeProSensor(AirVisualEntity, AirQualityEntity):
"""Define a sensor for a AirVisual Node/Pro."""
def __init__(self, airvisual):
"""Initialize."""
super().__init__(airvisual)
self._icon = "mdi:chemical-weapon"
self._unit = CONCENTRATION_MICROGRAMS_PER_CUBIC_METER
@property
def air_quality_index(self):
"""Return the Air Quality Index (AQI)."""
if self.coordinator.data["current"]["settings"]["is_aqi_usa"]:
return self.coordinator.data["current"]["measurements"]["aqi_us"]
return self.coordinator.data["current"]["measurements"]["aqi_cn"]
@property
def available(self):
"""Return True if entity is available."""
return bool(self.coordinator.data)
@property
def carbon_dioxide(self):
"""Return the CO2 (carbon dioxide) level."""
return self.coordinator.data["current"]["measurements"].get("co2")
@property
def device_info(self):
"""Return device registry information for this entity."""
return {
"identifiers": {
(DOMAIN, self.coordinator.data["current"]["serial_number"])
},
"name": self.coordinator.data["current"]["settings"]["node_name"],
"manufacturer": "AirVisual",
"model": f'{self.coordinator.data["current"]["status"]["model"]}',
"sw_version": (
f'Version {self.coordinator.data["current"]["status"]["system_version"]}'
f'{self.coordinator.data["current"]["status"]["app_version"]}'
),
}
@property
def name(self):
"""Return the name."""
node_name = self.coordinator.data["current"]["settings"]["node_name"]
return f"{node_name} Node/Pro: Air Quality"
@property
def particulate_matter_2_5(self):
"""Return the particulate matter 2.5 level."""
return self.coordinator.data["current"]["measurements"].get("pm2_5")
@property
def particulate_matter_10(self):
"""Return the particulate matter 10 level."""
return self.coordinator.data["current"]["measurements"].get("pm1_0")
@property
def particulate_matter_0_1(self):
"""Return the particulate matter 0.1 level."""
return self.coordinator.data["current"]["measurements"].get("pm0_1")
@property
def unique_id(self):
"""Return a unique, Home Assistant friendly identifier for this entity."""
return self.coordinator.data["current"]["serial_number"]
@callback
def update_from_latest_data(self):
"""Update the entity from the latest data."""
self._attrs.update(
{
ATTR_VOC: self.coordinator.data["current"]["measurements"].get("voc"),
**{
ATTR_SENSOR_LIFE.format(pollutant): lifespan
for pollutant, lifespan in self.coordinator.data["current"][
"status"
]["sensor_life"].items()
},
}
)

View File

@@ -2,21 +2,30 @@
import asyncio
from pyairvisual import Client
from pyairvisual.errors import InvalidKeyError
from pyairvisual.errors import InvalidKeyError, NodeProError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import (
CONF_API_KEY,
CONF_IP_ADDRESS,
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_PASSWORD,
CONF_SHOW_ON_MAP,
)
from homeassistant.core import callback
from homeassistant.helpers import aiohttp_client, config_validation as cv
from . import async_get_geography_id
from .const import CONF_GEOGRAPHIES, DOMAIN # pylint: disable=unused-import
from .const import ( # pylint: disable=unused-import
CONF_GEOGRAPHIES,
CONF_INTEGRATION_TYPE,
DOMAIN,
INTEGRATION_TYPE_GEOGRAPHY,
INTEGRATION_TYPE_NODE_PRO,
LOGGER,
)
class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
@@ -26,7 +35,7 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
@property
def cloud_api_schema(self):
def geography_schema(self):
"""Return the data schema for the cloud API."""
return vol.Schema(
{
@@ -40,38 +49,47 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
}
)
@property
def pick_integration_type_schema(self):
"""Return the data schema for picking the integration type."""
return vol.Schema(
{
vol.Required("type"): vol.In(
[INTEGRATION_TYPE_GEOGRAPHY, INTEGRATION_TYPE_NODE_PRO]
)
}
)
@property
def node_pro_schema(self):
"""Return the data schema for a Node/Pro."""
return vol.Schema(
{vol.Required(CONF_IP_ADDRESS): str, vol.Required(CONF_PASSWORD): str}
)
async def _async_set_unique_id(self, unique_id):
"""Set the unique ID of the config flow and abort if it already exists."""
await self.async_set_unique_id(unique_id)
self._abort_if_unique_id_configured()
@callback
async def _show_form(self, errors=None):
"""Show the form to the user."""
return self.async_show_form(
step_id="user", data_schema=self.cloud_api_schema, errors=errors or {},
)
@staticmethod
@callback
def async_get_options_flow(config_entry):
"""Define the config flow to handle options."""
return AirVisualOptionsFlowHandler(config_entry)
async def async_step_import(self, import_config):
"""Import a config entry from configuration.yaml."""
return await self.async_step_user(import_config)
async def async_step_user(self, user_input=None):
"""Handle the start of the config flow."""
async def async_step_geography(self, user_input=None):
"""Handle the initialization of the integration via the cloud API."""
if not user_input:
return await self._show_form()
return self.async_show_form(
step_id="geography", data_schema=self.geography_schema
)
geo_id = async_get_geography_id(user_input)
await self._async_set_unique_id(geo_id)
self._abort_if_unique_id_configured()
# Find older config entries without unique ID
# Find older config entries without unique ID:
for entry in self._async_current_entries():
if entry.version != 1:
continue
@@ -83,7 +101,7 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
return self.async_abort(reason="already_configured")
websession = aiohttp_client.async_get_clientsession(self.hass)
client = Client(websession, api_key=user_input[CONF_API_KEY])
client = Client(session=websession, api_key=user_input[CONF_API_KEY])
# If this is the first (and only the first) time we've seen this API key, check
# that it's valid:
@@ -97,16 +115,66 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
try:
await client.api.nearest_city()
except InvalidKeyError:
return await self._show_form(
errors={CONF_API_KEY: "invalid_api_key"}
return self.async_show_form(
step_id="geography",
data_schema=self.geography_schema,
errors={CONF_API_KEY: "invalid_api_key"},
)
checked_keys.add(user_input[CONF_API_KEY])
return self.async_create_entry(
title=f"Cloud API ({geo_id})", data=user_input
title=f"Cloud API ({geo_id})",
data={**user_input, CONF_INTEGRATION_TYPE: INTEGRATION_TYPE_GEOGRAPHY},
)
async def async_step_import(self, import_config):
"""Import a config entry from configuration.yaml."""
return await self.async_step_geography(import_config)
async def async_step_node_pro(self, user_input=None):
"""Handle the initialization of the integration with a Node/Pro."""
if not user_input:
return self.async_show_form(
step_id="node_pro", data_schema=self.node_pro_schema
)
await self._async_set_unique_id(user_input[CONF_IP_ADDRESS])
websession = aiohttp_client.async_get_clientsession(self.hass)
client = Client(session=websession)
try:
await client.node.from_samba(
user_input[CONF_IP_ADDRESS],
user_input[CONF_PASSWORD],
include_history=False,
include_trends=False,
)
except NodeProError as err:
LOGGER.error("Error connecting to Node/Pro unit: %s", err)
return self.async_show_form(
step_id="node_pro",
data_schema=self.node_pro_schema,
errors={CONF_IP_ADDRESS: "unable_to_connect"},
)
return self.async_create_entry(
title=f"Node/Pro ({user_input[CONF_IP_ADDRESS]})",
data={**user_input, CONF_INTEGRATION_TYPE: INTEGRATION_TYPE_NODE_PRO},
)
async def async_step_user(self, user_input=None):
"""Handle the start of the config flow."""
if not user_input:
return self.async_show_form(
step_id="user", data_schema=self.pick_integration_type_schema
)
if user_input["type"] == INTEGRATION_TYPE_GEOGRAPHY:
return await self.async_step_geography()
return await self.async_step_node_pro()
class AirVisualOptionsFlowHandler(config_entries.OptionsFlow):
"""Handle an AirVisual options flow."""

View File

@@ -1,14 +1,15 @@
"""Define AirVisual constants."""
from datetime import timedelta
import logging
DOMAIN = "airvisual"
LOGGER = logging.getLogger(__package__)
INTEGRATION_TYPE_GEOGRAPHY = "Geographical Location"
INTEGRATION_TYPE_NODE_PRO = "AirVisual Node/Pro"
CONF_CITY = "city"
CONF_COUNTRY = "country"
CONF_GEOGRAPHIES = "geographies"
CONF_INTEGRATION_TYPE = "integration_type"
DATA_CLIENT = "client"
DEFAULT_SCAN_INTERVAL = timedelta(minutes=10)
TOPIC_UPDATE = f"{DOMAIN}_update"
DATA_COORDINATOR = "coordinator"

View File

@@ -3,6 +3,6 @@
"name": "AirVisual",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/airvisual",
"requirements": ["pyairvisual==3.0.1"],
"requirements": ["pyairvisual==4.4.0"],
"codeowners": ["@bachya"]
}

View File

@@ -2,7 +2,6 @@
from logging import getLogger
from homeassistant.const import (
ATTR_ATTRIBUTION,
ATTR_LATITUDE,
ATTR_LONGITUDE,
ATTR_STATE,
@@ -13,12 +12,23 @@ from homeassistant.const import (
CONF_LONGITUDE,
CONF_SHOW_ON_MAP,
CONF_STATE,
DEVICE_CLASS_BATTERY,
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_TEMPERATURE,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
from .const import CONF_CITY, CONF_COUNTRY, DATA_CLIENT, DOMAIN, TOPIC_UPDATE
from . import AirVisualEntity
from .const import (
CONF_CITY,
CONF_COUNTRY,
CONF_INTEGRATION_TYPE,
DATA_COORDINATOR,
DOMAIN,
INTEGRATION_TYPE_GEOGRAPHY,
)
_LOGGER = getLogger(__name__)
@@ -28,8 +38,6 @@ ATTR_POLLUTANT_SYMBOL = "pollutant_symbol"
ATTR_POLLUTANT_UNIT = "pollutant_unit"
ATTR_REGION = "region"
DEFAULT_ATTRIBUTION = "Data provided by AirVisual"
MASS_PARTS_PER_MILLION = "ppm"
MASS_PARTS_PER_BILLION = "ppb"
VOLUME_MICROGRAMS_PER_CUBIC_METER = "µg/m3"
@@ -37,11 +45,22 @@ VOLUME_MICROGRAMS_PER_CUBIC_METER = "µg/m3"
SENSOR_KIND_LEVEL = "air_pollution_level"
SENSOR_KIND_AQI = "air_quality_index"
SENSOR_KIND_POLLUTANT = "main_pollutant"
SENSORS = [
SENSOR_KIND_BATTERY_LEVEL = "battery_level"
SENSOR_KIND_HUMIDITY = "humidity"
SENSOR_KIND_TEMPERATURE = "temperature"
GEOGRAPHY_SENSORS = [
(SENSOR_KIND_LEVEL, "Air Pollution Level", "mdi:gauge", None),
(SENSOR_KIND_AQI, "Air Quality Index", "mdi:chart-line", "AQI"),
(SENSOR_KIND_POLLUTANT, "Main Pollutant", "mdi:chemical-weapon", None),
]
GEOGRAPHY_SENSOR_LOCALES = {"cn": "Chinese", "us": "U.S."}
NODE_PRO_SENSORS = [
(SENSOR_KIND_BATTERY_LEVEL, "Battery", DEVICE_CLASS_BATTERY, UNIT_PERCENTAGE),
(SENSOR_KIND_HUMIDITY, "Humidity", DEVICE_CLASS_HUMIDITY, UNIT_PERCENTAGE),
(SENSOR_KIND_TEMPERATURE, "Temperature", DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS),
]
POLLUTANT_LEVEL_MAPPING = [
{"label": "Good", "icon": "mdi:emoticon-excited", "minimum": 0, "maximum": 50},
@@ -71,31 +90,43 @@ POLLUTANT_MAPPING = {
"s2": {"label": "Sulfur Dioxide", "unit": CONCENTRATION_PARTS_PER_BILLION},
}
SENSOR_LOCALES = {"cn": "Chinese", "us": "U.S."}
async def async_setup_entry(hass, entry, async_add_entities):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up AirVisual sensors based on a config entry."""
airvisual = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id]
async_add_entities(
[
AirVisualSensor(airvisual, kind, name, icon, unit, locale, geography_id)
for geography_id in airvisual.data
for locale in SENSOR_LOCALES
for kind, name, icon, unit in SENSORS
],
True,
)
if config_entry.data[CONF_INTEGRATION_TYPE] == INTEGRATION_TYPE_GEOGRAPHY:
sensors = [
AirVisualGeographySensor(
coordinator, config_entry, kind, name, icon, unit, locale,
)
for locale in GEOGRAPHY_SENSOR_LOCALES
for kind, name, icon, unit in GEOGRAPHY_SENSORS
]
else:
sensors = [
AirVisualNodeProSensor(coordinator, kind, name, device_class, unit)
for kind, name, device_class, unit in NODE_PRO_SENSORS
]
async_add_entities(sensors, True)
class AirVisualSensor(Entity):
"""Define an AirVisual sensor."""
class AirVisualGeographySensor(AirVisualEntity):
"""Define an AirVisual sensor related to geography data via the Cloud API."""
def __init__(self, airvisual, kind, name, icon, unit, locale, geography_id):
def __init__(self, coordinator, config_entry, kind, name, icon, unit, locale):
"""Initialize."""
self._airvisual = airvisual
self._geography_id = geography_id
super().__init__(coordinator)
self._attrs.update(
{
ATTR_CITY: config_entry.data.get(CONF_CITY),
ATTR_STATE: config_entry.data.get(CONF_STATE),
ATTR_COUNTRY: config_entry.data.get(CONF_COUNTRY),
}
)
self._config_entry = config_entry
self._icon = icon
self._kind = kind
self._locale = locale
@@ -103,37 +134,20 @@ class AirVisualSensor(Entity):
self._state = None
self._unit = unit
self._attrs = {
ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION,
ATTR_CITY: airvisual.data[geography_id].get(CONF_CITY),
ATTR_STATE: airvisual.data[geography_id].get(CONF_STATE),
ATTR_COUNTRY: airvisual.data[geography_id].get(CONF_COUNTRY),
}
@property
def available(self):
"""Return True if entity is available."""
try:
return bool(
self._airvisual.data[self._geography_id]["current"]["pollution"]
return self.coordinator.last_update_success and bool(
self.coordinator.data["current"]["pollution"]
)
except KeyError:
return False
@property
def device_state_attributes(self):
"""Return the device state attributes."""
return self._attrs
@property
def icon(self):
"""Return the icon."""
return self._icon
@property
def name(self):
"""Return the name."""
return f"{SENSOR_LOCALES[self._locale]} {self._name}"
return f"{GEOGRAPHY_SENSOR_LOCALES[self._locale]} {self._name}"
@property
def state(self):
@@ -143,27 +157,13 @@ class AirVisualSensor(Entity):
@property
def unique_id(self):
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self._geography_id}_{self._locale}_{self._kind}"
return f"{self._config_entry.unique_id}_{self._locale}_{self._kind}"
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
return self._unit
async def async_added_to_hass(self):
"""Register callbacks."""
@callback
def update():
"""Update the state."""
self.async_schedule_update_ha_state(True)
self.async_on_remove(async_dispatcher_connect(self.hass, TOPIC_UPDATE, update))
async def async_update(self):
"""Update the sensor."""
@callback
def update_from_latest_data(self):
"""Update the entity from the latest data."""
try:
data = self._airvisual.data[self._geography_id]["current"]["pollution"]
data = self.coordinator.data["current"]["pollution"]
except KeyError:
return
@@ -188,18 +188,79 @@ class AirVisualSensor(Entity):
}
)
if CONF_LATITUDE in self._airvisual.geography_data:
if self._airvisual.options[CONF_SHOW_ON_MAP]:
self._attrs[ATTR_LATITUDE] = self._airvisual.geography_data[
CONF_LATITUDE
]
self._attrs[ATTR_LONGITUDE] = self._airvisual.geography_data[
CONF_LONGITUDE
]
if CONF_LATITUDE in self._config_entry.data:
if self._config_entry.options[CONF_SHOW_ON_MAP]:
self._attrs[ATTR_LATITUDE] = self._config_entry.data[CONF_LATITUDE]
self._attrs[ATTR_LONGITUDE] = self._config_entry.data[CONF_LONGITUDE]
self._attrs.pop("lati", None)
self._attrs.pop("long", None)
else:
self._attrs["lati"] = self._airvisual.geography_data[CONF_LATITUDE]
self._attrs["long"] = self._airvisual.geography_data[CONF_LONGITUDE]
self._attrs["lati"] = self._config_entry.data[CONF_LATITUDE]
self._attrs["long"] = self._config_entry.data[CONF_LONGITUDE]
self._attrs.pop(ATTR_LATITUDE, None)
self._attrs.pop(ATTR_LONGITUDE, None)
class AirVisualNodeProSensor(AirVisualEntity):
"""Define an AirVisual sensor related to a Node/Pro unit."""
def __init__(self, coordinator, kind, name, device_class, unit):
"""Initialize."""
super().__init__(coordinator)
self._device_class = device_class
self._kind = kind
self._name = name
self._state = None
self._unit = unit
@property
def device_class(self):
"""Return the device class."""
return self._device_class
@property
def device_info(self):
"""Return device registry information for this entity."""
return {
"identifiers": {
(DOMAIN, self.coordinator.data["current"]["serial_number"])
},
"name": self.coordinator.data["current"]["settings"]["node_name"],
"manufacturer": "AirVisual",
"model": f'{self.coordinator.data["current"]["status"]["model"]}',
"sw_version": (
f'Version {self.coordinator.data["current"]["status"]["system_version"]}'
f'{self.coordinator.data["current"]["status"]["app_version"]}'
),
}
@property
def name(self):
"""Return the name."""
node_name = self.coordinator.data["current"]["settings"]["node_name"]
return f"{node_name} Node/Pro: {self._name}"
@property
def state(self):
"""Return the state."""
return self._state
@property
def unique_id(self):
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self.coordinator.data['current']['serial_number']}_{self._kind}"
@callback
def update_from_latest_data(self):
"""Update the entity from the latest data."""
if self._kind == SENSOR_KIND_BATTERY_LEVEL:
self._state = self.coordinator.data["current"]["status"]["battery"]
elif self._kind == SENSOR_KIND_HUMIDITY:
self._state = self.coordinator.data["current"]["measurements"].get(
"humidity"
)
elif self._kind == SENSOR_KIND_TEMPERATURE:
self._state = self.coordinator.data["current"]["measurements"].get(
"temperature_C"
)

View File

@@ -1,28 +1,50 @@
{
"config": {
"step": {
"user": {
"title": "Configure AirVisual",
"description": "Monitor air quality in a geographical location.",
"geography": {
"title": "Configure a Geography",
"description": "Use the AirVisual cloud API to monitor a geographical location.",
"data": {
"api_key": "API Key",
"api_key": "[%key:common::config_flow::data::api_key%]",
"latitude": "Latitude",
"longitude": "Longitude"
}
},
"node_pro": {
"title": "Configure an AirVisual Node/Pro",
"description": "Monitor a personal AirVisual unit. The password can be retrieved from the unit's UI.",
"data": {
"ip_address": "Unit IP Address/Hostname",
"password": "[%key:common::config_flow::data::password%]"
}
},
"user": {
"title": "Configure AirVisual",
"description": "Pick what type of AirVisual data you want to monitor.",
"data": {
"cloud_api": "Geographical Location",
"node_pro": "AirVisual Node Pro",
"type": "Integration Type"
}
}
},
"error": { "invalid_api_key": "Invalid API key" },
"error": {
"general_error": "There was an unknown error.",
"invalid_api_key": "Invalid API key provided.",
"unable_to_connect": "Unable to connect to Node/Pro unit."
},
"abort": {
"already_configured": "These coordinates have already been registered."
"already_configured": "These coordinates or Node/Pro ID are already registered."
}
},
"options": {
"step": {
"init": {
"title": "Configure AirVisual",
"description": "Set various options for the AirVisual integration.",
"data": { "show_on_map": "Show monitored geography on the map" }
"data": {
"show_on_map": "Show monitored geography on the map"
}
}
}
}
}
}

View File

@@ -4,14 +4,36 @@
"already_configured": "Aquesta clau API ja est\u00e0 sent utilitzada."
},
"error": {
"invalid_api_key": "Clau API inv\u00e0lida"
"general_error": "S'ha produ\u00eft un error desconegut.",
"invalid_api_key": "Clau API proporiconada no v\u00e0lida.",
"unable_to_connect": "No s'ha pogut connectar a la unitat Node/Pro."
},
"step": {
"geography": {
"data": {
"api_key": "[%key::common::config_flow::data::api_key%]",
"latitude": "Latitud",
"longitude": "Longitud"
},
"description": "Utilitza l'API d'AirVisual per monitoritzar una ubicaci\u00f3 geogr\u00e0fica.",
"title": "Configuraci\u00f3 localitzaci\u00f3 geogr\u00e0fica"
},
"node_pro": {
"data": {
"ip_address": "Adre\u00e7a IP o amfitri\u00f3 de la unitat",
"password": "Contrasenya de la unitat"
},
"description": "Monitoritza una unitat personal d'AirVisual. Pots obtenir la contrasenya des de la interf\u00edcie d'usuari (UI) de la unitat.",
"title": "Configuraci\u00f3 d'AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Clau API",
"cloud_api": "Ubicaci\u00f3 geogr\u00e0fica",
"latitude": "Latitud",
"longitude": "Longitud"
"longitude": "Longitud",
"node_pro": "AirVisual Node Pro",
"type": "Tipus d'integraci\u00f3"
},
"description": "Monitoritzaci\u00f3 de la qualitat de l'aire per ubicaci\u00f3 geogr\u00e0fica.",
"title": "Configura AirVisual"

View File

@@ -1,19 +1,40 @@
{
"config": {
"abort": {
"already_configured": "Diese Koordinaten wurden bereits registriert."
"already_configured": "Diese Koordinaten oder Node/Pro ID sind bereits registriert."
},
"error": {
"invalid_api_key": "Ung\u00fcltiger API-Schl\u00fcssel"
"general_error": "Es gab einen unbekannten Fehler.",
"invalid_api_key": "Ung\u00fcltiger API-Schl\u00fcssel bereitgestellt.",
"unable_to_connect": "Verbindung zum Node/Pro-Ger\u00e4t nicht m\u00f6glich."
},
"step": {
"user": {
"geography": {
"data": {
"api_key": "API-Schl\u00fcssel",
"latitude": "Breitengrad",
"longitude": "L\u00e4ngengrad"
},
"description": "\u00dcberwachen Sie die Luftqualit\u00e4t an einem geografischen Ort.",
"title": "Konfigurieren Sie eine Geografie"
},
"node_pro": {
"data": {
"ip_address": "IP-Adresse/Hostname des Ger\u00e4ts",
"password": "Ger\u00e4tekennwort"
},
"description": "\u00dcberwachen Sie eine pers\u00f6nliche AirVisual-Einheit. Das Passwort kann von der Benutzeroberfl\u00e4che des Ger\u00e4ts abgerufen werden.",
"title": "Konfigurieren Sie einen AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "API-Schl\u00fcssel",
"cloud_api": "Geografische Position",
"latitude": "Breitengrad",
"longitude": "L\u00e4ngengrad",
"node_pro": "AirVisual Node Pro",
"type": "Integrationstyp"
},
"description": "W\u00e4hlen Sie aus, welche Art von AirVisual-Daten Sie \u00fcberwachen m\u00f6chten.",
"title": "Konfigurieren Sie AirVisual"
}
}

View File

@@ -1,13 +1,15 @@
{
"config": {
"abort": {
"already_configured": "These coordinates have already been registered."
"already_configured": "These coordinates or Node/Pro ID are already registered."
},
"error": {
"invalid_api_key": "Invalid API key"
"general_error": "There was an unknown error.",
"invalid_api_key": "Invalid API key provided.",
"unable_to_connect": "Unable to connect to Node/Pro unit."
},
"step": {
"user": {
"geography": {
"data": {
"api_key": "API Key",
"latitude": "Latitude",
@@ -19,7 +21,7 @@
"node_pro": {
"data": {
"ip_address": "Unit IP Address/Hostname",
"password": "Unit Password"
"password": "Password"
},
"description": "Monitor a personal AirVisual unit. The password can be retrieved from the unit's UI.",
"title": "Configure an AirVisual Node/Pro"
@@ -49,4 +51,4 @@
}
}
}
}
}

View File

@@ -4,14 +4,34 @@
"already_configured": "Estas coordenadas ya han sido registradas."
},
"error": {
"invalid_api_key": "Clave de API inv\u00e1lida"
"general_error": "Se ha producido un error desconocido.",
"unable_to_connect": "No se puede conectar a la unidad Node/Pro."
},
"step": {
"geography": {
"data": {
"latitude": "Latitud",
"longitude": "Longitud"
},
"description": "Use la API de AirVisual para monitorear una ubicaci\u00f3n geogr\u00e1fica.",
"title": "Configurar una geograf\u00eda"
},
"node_pro": {
"data": {
"ip_address": "Direcci\u00f3n IP/nombre de host de la unidad",
"password": "Contrase\u00f1a de la unidad"
},
"description": "Monitoree una unidad AirVisual personal. La contrase\u00f1a se puede recuperar de la interfaz de usuario de la unidad.",
"title": "Configurar un AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Clave API",
"cloud_api": "Localizaci\u00f3n geogr\u00e1fica",
"latitude": "Latitud",
"longitude": "Longitud"
"longitude": "Longitud",
"node_pro": "AirVisual Node Pro",
"type": "Tipo de integraci\u00f3n"
},
"description": "Monitoree la calidad del aire en una ubicaci\u00f3n geogr\u00e1fica.",
"title": "Configurar AirVisual"

View File

@@ -1,19 +1,41 @@
{
"config": {
"abort": {
"already_configured": "Esta clave API ya est\u00e1 en uso."
"already_configured": "Estas coordenadas o Nodo/Pro ID ya est\u00e1n registradas."
},
"error": {
"invalid_api_key": "Clave API inv\u00e1lida"
"general_error": "Se ha producido un error desconocido.",
"invalid_api_key": "Se proporciona una clave API no v\u00e1lida.",
"unable_to_connect": "No se puede conectar a la unidad Node/Pro."
},
"step": {
"user": {
"geography": {
"data": {
"api_key": "Clave API",
"latitude": "Latitud",
"longitude": "Longitud"
},
"description": "Monitorizar la calidad del aire en una ubicaci\u00f3n geogr\u00e1fica.",
"description": "Utilizar la API en la nube de AirVisual para monitorizar una ubicaci\u00f3n geogr\u00e1fica.",
"title": "Configurar una Geograf\u00eda"
},
"node_pro": {
"data": {
"ip_address": "Direcci\u00f3n IP/Nombre de host de la Unidad",
"password": "Contrase\u00f1a de la Unidad"
},
"description": "Monitorizar una unidad personal AirVisual. La contrase\u00f1a puede ser recuperada desde la interfaz de la unidad.",
"title": "Configurar un AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Clave API",
"cloud_api": "Ubicaci\u00f3n Geogr\u00e1fica",
"latitude": "Latitud",
"longitude": "Longitud",
"node_pro": "AirVisual Node Pro",
"type": "Tipo de Integraci\u00f3n"
},
"description": "Elige qu\u00e9 tipo de datos de AirVisual quieres monitorear.",
"title": "Configurar AirVisual"
}
}

View File

@@ -0,0 +1,28 @@
{
"config": {
"error": {
"general_error": "Tapahtui tuntematon virhe."
},
"step": {
"geography": {
"data": {
"api_key": "API-avain",
"latitude": "Leveysaste",
"longitude": "Pituusaste"
}
},
"node_pro": {
"data": {
"password": "Salasana"
}
},
"user": {
"data": {
"cloud_api": "Maantieteellinen sijainti",
"node_pro": "AirVisual Node Pro",
"type": "Integrointityyppi"
}
}
}
}
}

View File

@@ -4,15 +4,37 @@
"already_configured": "Cette cl\u00e9 API est d\u00e9j\u00e0 utilis\u00e9e."
},
"error": {
"invalid_api_key": "Cl\u00e9 API invalide"
"general_error": "Une erreur inconnue est survenue.",
"invalid_api_key": "La cl\u00e9 API fournie n'est pas valide.",
"unable_to_connect": "Impossible de se connecter \u00e0 l'unit\u00e9 Node / Pro."
},
"step": {
"user": {
"geography": {
"data": {
"api_key": "Cl\u00e9 API",
"latitude": "Latitude",
"longitude": "Longitude"
},
"description": "Utilisez l'API cloud AirVisual pour surveiller une position g\u00e9ographique.",
"title": "Configurer une g\u00e9ographie"
},
"node_pro": {
"data": {
"ip_address": "Adresse IP / nom d'h\u00f4te de l'unit\u00e9",
"password": "Mot de passe de l'unit\u00e9"
},
"description": "Surveillez une unit\u00e9 AirVisual personnelle. Le mot de passe peut \u00eatre r\u00e9cup\u00e9r\u00e9 dans l'interface utilisateur de l'unit\u00e9.",
"title": "Configurer un AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Cl\u00e9 API",
"cloud_api": "Localisation g\u00e9ographique",
"latitude": "Latitude",
"longitude": "Longitude",
"node_pro": "AirVisual Node Pro",
"type": "Type d'int\u00e9gration"
},
"description": "Surveiller la qualit\u00e9 de l\u2019air dans un emplacement g\u00e9ographique.",
"title": "Configurer AirVisual"
}
@@ -21,6 +43,9 @@
"options": {
"step": {
"init": {
"data": {
"show_on_map": "Afficher la g\u00e9ographie surveill\u00e9e sur la carte"
},
"description": "D\u00e9finissez diverses options pour l'int\u00e9gration d'AirVisual.",
"title": "Configurer AirVisual"
}

View File

@@ -0,0 +1,14 @@
{
"config": {
"error": {
"invalid_api_key": "\u05de\u05e4\u05ea\u05d7 API \u05dc\u05d0 \u05d7\u05d5\u05e7\u05d9 \u05e1\u05d5\u05e4\u05e7"
},
"step": {
"geography": {
"data": {
"api_key": "\u05de\u05e4\u05ea\u05d7 API"
}
}
}
}
}

View File

@@ -0,0 +1,33 @@
{
"config": {
"error": {
"general_error": "\u0915\u094b\u0908 \u0905\u091c\u094d\u091e\u093e\u0924 \u0924\u094d\u0930\u0941\u091f\u093f \u0925\u0940\u0964",
"unable_to_connect": "\u0928\u094b\u0921 / \u092a\u094d\u0930\u094b \u0907\u0915\u093e\u0908 \u0938\u0947 \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925\u0964"
},
"step": {
"geography": {
"data": {
"latitude": "\u0905\u0915\u094d\u0937\u093e\u0902\u0936",
"longitude": "\u0926\u0947\u0936\u093e\u0928\u094d\u0924\u0930"
},
"description": "\u092d\u094c\u0917\u094b\u0932\u093f\u0915 \u0938\u094d\u0925\u093f\u0924\u093f \u0915\u0940 \u0928\u093f\u0917\u0930\u093e\u0928\u0940 \u0915\u0947 \u0932\u093f\u090f \u090f\u092f\u0930\u0935\u093f\u091c\u0941\u0905\u0932 \u0915\u094d\u0932\u093e\u0909\u0921 \u090f\u092a\u0940\u0906\u0908 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0947\u0902\u0964",
"title": "\u092d\u0942\u0917\u094b\u0932 \u0915\u0949\u0928\u094d\u092b\u093c\u093f\u0917\u0930 \u0915\u0930\u0947\u0902"
},
"node_pro": {
"data": {
"ip_address": "\u0907\u0915\u093e\u0908 \u0915\u0947 \u0906\u0908\u092a\u0940 \u092a\u0924\u0947/\u0939\u094b\u0938\u094d\u091f\u0928\u093e\u092e",
"password": "\u0907\u0915\u093e\u0908 \u092a\u093e\u0938\u0935\u0930\u094d\u0921"
},
"description": "\u090f\u0915 \u0935\u094d\u092f\u0915\u094d\u0924\u093f\u0917\u0924 \u090f\u092f\u0930\u0935\u093f\u091c\u0941\u0905\u0932 \u0907\u0915\u093e\u0908 \u0915\u0940 \u0928\u093f\u0917\u0930\u093e\u0928\u0940 \u0915\u0930\u0947\u0902\u0964 \u092a\u093e\u0938\u0935\u0930\u094d\u0921 \u092f\u0942\u0928\u093f\u091f \u0915\u0947 \u092f\u0942\u0906\u0908 \u0938\u0947 \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u093f\u092f\u093e \u091c\u093e \u0938\u0915\u0924\u093e \u0939\u0948\u0964",
"title": "\u090f\u092f\u0930\u0935\u093f\u091c\u0941\u0905\u0932 \u0928\u094b\u0921 \u092a\u094d\u0930\u094b"
},
"user": {
"data": {
"cloud_api": "\u092d\u094c\u0917\u094b\u0932\u093f\u0915 \u0938\u094d\u0925\u093f\u0924\u093f",
"node_pro": "\u090f\u092f\u0930\u0935\u093f\u091c\u0941\u0905\u0932 \u0928\u094b\u0921 \u092a\u094d\u0930\u094b",
"type": "\u090f\u0915\u0940\u0915\u0930\u0923 \u092a\u094d\u0930\u0915\u093e\u0930"
}
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"error": {
"general_error": "Ismeretlen hiba t\u00f6rt\u00e9nt."
},
"step": {
"geography": {
"data": {
"api_key": "API Kulcs",
"latitude": "Sz\u00e9less\u00e9g",
"longitude": "Hossz\u00fas\u00e1g"
}
}
}
}
}

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