1
mirror of https://github.com/home-assistant/core synced 2024-09-28 03:04:04 +02:00

Merge pull request #21238 from home-assistant/rc

0.88.0
This commit is contained in:
Paulus Schoutsen 2019-02-20 11:13:27 -08:00 committed by GitHub
commit 7bd5e60767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1414 changed files with 18489 additions and 11041 deletions

View File

@ -10,484 +10,33 @@ omit =
homeassistant/helpers/signal.py
# omit pieces of code that rely on external devices being present
homeassistant/components/abode.py
homeassistant/components/*/abode.py
homeassistant/components/ads/__init__.py
homeassistant/components/*/ads.py
homeassistant/components/alarmdecoder.py
homeassistant/components/*/alarmdecoder.py
homeassistant/components/ambient_station/__init__.py
homeassistant/components/ambient_station/sensor.py
homeassistant/components/amcrest.py
homeassistant/components/*/amcrest.py
homeassistant/components/apcupsd.py
homeassistant/components/*/apcupsd.py
homeassistant/components/apple_tv.py
homeassistant/components/*/apple_tv.py
homeassistant/components/aqualogic.py
homeassistant/components/*/aqualogic.py
homeassistant/components/arduino.py
homeassistant/components/*/arduino.py
homeassistant/components/bmw_connected_drive/*.py
homeassistant/components/*/bmw_connected_drive.py
homeassistant/components/android_ip_webcam.py
homeassistant/components/*/android_ip_webcam.py
homeassistant/components/arlo.py
homeassistant/components/*/arlo.py
homeassistant/components/asterisk_mbox.py
homeassistant/components/*/asterisk_mbox.py
homeassistant/components/*/asterisk_cdr.py
homeassistant/components/august.py
homeassistant/components/*/august.py
homeassistant/components/axis.py
homeassistant/components/*/axis.py
homeassistant/components/bbb_gpio.py
homeassistant/components/*/bbb_gpio.py
homeassistant/components/blink/*
homeassistant/components/*/blink.py
homeassistant/components/bloomsky.py
homeassistant/components/*/bloomsky.py
homeassistant/components/coinbase.py
homeassistant/components/sensor/coinbase.py
homeassistant/components/cast/*
homeassistant/components/*/cast.py
homeassistant/components/cloudflare.py
homeassistant/components/comfoconnect.py
homeassistant/components/*/comfoconnect.py
homeassistant/components/daikin/__init__.py
homeassistant/components/daikin/const.py
homeassistant/components/*/daikin.py
homeassistant/components/digital_ocean.py
homeassistant/components/*/digital_ocean.py
homeassistant/components/danfoss_air/*
homeassistant/components/dominos.py
homeassistant/components/doorbird.py
homeassistant/components/*/doorbird.py
homeassistant/components/dovado/*
homeassistant/components/dweet.py
homeassistant/components/*/dweet.py
homeassistant/components/eight_sleep.py
homeassistant/components/*/eight_sleep.py
homeassistant/components/ecoal_boiler.py
homeassistant/components/*/ecoal_boiler.py
homeassistant/components/ecobee.py
homeassistant/components/*/ecobee.py
homeassistant/components/edp_redy.py
homeassistant/components/*/edp_redy.py
homeassistant/components/egardia.py
homeassistant/components/*/egardia.py
homeassistant/components/elkm1/*
homeassistant/components/*/elkm1.py
homeassistant/components/enocean.py
homeassistant/components/*/enocean.py
homeassistant/components/envisalink/__init__.py
homeassistant/components/*/envisalink.py
homeassistant/components/evohome.py
homeassistant/components/*/evohome.py
homeassistant/components/freebox.py
homeassistant/components/*/freebox.py
homeassistant/components/fritzbox.py
homeassistant/components/*/fritzbox.py
homeassistant/components/ecovacs.py
homeassistant/components/*/ecovacs.py
homeassistant/components/esphome/__init__.py
homeassistant/components/esphome/binary_sensor.py
homeassistant/components/esphome/cover.py
homeassistant/components/esphome/fan.py
homeassistant/components/esphome/light.py
homeassistant/components/esphome/sensor.py
homeassistant/components/esphome/switch.py
homeassistant/components/eufy.py
homeassistant/components/*/eufy.py
homeassistant/components/fibaro/__init__.py
homeassistant/components/*/fibaro.py
homeassistant/components/gc100.py
homeassistant/components/*/gc100.py
homeassistant/components/google.py
homeassistant/components/*/google.py
homeassistant/components/greeneye_monitor.py
homeassistant/components/sensor/greeneye_monitor.py
homeassistant/components/habitica/*
homeassistant/components/*/habitica.py
homeassistant/components/hangouts/__init__.py
homeassistant/components/hangouts/const.py
homeassistant/components/hangouts/hangouts_bot.py
homeassistant/components/hangouts/hangups_utils.py
homeassistant/components/hangouts/intents.py
homeassistant/components/*/hangouts.py
homeassistant/components/hdmi_cec.py
homeassistant/components/*/hdmi_cec.py
homeassistant/components/hive.py
homeassistant/components/*/hive.py
homeassistant/components/hlk_sw16.py
homeassistant/components/*/hlk_sw16.py
homeassistant/components/homekit_controller/*
homeassistant/components/homematic/__init__.py
homeassistant/components/*/homematic.py
homeassistant/components/homematicip_cloud/hap.py
homeassistant/components/homematicip_cloud/device.py
homeassistant/components/*/homematicip_cloud.py
homeassistant/components/homeworks.py
homeassistant/components/*/homeworks.py
homeassistant/components/huawei_lte.py
homeassistant/components/*/huawei_lte.py
homeassistant/components/hydrawise.py
homeassistant/components/*/hydrawise.py
homeassistant/components/ihc/*
homeassistant/components/*/ihc.py
homeassistant/components/insteon/*
homeassistant/components/*/insteon.py
homeassistant/components/insteon_local.py
homeassistant/components/insteon_plm.py
homeassistant/components/ios.py
homeassistant/components/*/ios.py
homeassistant/components/iota.py
homeassistant/components/*/iota.py
homeassistant/components/isy994.py
homeassistant/components/*/isy994.py
homeassistant/components/joaoapps_join.py
homeassistant/components/*/joaoapps_join.py
homeassistant/components/juicenet.py
homeassistant/components/*/juicenet.py
homeassistant/components/kira.py
homeassistant/components/*/kira.py
homeassistant/components/knx.py
homeassistant/components/*/knx.py
homeassistant/components/konnected.py
homeassistant/components/*/konnected.py
homeassistant/components/lametric.py
homeassistant/components/*/lametric.py
homeassistant/components/lcn.py
homeassistant/components/*/lcn.py
homeassistant/components/linode.py
homeassistant/components/*/linode.py
homeassistant/components/lightwave.py
homeassistant/components/*/lightwave.py
homeassistant/components/logi_circle.py
homeassistant/components/*/logi_circle.py
homeassistant/components/lupusec.py
homeassistant/components/*/lupusec.py
homeassistant/components/lutron.py
homeassistant/components/*/lutron.py
homeassistant/components/lutron_caseta.py
homeassistant/components/*/lutron_caseta.py
homeassistant/components/mailgun/notify.py
homeassistant/components/matrix.py
homeassistant/components/*/matrix.py
homeassistant/components/maxcube.py
homeassistant/components/*/maxcube.py
homeassistant/components/mochad.py
homeassistant/components/*/mochad.py
homeassistant/components/modbus.py
homeassistant/components/*/modbus.py
homeassistant/components/mychevy.py
homeassistant/components/*/mychevy.py
homeassistant/components/mysensors/*
homeassistant/components/*/mysensors.py
homeassistant/components/neato.py
homeassistant/components/*/neato.py
homeassistant/components/nest/__init__.py
homeassistant/components/*/nest.py
homeassistant/components/netatmo.py
homeassistant/components/*/netatmo.py
homeassistant/components/netgear_lte.py
homeassistant/components/*/netgear_lte.py
homeassistant/components/octoprint.py
homeassistant/components/*/octoprint.py
homeassistant/components/opencv.py
homeassistant/components/*/opencv.py
homeassistant/components/opentherm_gw/*
homeassistant/components/*/opentherm_gw.py
homeassistant/components/openuv/__init__.py
homeassistant/components/openuv/binary_sensor.py
homeassistant/components/openuv/sensor.py
homeassistant/components/plum_lightpad.py
homeassistant/components/*/plum_lightpad.py
homeassistant/components/pilight.py
homeassistant/components/*/pilight.py
homeassistant/components/point/__init__.py
homeassistant/components/point/const.py
homeassistant/components/*/point.py
homeassistant/components/switch/qwikswitch.py
homeassistant/components/light/qwikswitch.py
homeassistant/components/rachio.py
homeassistant/components/*/rachio.py
homeassistant/components/raincloud.py
homeassistant/components/*/raincloud.py
homeassistant/components/rainmachine/__init__.py
homeassistant/components/rainmachine/binary_sensor.py
homeassistant/components/rainmachine/sensor.py
homeassistant/components/rainmachine/switch.py
homeassistant/components/raspihats.py
homeassistant/components/*/raspihats.py
homeassistant/components/*/raspyrfm.py
homeassistant/components/rfxtrx.py
homeassistant/components/*/rfxtrx.py
homeassistant/components/roku.py
homeassistant/components/*/roku.py
homeassistant/components/rpi_gpio.py
homeassistant/components/*/rpi_gpio.py
homeassistant/components/rpi_pfio.py
homeassistant/components/*/rpi_pfio.py
homeassistant/components/sabnzbd.py
homeassistant/components/*/sabnzbd.py
homeassistant/components/satel_integra.py
homeassistant/components/*/satel_integra.py
homeassistant/components/scsgate.py
homeassistant/components/*/scsgate.py
homeassistant/components/sense.py
homeassistant/components/*/sense.py
homeassistant/components/simplisafe/__init__.py
homeassistant/components/simplisafe/alarm_control_panel.py
homeassistant/components/sisyphus.py
homeassistant/components/*/sisyphus.py
homeassistant/components/skybell.py
homeassistant/components/*/skybell.py
homeassistant/components/smappee.py
homeassistant/components/*/smappee.py
homeassistant/components/sonos/__init__.py
homeassistant/components/*/sonos.py
homeassistant/components/tado.py
homeassistant/components/*/tado.py
homeassistant/components/tahoma.py
homeassistant/components/*/tahoma.py
homeassistant/components/tellduslive/__init__.py
homeassistant/components/tellduslive/entry.py
homeassistant/components/*/tellduslive.py
homeassistant/components/tellstick.py
homeassistant/components/*/tellstick.py
homeassistant/components/tesla.py
homeassistant/components/*/tesla.py
homeassistant/components/thethingsnetwork.py
homeassistant/components/*/thethingsnetwork.py
homeassistant/components/*/thinkingcleaner.py
homeassistant/components/tibber/*
homeassistant/components/*/tibber.py
homeassistant/components/toon.py
homeassistant/components/*/toon.py
homeassistant/components/tplink_lte.py
homeassistant/components/*/tplink_lte.py
homeassistant/components/tradfri.py
homeassistant/components/*/tradfri.py
homeassistant/components/transmission.py
homeassistant/components/*/transmission.py
homeassistant/components/notify/twilio_sms.py
homeassistant/components/notify/twilio_call.py
homeassistant/components/upcloud.py
homeassistant/components/*/upcloud.py
homeassistant/components/usps.py
homeassistant/components/*/usps.py
homeassistant/components/velbus.py
homeassistant/components/*/velbus.py
homeassistant/components/velux.py
homeassistant/components/*/velux.py
homeassistant/components/vera.py
homeassistant/components/*/vera.py
homeassistant/components/verisure.py
homeassistant/components/*/verisure.py
homeassistant/components/volvooncall.py
homeassistant/components/*/volvooncall.py
homeassistant/components/waterfurnace.py
homeassistant/components/*/waterfurnace.py
homeassistant/components/*/webostv.py
homeassistant/components/w800rf32.py
homeassistant/components/*/w800rf32.py
homeassistant/components/wemo.py
homeassistant/components/*/wemo.py
homeassistant/components/wink/*
homeassistant/components/*/wink.py
homeassistant/components/wirelesstag.py
homeassistant/components/*/wirelesstag.py
homeassistant/components/xiaomi_aqara.py
homeassistant/components/*/xiaomi_aqara.py
homeassistant/components/*/xiaomi_miio.py
homeassistant/components/zabbix.py
homeassistant/components/*/zabbix.py
homeassistant/components/zha/__init__.py
homeassistant/components/zha/binary_sensor.py
homeassistant/components/zha/const.py
homeassistant/components/zha/event.py
homeassistant/components/zha/fan.py
homeassistant/components/zha/light.py
homeassistant/components/zha/sensor.py
homeassistant/components/zha/switch.py
homeassistant/components/zha/api.py
homeassistant/components/zha/entity.py
homeassistant/components/zha/device_entity.py
homeassistant/components/zha/core/helpers.py
homeassistant/components/zha/core/const.py
homeassistant/components/zha/core/device.py
homeassistant/components/zha/core/listeners.py
homeassistant/components/zha/core/gateway.py
homeassistant/components/*/zha.py
homeassistant/components/zigbee.py
homeassistant/components/*/zigbee.py
homeassistant/components/zoneminder/*
homeassistant/components/tuya.py
homeassistant/components/*/tuya.py
homeassistant/components/spider.py
homeassistant/components/*/spider.py
homeassistant/components/air_quality/opensensemap.py
homeassistant/components/abode/*
homeassistant/components/ads/*
homeassistant/components/air_quality/nilu.py
homeassistant/components/air_quality/norway_air.py
homeassistant/components/air_quality/opensensemap.py
homeassistant/components/alarm_control_panel/alarmdotcom.py
homeassistant/components/alarm_control_panel/canary.py
homeassistant/components/alarm_control_panel/concord232.py
homeassistant/components/alarm_control_panel/ialarm.py
homeassistant/components/alarm_control_panel/ifttt.py
homeassistant/components/alarm_control_panel/manual_mqtt.py
homeassistant/components/alarm_control_panel/nx584.py
homeassistant/components/alarm_control_panel/totalconnect.py
homeassistant/components/alarm_control_panel/yale_smart_alarm.py
homeassistant/components/apiai.py
homeassistant/components/alarmdecoder/*
homeassistant/components/ambient_station/*
homeassistant/components/amcrest/*
homeassistant/components/android_ip_webcam/*
homeassistant/components/apcupsd/*
homeassistant/components/apiai/*
homeassistant/components/apple_tv/*
homeassistant/components/aqualogic/*
homeassistant/components/arduino/*
homeassistant/components/arlo/*
homeassistant/components/asterisk_mbox/*
homeassistant/components/august/*
homeassistant/components/axis/*
homeassistant/components/bbb_gpio/*
homeassistant/components/binary_sensor/arest.py
homeassistant/components/binary_sensor/concord232.py
homeassistant/components/binary_sensor/flic.py
@ -498,7 +47,10 @@ omit =
homeassistant/components/binary_sensor/rest.py
homeassistant/components/binary_sensor/tapsaff.py
homeassistant/components/binary_sensor/uptimerobot.py
homeassistant/components/browser.py
homeassistant/components/blink/*
homeassistant/components/bloomsky/*
homeassistant/components/bmw_connected_drive/*
homeassistant/components/browser/*
homeassistant/components/calendar/caldav.py
homeassistant/components/calendar/todoist.py
homeassistant/components/camera/bloomsky.py
@ -515,6 +67,8 @@ omit =
homeassistant/components/camera/xeoma.py
homeassistant/components/camera/xiaomi.py
homeassistant/components/camera/yi.py
homeassistant/components/cast/*
homeassistant/components/climate/coolmaster.py
homeassistant/components/climate/ephember.py
homeassistant/components/climate/eq3btsmart.py
homeassistant/components/climate/flexit.py
@ -530,6 +84,9 @@ omit =
homeassistant/components/climate/touchline.py
homeassistant/components/climate/venstar.py
homeassistant/components/climate/zhong_hong.py
homeassistant/components/cloudflare/*
homeassistant/components/coinbase/*
homeassistant/components/comfoconnect/*
homeassistant/components/cover/aladdin_connect.py
homeassistant/components/cover/brunt.py
homeassistant/components/cover/garadget.py
@ -540,6 +97,8 @@ omit =
homeassistant/components/cover/opengarage.py
homeassistant/components/cover/rpi_gpio.py
homeassistant/components/cover/scsgate.py
homeassistant/components/daikin/*
homeassistant/components/danfoss_air/*
homeassistant/components/device_tracker/actiontec.py
homeassistant/components/device_tracker/aruba.py
homeassistant/components/device_tracker/asuswrt.py
@ -553,7 +112,6 @@ omit =
homeassistant/components/device_tracker/ddwrt.py
homeassistant/components/device_tracker/fritz.py
homeassistant/components/device_tracker/google_maps.py
homeassistant/components/device_tracker/googlehome.py
homeassistant/components/device_tracker/hitron_coda.py
homeassistant/components/device_tracker/huawei_router.py
homeassistant/components/device_tracker/icloud.py
@ -579,23 +137,84 @@ omit =
homeassistant/components/device_tracker/traccar.py
homeassistant/components/device_tracker/trackr.py
homeassistant/components/device_tracker/ubus.py
homeassistant/components/downloader.py
homeassistant/components/emoncms_history.py
homeassistant/components/digital_ocean/*
homeassistant/components/dominos/*
homeassistant/components/doorbird/*
homeassistant/components/dovado/*
homeassistant/components/downloader/*
homeassistant/components/dweet/*
homeassistant/components/ebusd/*
homeassistant/components/ecoal_boiler/*
homeassistant/components/ecobee/*
homeassistant/components/ecovacs/*
homeassistant/components/edp_redy/*
homeassistant/components/egardia/*
homeassistant/components/eight_sleep/*
homeassistant/components/elkm1/*
homeassistant/components/emoncms_history/*
homeassistant/components/emulated_hue/upnp.py
homeassistant/components/fan/mqtt.py
homeassistant/components/enocean/*
homeassistant/components/envisalink/*
homeassistant/components/esphome/__init__.py
homeassistant/components/esphome/binary_sensor.py
homeassistant/components/esphome/cover.py
homeassistant/components/esphome/fan.py
homeassistant/components/esphome/light.py
homeassistant/components/esphome/sensor.py
homeassistant/components/esphome/switch.py
homeassistant/components/eufy/*
homeassistant/components/evohome/*
homeassistant/components/fan/wemo.py
homeassistant/components/folder_watcher.py
homeassistant/components/foursquare.py
homeassistant/components/goalfeed.py
homeassistant/components/idteck_prox.py
homeassistant/components/ifttt.py
homeassistant/components/fastdotcom/*
homeassistant/components/fibaro/*
homeassistant/components/folder_watcher/*
homeassistant/components/foursquare/*
homeassistant/components/freebox/*
homeassistant/components/fritzbox/*
homeassistant/components/gc100/*
homeassistant/components/goalfeed/*
homeassistant/components/google/*
homeassistant/components/googlehome/*
homeassistant/components/greeneye_monitor/*
homeassistant/components/habitica/*
homeassistant/components/hangouts/__init__.py
homeassistant/components/hangouts/*
homeassistant/components/hangouts/const.py
homeassistant/components/hangouts/hangouts_bot.py
homeassistant/components/hangouts/hangups_utils.py
homeassistant/components/hdmi_cec/*
homeassistant/components/hive/*
homeassistant/components/hlk_sw16/*
homeassistant/components/homekit_controller/*
homeassistant/components/homematic/*
homeassistant/components/homematicip_cloud/*
homeassistant/components/homeworks/*
homeassistant/components/huawei_lte/*
homeassistant/components/hydrawise/*
homeassistant/components/idteck_prox/*
homeassistant/components/ifttt/*
homeassistant/components/ihc/*
homeassistant/components/image_processing/dlib_face_detect.py
homeassistant/components/image_processing/dlib_face_identify.py
homeassistant/components/image_processing/qrcode.py
homeassistant/components/image_processing/seven_segments.py
homeassistant/components/image_processing/tensorflow.py
homeassistant/components/image_processing/qrcode.py
homeassistant/components/keyboard_remote.py
homeassistant/components/keyboard.py
homeassistant/components/insteon_local/*
homeassistant/components/insteon_plm/*
homeassistant/components/insteon/*
homeassistant/components/ios/*
homeassistant/components/iota/*
homeassistant/components/isy994/*
homeassistant/components/joaoapps_join/*
homeassistant/components/juicenet/*
homeassistant/components/keyboard_remote/*
homeassistant/components/keyboard/*
homeassistant/components/kira/*
homeassistant/components/knx/*
homeassistant/components/konnected/*
homeassistant/components/lametric/*
homeassistant/components/lcn/*
homeassistant/components/lifx/*
homeassistant/components/light/avion.py
homeassistant/components/light/blinksticklight.py
homeassistant/components/light/blinkt.py
@ -609,7 +228,6 @@ omit =
homeassistant/components/light/hyperion.py
homeassistant/components/light/iglo.py
homeassistant/components/light/lifx_legacy.py
homeassistant/components/light/lifx.py
homeassistant/components/light/limitlessled.py
homeassistant/components/light/lw12wifi.py
homeassistant/components/light/mystrom.py
@ -627,14 +245,25 @@ omit =
homeassistant/components/light/yeelight.py
homeassistant/components/light/yeelightsunflower.py
homeassistant/components/light/zengge.py
homeassistant/components/lirc.py
homeassistant/components/lightwave/*
homeassistant/components/linode/*
homeassistant/components/lirc/*
homeassistant/components/lock/kiwi.py
homeassistant/components/lock/lockitron.py
homeassistant/components/lock/nello.py
homeassistant/components/lock/nuki.py
homeassistant/components/lock/sesame.py
homeassistant/components/map.py
homeassistant/components/media_extractor.py
homeassistant/components/logi_circle/*
homeassistant/components/luftdaten/*
homeassistant/components/lupusec/*
homeassistant/components/lutron_caseta/*
homeassistant/components/lutron/*
homeassistant/components/mailbox/asterisk_cdr.py
homeassistant/components/mailgun/notify.py
homeassistant/components/map/*
homeassistant/components/matrix/*
homeassistant/components/maxcube/*
homeassistant/components/media_extractor/*
homeassistant/components/media_player/anthemav.py
homeassistant/components/media_player/aquostv.py
homeassistant/components/media_player/bluesound.py
@ -688,14 +317,22 @@ omit =
homeassistant/components/media_player/yamaha_musiccast.py
homeassistant/components/media_player/yamaha.py
homeassistant/components/media_player/ziggo_mediabox_xl.py
homeassistant/components/mycroft.py
homeassistant/components/mochad/*
homeassistant/components/modbus/*
homeassistant/components/mychevy/*
homeassistant/components/mycroft/*
homeassistant/components/mysensors/*
homeassistant/components/neato/*
homeassistant/components/nest/*
homeassistant/components/netatmo/*
homeassistant/components/netgear_lte/*
homeassistant/components/notify/aws_lambda.py
homeassistant/components/notify/aws_sns.py
homeassistant/components/notify/aws_sqs.py
homeassistant/components/notify/ciscospark.py
homeassistant/components/notify/clickatell.py
homeassistant/components/notify/clicksend.py
homeassistant/components/notify/clicksend_tts.py
homeassistant/components/notify/clicksend.py
homeassistant/components/notify/discord.py
homeassistant/components/notify/flock.py
homeassistant/components/notify/free_mobile.py
@ -726,17 +363,45 @@ omit =
homeassistant/components/notify/syslog.py
homeassistant/components/notify/telegram.py
homeassistant/components/notify/telstra.py
homeassistant/components/notify/twilio_call.py
homeassistant/components/notify/twilio_sms.py
homeassistant/components/notify/twitter.py
homeassistant/components/notify/xmpp.py
homeassistant/components/nuimo_controller.py
homeassistant/components/prometheus.py
homeassistant/components/rainbird.py
homeassistant/components/nuimo_controller/*
homeassistant/components/octoprint/*
homeassistant/components/opencv/*
homeassistant/components/opentherm_gw/*
homeassistant/components/openuv/__init__.py
homeassistant/components/openuv/binary_sensor.py
homeassistant/components/openuv/sensor.py
homeassistant/components/pilight/*
homeassistant/components/plum_lightpad/*
homeassistant/components/point/*
homeassistant/components/prometheus/*
homeassistant/components/qwikswitch/*
homeassistant/components/rachio/*
homeassistant/components/rainbird/*
homeassistant/components/raincloud/*
homeassistant/components/rainmachine/__init__.py
homeassistant/components/rainmachine/binary_sensor.py
homeassistant/components/rainmachine/sensor.py
homeassistant/components/rainmachine/switch.py
homeassistant/components/raspihats/*
homeassistant/components/raspyrfm/*
homeassistant/components/remember_the_milk/__init__.py
homeassistant/components/remote/harmony.py
homeassistant/components/remote/itach.py
homeassistant/components/route53.py
homeassistant/components/rfxtrx/*
homeassistant/components/roku/*
homeassistant/components/route53/*
homeassistant/components/rpi_gpio/*
homeassistant/components/rpi_pfio/*
homeassistant/components/sabnzbd/*
homeassistant/components/satel_integra/*
homeassistant/components/scene/hunterdouglas_powerview.py
homeassistant/components/scene/lifx_cloud.py
homeassistant/components/scsgate/*
homeassistant/components/sense/*
homeassistant/components/sensor/aftership.py
homeassistant/components/sensor/airvisual.py
homeassistant/components/sensor/alpha_vantage.py
@ -754,6 +419,7 @@ omit =
homeassistant/components/sensor/buienradar.py
homeassistant/components/sensor/cert_expiry.py
homeassistant/components/sensor/citybikes.py
homeassistant/components/sensor/coinbase.py
homeassistant/components/sensor/comed_hourly_pricing.py
homeassistant/components/sensor/cpuspeed.py
homeassistant/components/sensor/crimereports.py
@ -776,7 +442,6 @@ omit =
homeassistant/components/sensor/enphase_envoy.py
homeassistant/components/sensor/envirophat.py
homeassistant/components/sensor/etherscan.py
homeassistant/components/sensor/fastdotcom.py
homeassistant/components/sensor/fedex.py
homeassistant/components/sensor/filesize.py
homeassistant/components/sensor/fints.py
@ -789,17 +454,18 @@ omit =
homeassistant/components/sensor/fritzbox_netmonitor.py
homeassistant/components/sensor/gearbest.py
homeassistant/components/sensor/geizhals.py
homeassistant/components/sensor/github.py
homeassistant/components/sensor/gitlab_ci.py
homeassistant/components/sensor/gitter.py
homeassistant/components/sensor/glances.py
homeassistant/components/sensor/google_travel_time.py
homeassistant/components/sensor/gpsd.py
homeassistant/components/sensor/greeneye_monitor.py
homeassistant/components/sensor/gtfs.py
homeassistant/components/sensor/gtt.py
homeassistant/components/sensor/haveibeenpwned.py
homeassistant/components/sensor/hp_ilo.py
homeassistant/components/sensor/htu21d.py
homeassistant/components/sensor/upnp.py
homeassistant/components/sensor/iliad_italy.py
homeassistant/components/sensor/imap_email_content.py
homeassistant/components/sensor/imap.py
@ -814,7 +480,6 @@ omit =
homeassistant/components/sensor/linux_battery.py
homeassistant/components/sensor/london_underground.py
homeassistant/components/sensor/loopenergy.py
homeassistant/components/sensor/luftdaten.py
homeassistant/components/sensor/lyft.py
homeassistant/components/sensor/magicseaweed.py
homeassistant/components/sensor/meteo_france.py
@ -827,8 +492,8 @@ omit =
homeassistant/components/sensor/mvglive.py
homeassistant/components/sensor/nederlandse_spoorwegen.py
homeassistant/components/sensor/netatmo_public.py
homeassistant/components/sensor/netdata.py
homeassistant/components/sensor/netdata_public.py
homeassistant/components/sensor/netdata.py
homeassistant/components/sensor/neurio_energy.py
homeassistant/components/sensor/nmbs.py
homeassistant/components/sensor/noaa_tides.py
@ -856,6 +521,7 @@ omit =
homeassistant/components/sensor/radarr.py
homeassistant/components/sensor/rainbird.py
homeassistant/components/sensor/recollect_waste.py
homeassistant/components/sensor/rejseplanen.py
homeassistant/components/sensor/ripple.py
homeassistant/components/sensor/rova.py
homeassistant/components/sensor/rtorrent.py
@ -865,8 +531,8 @@ omit =
homeassistant/components/sensor/serial_pm.py
homeassistant/components/sensor/serial.py
homeassistant/components/sensor/seventeentrack.py
homeassistant/components/sensor/sht31.py
homeassistant/components/sensor/shodan.py
homeassistant/components/sensor/sht31.py
homeassistant/components/sensor/sigfox.py
homeassistant/components/sensor/simulated.py
homeassistant/components/sensor/skybeacon.py
@ -876,8 +542,8 @@ omit =
homeassistant/components/sensor/socialblade.py
homeassistant/components/sensor/solaredge.py
homeassistant/components/sensor/sonarr.py
homeassistant/components/sensor/speedtest.py
homeassistant/components/sensor/spotcrime.py
homeassistant/components/sensor/srp_energy.py
homeassistant/components/sensor/starlingbank.py
homeassistant/components/sensor/steam_online.py
homeassistant/components/sensor/supervisord.py
@ -885,7 +551,6 @@ omit =
homeassistant/components/sensor/swiss_public_transport.py
homeassistant/components/sensor/syncthru.py
homeassistant/components/sensor/synologydsm.py
homeassistant/components/sensor/srp_energy.py
homeassistant/components/sensor/systemmonitor.py
homeassistant/components/sensor/sytadin.py
homeassistant/components/sensor/tank_utility.py
@ -912,8 +577,16 @@ omit =
homeassistant/components/sensor/xbox_live.py
homeassistant/components/sensor/zamg.py
homeassistant/components/sensor/zestimate.py
homeassistant/components/shiftr.py
homeassistant/components/spc.py
homeassistant/components/shiftr/*
homeassistant/components/simplisafe/__init__.py
homeassistant/components/simplisafe/alarm_control_panel.py
homeassistant/components/sisyphus/*
homeassistant/components/skybell/*
homeassistant/components/smappee/*
homeassistant/components/sonos/*
homeassistant/components/spc/*
homeassistant/components/speedtestdotnet/*
homeassistant/components/spider/*
homeassistant/components/switch/acer_projector.py
homeassistant/components/switch/anel_pwrctrl.py
homeassistant/components/switch/arest.py
@ -932,8 +605,8 @@ omit =
homeassistant/components/switch/pencom.py
homeassistant/components/switch/pulseaudio_loopback.py
homeassistant/components/switch/rainbird.py
homeassistant/components/switch/rest.py
homeassistant/components/switch/recswitch.py
homeassistant/components/switch/rest.py
homeassistant/components/switch/rpi_rf.py
homeassistant/components/switch/snmp.py
homeassistant/components/switch/switchbot.py
@ -941,16 +614,38 @@ omit =
homeassistant/components/switch/telnet.py
homeassistant/components/switch/tplink.py
homeassistant/components/switch/vesync.py
homeassistant/components/tado/*
homeassistant/components/tahoma/*
homeassistant/components/telegram_bot/*
homeassistant/components/thingspeak.py
homeassistant/components/tellduslive/*
homeassistant/components/tellstick/*
homeassistant/components/tesla/*
homeassistant/components/thethingsnetwork/*
homeassistant/components/thingspeak/*
homeassistant/components/thinkingcleaner/*
homeassistant/components/tibber/*
homeassistant/components/toon/*
homeassistant/components/tplink_lte/*
homeassistant/components/tradfri/*
homeassistant/components/transmission/*
homeassistant/components/tts/amazon_polly.py
homeassistant/components/tts/baidu.py
homeassistant/components/tts/microsoft.py
homeassistant/components/tts/picotts.py
homeassistant/components/vacuum/mqtt.py
homeassistant/components/tuya/*
homeassistant/components/upcloud/*
homeassistant/components/upnp/*
homeassistant/components/usps/*
homeassistant/components/vacuum/roomba.py
homeassistant/components/velbus/*
homeassistant/components/velux/*
homeassistant/components/vera/*
homeassistant/components/verisure/*
homeassistant/components/volvooncall/*
homeassistant/components/w800rf32/*
homeassistant/components/water_heater/econet.py
homeassistant/components/watson_iot.py
homeassistant/components/waterfurnace/*
homeassistant/components/watson_iot/*
homeassistant/components/weather/bom.py
homeassistant/components/weather/buienradar.py
homeassistant/components/weather/darksky.py
@ -958,7 +653,29 @@ omit =
homeassistant/components/weather/metoffice.py
homeassistant/components/weather/openweathermap.py
homeassistant/components/weather/zamg.py
homeassistant/components/zeroconf.py
homeassistant/components/webostv/*
homeassistant/components/wemo/*
homeassistant/components/wink/*
homeassistant/components/wirelesstag/*
homeassistant/components/xiaomi_aqara/*
homeassistant/components/xiaomi_miio/*
homeassistant/components/xs1/*
homeassistant/components/zabbix/*
homeassistant/components/zeroconf/*
homeassistant/components/zha/__init__.py
homeassistant/components/zha/api.py
homeassistant/components/zha/const.py
homeassistant/components/zha/core/channels/*
homeassistant/components/zha/core/const.py
homeassistant/components/zha/core/device.py
homeassistant/components/zha/core/gateway.py
homeassistant/components/zha/core/helpers.py
homeassistant/components/zha/device_entity.py
homeassistant/components/zha/entity.py
homeassistant/components/zha/light.py
homeassistant/components/zha/sensor.py
homeassistant/components/zigbee/*
homeassistant/components/zoneminder/*
homeassistant/components/zwave/util.py
[report]
@ -972,4 +689,4 @@ exclude_lines =
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
raise NotImplementedError

View File

@ -27,5 +27,5 @@ If the code communicates with devices, web services, or third-party tools:
If the code does not interact with devices:
- [ ] Tests have been added to verify that the new code works.
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23

View File

@ -7,34 +7,34 @@ setup.py @home-assistant/core
homeassistant/*.py @home-assistant/core
homeassistant/helpers/* @home-assistant/core
homeassistant/util/* @home-assistant/core
homeassistant/components/api.py @home-assistant/core
homeassistant/components/api/* @home-assistant/core
homeassistant/components/auth/* @home-assistant/core
homeassistant/components/automation/* @home-assistant/core
homeassistant/components/cloud/* @home-assistant/core
homeassistant/components/config/* @home-assistant/core
homeassistant/components/configurator.py @home-assistant/core
homeassistant/components/configurator/* @home-assistant/core
homeassistant/components/conversation/* @home-assistant/core
homeassistant/components/frontend/* @home-assistant/core
homeassistant/components/group/* @home-assistant/core
homeassistant/components/history.py @home-assistant/core
homeassistant/components/history/* @home-assistant/core
homeassistant/components/http/* @home-assistant/core
homeassistant/components/input_*.py @home-assistant/core
homeassistant/components/introduction.py @home-assistant/core
homeassistant/components/logger.py @home-assistant/core
homeassistant/components/introduction/* @home-assistant/core
homeassistant/components/logger/* @home-assistant/core
homeassistant/components/lovelace/* @home-assistant/core
homeassistant/components/mqtt/* @home-assistant/core
homeassistant/components/panel_custom.py @home-assistant/core
homeassistant/components/panel_iframe.py @home-assistant/core
homeassistant/components/panel_custom/* @home-assistant/core
homeassistant/components/panel_iframe/* @home-assistant/core
homeassistant/components/onboarding/* @home-assistant/core
homeassistant/components/persistent_notification/* @home-assistant/core
homeassistant/components/scene/__init__.py @home-assistant/core
homeassistant/components/scene/hass.py @home-assistant/core
homeassistant/components/script.py @home-assistant/core
homeassistant/components/shell_command.py @home-assistant/core
homeassistant/components/sun.py @home-assistant/core
homeassistant/components/updater.py @home-assistant/core
homeassistant/components/script/* @home-assistant/core
homeassistant/components/shell_command/* @home-assistant/core
homeassistant/components/sun/* @home-assistant/core
homeassistant/components/updater/* @home-assistant/core
homeassistant/components/weblink/* @home-assistant/core
homeassistant/components/websocket_api.py @home-assistant/core
homeassistant/components/websocket_api/* @home-assistant/core
homeassistant/components/zone/* @home-assistant/core
# Home Assistant Developer Teams
@ -53,6 +53,7 @@ homeassistant/components/binary_sensor/hikvision.py @mezz64
homeassistant/components/binary_sensor/threshold.py @fabaff
homeassistant/components/binary_sensor/uptimerobot.py @ludeeus
homeassistant/components/camera/yi.py @bachya
homeassistant/components/climate/coolmaster.py @OnFreund
homeassistant/components/climate/ephember.py @ttroy50
homeassistant/components/climate/eq3btsmart.py @rytilahti
homeassistant/components/climate/mill.py @danielhiversen
@ -62,14 +63,13 @@ homeassistant/components/cover/group.py @cdce8p
homeassistant/components/cover/template.py @PhracturedBlue
homeassistant/components/device_tracker/asuswrt.py @kennedyshead
homeassistant/components/device_tracker/automatic.py @armills
homeassistant/components/device_tracker/googlehome.py @ludeeus
homeassistant/components/device_tracker/huawei_router.py @abmantis
homeassistant/components/device_tracker/quantum_gateway.py @cisasteelersfan
homeassistant/components/device_tracker/tile.py @bachya
homeassistant/components/device_tracker/traccar.py @ludeeus
homeassistant/components/device_tracker/bt_smarthub.py @jxwolstenholme
homeassistant/components/history_graph.py @andrey-git
homeassistant/components/influx.py @fabaff
homeassistant/components/history_graph/* @andrey-git
homeassistant/components/influx/* @fabaff
homeassistant/components/light/lifx_legacy.py @amelchio
homeassistant/components/light/tplink.py @rytilahti
homeassistant/components/light/yeelight.py @rytilahti
@ -85,7 +85,7 @@ homeassistant/components/media_player/mpd.py @fabaff
homeassistant/components/media_player/sonos.py @amelchio
homeassistant/components/media_player/xiaomi_tv.py @fattdev
homeassistant/components/media_player/yamaha_musiccast.py @jalmeroth
homeassistant/components/no_ip.py @fabaff
homeassistant/components/no_ip/* @fabaff
homeassistant/components/notify/file.py @fabaff
homeassistant/components/notify/flock.py @fabaff
homeassistant/components/notify/instapush.py @fabaff
@ -94,7 +94,7 @@ homeassistant/components/notify/smtp.py @fabaff
homeassistant/components/notify/syslog.py @fabaff
homeassistant/components/notify/xmpp.py @fabaff
homeassistant/components/notify/yessssms.py @flowolf
homeassistant/components/plant.py @ChristianKuehnel
homeassistant/components/plant/* @ChristianKuehnel
homeassistant/components/remote/harmony.py @ehendrix23
homeassistant/components/scene/lifx_cloud.py @amelchio
homeassistant/components/sensor/airvisual.py @bachya
@ -139,8 +139,8 @@ homeassistant/components/sensor/time_data.py @fabaff
homeassistant/components/sensor/version.py @fabaff
homeassistant/components/sensor/waqi.py @andrey-git
homeassistant/components/sensor/worldclock.py @fabaff
homeassistant/components/shiftr.py @fabaff
homeassistant/components/spaceapi.py @fabaff
homeassistant/components/shiftr/* @fabaff
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/switch/switchbot.py @danielhiversen
homeassistant/components/switch/switchmate.py @danielhiversen
homeassistant/components/switch/tplink.py @rytilahti
@ -150,11 +150,11 @@ homeassistant/components/weather/darksky.py @fabaff
homeassistant/components/weather/demo.py @fabaff
homeassistant/components/weather/met.py @danielhiversen
homeassistant/components/weather/openweathermap.py @fabaff
homeassistant/components/xiaomi_aqara.py @danielhiversen @syssi
homeassistant/components/xiaomi_aqara/* @danielhiversen @syssi
# A
homeassistant/components/ambient_station/* @bachya
homeassistant/components/arduino.py @fabaff
homeassistant/components/arduino/* @fabaff
homeassistant/components/*/arduino.py @fabaff
homeassistant/components/*/arest.py @fabaff
homeassistant/components/*/axis.py @kane610
@ -162,60 +162,67 @@ homeassistant/components/*/axis.py @kane610
# B
homeassistant/components/blink/* @fronzbot
homeassistant/components/*/blink.py @fronzbot
homeassistant/components/bmw_connected_drive.py @ChristianKuehnel
homeassistant/components/bmw_connected_drive/* @ChristianKuehnel
homeassistant/components/*/bmw_connected_drive.py @ChristianKuehnel
homeassistant/components/*/broadlink.py @danielhiversen
# C
homeassistant/components/cloudflare.py @ludeeus
homeassistant/components/cloudflare/* @ludeeus
homeassistant/components/counter/* @fabaff
# D
homeassistant/components/daikin.py @fredrike @rofrantz
homeassistant/components/daikin/* @fredrike @rofrantz
homeassistant/components/*/daikin.py @fredrike @rofrantz
homeassistant/components/*/deconz.py @kane610
homeassistant/components/digital_ocean.py @fabaff
homeassistant/components/digital_ocean/* @fabaff
homeassistant/components/*/digital_ocean.py @fabaff
homeassistant/components/dweet.py @fabaff
homeassistant/components/dweet/* @fabaff
homeassistant/components/*/dweet.py @fabaff
# E
homeassistant/components/ecovacs.py @OverloadUT
homeassistant/components/ecovacs/* @OverloadUT
homeassistant/components/*/ecovacs.py @OverloadUT
homeassistant/components/*/edp_redy.py @abmantis
homeassistant/components/edp_redy.py @abmantis
homeassistant/components/eight_sleep.py @mezz64
homeassistant/components/edp_redy/* @abmantis
homeassistant/components/eight_sleep/* @mezz64
homeassistant/components/*/eight_sleep.py @mezz64
homeassistant/components/esphome/*.py @OttoWinter
# G
homeassistant/components/googlehome/* @ludeeus
homeassistant/components/*/googlehome.py @ludeeus
# H
homeassistant/components/hive.py @Rendili @KJonline
homeassistant/components/hive/* @Rendili @KJonline
homeassistant/components/*/hive.py @Rendili @KJonline
homeassistant/components/homekit/* @cdce8p
homeassistant/components/huawei_lte.py @scop
homeassistant/components/huawei_lte/* @scop
homeassistant/components/*/huawei_lte.py @scop
# I
homeassistant/components/ipma/* @dgomes
# K
homeassistant/components/knx.py @Julius2342
homeassistant/components/knx/* @Julius2342
homeassistant/components/*/knx.py @Julius2342
homeassistant/components/konnected.py @heythisisnate
homeassistant/components/konnected/* @heythisisnate
homeassistant/components/*/konnected.py @heythisisnate
# L
homeassistant/components/lifx.py @amelchio
homeassistant/components/lifx/* @amelchio
homeassistant/components/*/lifx.py @amelchio
homeassistant/components/luftdaten/* @fabaff
homeassistant/components/*/luftdaten.py @fabaff
# M
homeassistant/components/matrix.py @tinloaf
homeassistant/components/matrix/* @tinloaf
homeassistant/components/*/matrix.py @tinloaf
homeassistant/components/melissa.py @kennedyshead
homeassistant/components/melissa/* @kennedyshead
homeassistant/components/*/melissa.py @kennedyshead
homeassistant/components/*/mystrom.py @fabaff
# N
homeassistant/components/ness_alarm.py @nickw444
homeassistant/components/ness_alarm/* @nickw444
homeassistant/components/*/ness_alarm.py @nickw444
# O
@ -226,7 +233,7 @@ homeassistant/components/point/* @fredrike
homeassistant/components/*/point.py @fredrike
# Q
homeassistant/components/qwikswitch.py @kellerza
homeassistant/components/qwikswitch/* @kellerza
homeassistant/components/*/qwikswitch.py @kellerza
# R
@ -237,15 +244,16 @@ homeassistant/components/*/rfxtrx.py @danielhiversen
# S
homeassistant/components/simplisafe/* @bachya
homeassistant/components/smartthings/* @andrewsayre
homeassistant/components/spider/* @peternijssen
# T
homeassistant/components/tahoma.py @philklei
homeassistant/components/tahoma/* @philklei
homeassistant/components/*/tahoma.py @philklei
homeassistant/components/tellduslive/*.py @fredrike
homeassistant/components/*/tellduslive.py @fredrike
homeassistant/components/tesla.py @zabuldon
homeassistant/components/tesla/* @zabuldon
homeassistant/components/*/tesla.py @zabuldon
homeassistant/components/thethingsnetwork.py @fabaff
homeassistant/components/thethingsnetwork/* @fabaff
homeassistant/components/*/thethingsnetwork.py @fabaff
homeassistant/components/tibber/* @danielhiversen
homeassistant/components/*/tibber.py @danielhiversen
@ -253,17 +261,17 @@ homeassistant/components/tradfri/* @ggravlingen
homeassistant/components/*/tradfri.py @ggravlingen
# U
homeassistant/components/unifi.py @kane610
homeassistant/components/unifi/* @kane610
homeassistant/components/switch/unifi.py @kane610
homeassistant/components/upcloud.py @scop
homeassistant/components/upcloud/* @scop
homeassistant/components/*/upcloud.py @scop
# V
homeassistant/components/velux.py @Julius2342
homeassistant/components/velux/* @Julius2342
homeassistant/components/*/velux.py @Julius2342
# W
homeassistant/components/wemo.py @sqldiablo
homeassistant/components/wemo/* @sqldiablo
homeassistant/components/*/wemo.py @sqldiablo
# X

View File

@ -2,7 +2,7 @@
# When updating this file, please also update virtualization/Docker/Dockerfile.dev
# This way, the development image and the production image are kept in sync.
FROM python:3.6
FROM python:3.7
LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
# Uncomment any of the following lines to disable the installation.
@ -27,7 +27,7 @@ COPY requirements_all.txt requirements_all.txt
# Uninstall enum34 because some dependencies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet cython tensorflow
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop==0.11.3 cchardet cython tensorflow
# Copy source
COPY . .

View File

@ -4,6 +4,23 @@ homeassistant.helpers package
Submodules
----------
homeassistant.helpers.aiohttp_client module
-------------------------------------------
.. automodule:: homeassistant.helpers.aiohttp_client
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.area_registry module
------------------------------------------
.. automodule:: homeassistant.helpers.area_registry
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.condition module
--------------------------------------
@ -12,6 +29,14 @@ homeassistant.helpers.condition module
:undoc-members:
:show-inheritance:
homeassistant.helpers.config_entry_flow module
----------------------------------------------
.. automodule:: homeassistant.helpers.config_entry_flow
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.config_validation module
----------------------------------------------
@ -20,6 +45,30 @@ homeassistant.helpers.config_validation module
:undoc-members:
:show-inheritance:
homeassistant.helpers.data_entry_flow module
--------------------------------------------
.. automodule:: homeassistant.helpers.data_entry_flow
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.deprecation module
----------------------------------------
.. automodule:: homeassistant.helpers.depracation
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.device_registry module
--------------------------------------------
.. automodule:: homeassistant.helpers.device_registry
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.discovery module
--------------------------------------
@ -28,6 +77,14 @@ homeassistant.helpers.discovery module
:undoc-members:
:show-inheritance:
homeassistant.helpers.dispatcher module
---------------------------------------
.. automodule:: homeassistant.helpers.dispatcher
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity module
-----------------------------------
@ -44,6 +101,38 @@ homeassistant.helpers.entity_component module
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_platform module
--------------------------------------------
.. automodule:: homeassistant.helpers.entity_platform
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_registry module
--------------------------------------------
.. automodule:: homeassistant.helpers.entity_registry
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_values module
------------------------------------------
.. automodule:: homeassistant.helpers.entity_values
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entityfilter module
-----------------------------------------
.. automodule:: homeassistant.helpers.entityfilter
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.event module
----------------------------------
@ -52,10 +141,26 @@ homeassistant.helpers.event module
:undoc-members:
:show-inheritance:
homeassistant.helpers.event_decorators module
---------------------------------------------
homeassistant.helpers.icon module
---------------------------------
.. automodule:: homeassistant.helpers.event_decorators
.. automodule:: homeassistant.helpers.icon
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.intent module
-----------------------------------
.. automodule:: homeassistant.helpers.intent
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.json module
---------------------------------
.. automodule:: homeassistant.helpers.json
:members:
:undoc-members:
:show-inheritance:
@ -68,6 +173,22 @@ homeassistant.helpers.location module
:undoc-members:
:show-inheritance:
homeassistant.helpers.logging module
------------------------------------
.. automodule:: homeassistant.helpers.logging
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.restore_state module
------------------------------------------
.. automodule:: homeassistant.helpers.restore_state
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.script module
-----------------------------------
@ -84,6 +205,14 @@ homeassistant.helpers.service module
:undoc-members:
:show-inheritance:
homeassistant.helpers.signal module
-----------------------------------
.. automodule:: homeassistant.helpers.signal
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.state module
----------------------------------
@ -92,6 +221,38 @@ homeassistant.helpers.state module
:undoc-members:
:show-inheritance:
homeassistant.helpers.storage module
------------------------------------
.. automodule:: homeassistant.helpers.storage
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.sun module
--------------------------------
.. automodule:: homeassistant.helpers.sun
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.system_info module
----------------------------------------
.. automodule:: homeassistant.helpers.system_info
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.temperature module
----------------------------------------
.. automodule:: homeassistant.helpers.temperature
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.template module
-------------------------------------
@ -100,6 +261,14 @@ homeassistant.helpers.template module
:undoc-members:
:show-inheritance:
homeassistant.helpers.translation module
-----------------------------------------
.. automodule:: homeassistant.helpers.translation
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.typing module
-----------------------------------

View File

@ -0,0 +1,164 @@
"""Auth provider that validates credentials via an external command."""
from typing import Any, Dict, Optional, cast
import asyncio.subprocess
import collections
import logging
import os
import voluptuous as vol
from homeassistant.exceptions import HomeAssistantError
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from ..models import Credentials, UserMeta
CONF_COMMAND = "command"
CONF_ARGS = "args"
CONF_META = "meta"
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend({
vol.Required(CONF_COMMAND): vol.All(
str,
os.path.normpath,
msg="must be an absolute path"
),
vol.Optional(CONF_ARGS, default=None): vol.Any(vol.DefaultTo(list), [str]),
vol.Optional(CONF_META, default=False): bool,
}, extra=vol.PREVENT_EXTRA)
_LOGGER = logging.getLogger(__name__)
class InvalidAuthError(HomeAssistantError):
"""Raised when authentication with given credentials fails."""
@AUTH_PROVIDERS.register("command_line")
class CommandLineAuthProvider(AuthProvider):
"""Auth provider validating credentials by calling a command."""
DEFAULT_TITLE = "Command Line Authentication"
# which keys to accept from a program's stdout
ALLOWED_META_KEYS = ("name",)
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Extend parent's __init__.
Adds self._user_meta dictionary to hold the user-specific
attributes provided by external programs.
"""
super().__init__(*args, **kwargs)
self._user_meta = {} # type: Dict[str, Dict[str, Any]]
async def async_login_flow(self, context: Optional[dict]) -> LoginFlow:
"""Return a flow to login."""
return CommandLineLoginFlow(self)
async def async_validate_login(self, username: str, password: str) -> None:
"""Validate a username and password."""
env = {
"username": username,
"password": password,
}
try:
# pylint: disable=no-member
process = await asyncio.subprocess.create_subprocess_exec(
self.config[CONF_COMMAND], *self.config[CONF_ARGS],
env=env,
stdout=asyncio.subprocess.PIPE
if self.config[CONF_META] else None,
)
stdout, _ = (await process.communicate())
except OSError as err:
# happens when command doesn't exist or permission is denied
_LOGGER.error("Error while authenticating %r: %s",
username, err)
raise InvalidAuthError
if process.returncode != 0:
_LOGGER.error("User %r failed to authenticate, command exited "
"with code %d.",
username, process.returncode)
raise InvalidAuthError
if self.config[CONF_META]:
meta = {} # type: Dict[str, str]
for _line in stdout.splitlines():
try:
line = _line.decode().lstrip()
if line.startswith("#"):
continue
key, value = line.split("=", 1)
except ValueError:
# malformed line
continue
key = key.strip()
value = value.strip()
if key in self.ALLOWED_META_KEYS:
meta[key] = value
self._user_meta[username] = meta
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
username = flow_result["username"]
for credential in await self.async_credentials():
if credential.data["username"] == username:
return credential
# Create new credentials.
return self.async_create_credentials({
"username": username,
})
async def async_user_meta_for_credentials(
self, credentials: Credentials
) -> UserMeta:
"""Return extra user metadata for credentials.
Currently, only name is supported.
"""
meta = self._user_meta.get(credentials.data["username"], {})
return UserMeta(
name=meta.get("name"),
is_active=True,
)
class CommandLineLoginFlow(LoginFlow):
"""Handler for the login flow."""
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
errors = {}
if user_input is not None:
user_input["username"] = user_input["username"].strip()
try:
await cast(CommandLineAuthProvider, self._auth_provider) \
.async_validate_login(
user_input["username"], user_input["password"]
)
except InvalidAuthError:
errors["base"] = "invalid_auth"
if not errors:
user_input.pop("password")
return await self.async_finish(user_input)
schema = collections.OrderedDict() # type: Dict[str, type]
schema["username"] = str
schema["password"] = str
return self.async_show_form(
step_id="init",
data_schema=vol.Schema(schema),
errors=errors,
)

View File

@ -10,7 +10,8 @@ from typing import Any, Optional, Dict
import voluptuous as vol
from homeassistant import (
core, config as conf_util, config_entries, components as core_components)
core, config as conf_util, config_entries, components as core_components,
loader)
from homeassistant.components import persistent_notification
from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE
from homeassistant.setup import async_setup_component
@ -124,6 +125,15 @@ async def async_from_config_dict(config: Dict[str, Any],
if key != core.DOMAIN)
components.update(hass.config_entries.async_domains())
# Resolve all dependencies of all components.
for component in list(components):
try:
components.update(loader.component_dependencies(hass, component))
except loader.LoaderError:
# Ignore it, or we'll break startup
# It will be properly handled during setup.
pass
# setup components
res = await core_components.async_setup(hass, config)
if not res:
@ -182,6 +192,23 @@ async def async_from_config_dict(config: Dict[str, Any],
'\n\n'.join(msg), "Config Warning", "config_warning"
)
# TEMP: warn users of invalid extra keys
# Remove after 0.92
if cv.INVALID_EXTRA_KEYS_FOUND:
msg = []
msg.append(
"Your configuration contains extra keys "
"that the platform does not support (but were silently "
"accepted before 0.88). Please find and remove the following."
"This will become a breaking change."
)
msg.append('\n'.join('- {}'.format(it)
for it in cv.INVALID_EXTRA_KEYS_FOUND))
hass.components.persistent_notification.async_create(
'\n\n'.join(msg), "Config Warning", "config_warning"
)
return hass

View File

@ -1,9 +1,4 @@
"""
This component provides basic support for Abode Home Security system.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/abode/
"""
"""Support for Abode Home Security system."""
import logging
from functools import partial
from requests.exceptions import HTTPError, ConnectTimeout

View File

@ -1,9 +1,4 @@
"""
This component provides HA alarm_control_panel support for Abode System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.abode/
"""
"""Support for Abode Security System alarm control panels."""
import logging
import homeassistant.components.alarm_control_panel as alarm
@ -57,11 +52,6 @@ class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanel):
state = None
return state
@property
def code_format(self):
"""Return one or more digits/characters."""
return alarm.FORMAT_NUMBER
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._device.set_standby()

View File

@ -1,20 +1,14 @@
"""
This component provides HA binary_sensor support for Abode Security System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.abode/
"""
"""Support for Abode Security System binary sensors."""
import logging
from homeassistant.components.abode import (AbodeDevice, AbodeAutomation,
DOMAIN as ABODE_DOMAIN)
from homeassistant.components.binary_sensor import BinarySensorDevice
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['abode']
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up a sensor for an Abode device."""

View File

@ -1,9 +1,4 @@
"""
This component provides HA camera support for Abode Security System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/camera.abode/
"""
"""Support for Abode Security System cameras."""
import logging
from datetime import timedelta
@ -13,7 +8,6 @@ from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
from homeassistant.components.camera import Camera
from homeassistant.util import Throttle
DEPENDENCIES = ['abode']
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)

View File

@ -1,15 +1,9 @@
"""
This component provides HA cover support for Abode Security System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/cover.abode/
"""
"""Support for Abode Security System covers."""
import logging
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
from homeassistant.components.cover import CoverDevice
DEPENDENCIES = ['abode']
_LOGGER = logging.getLogger(__name__)

View File

@ -1,9 +1,4 @@
"""
This component provides HA light support for Abode Security System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.abode/
"""
"""Support for Abode Security System lights."""
import logging
from math import ceil
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN

View File

@ -1,15 +1,9 @@
"""
This component provides HA lock support for Abode Security System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/lock.abode/
"""
"""Support for Abode Security System locks."""
import logging
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
from homeassistant.components.lock import LockDevice
DEPENDENCIES = ['abode']
_LOGGER = logging.getLogger(__name__)

View File

@ -1,9 +1,4 @@
"""
Support for Abode Security System sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.abode/
"""
"""Support for Abode Security System sensors."""
import logging
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN

View File

@ -0,0 +1,13 @@
capture_image:
description: Request a new image capture from a camera device.
fields:
entity_id: {description: Entity id of the camera to request an image., example: camera.downstairs_motion_camera}
change_setting:
description: Change an Abode system setting.
fields:
setting: {description: Setting to change., example: beeper_mute}
value: {description: Value of the setting., example: '1'}
trigger_quick_action:
description: Trigger an Abode quick action.
fields:
entity_id: {description: Entity id of the quick action to trigger., example: binary_sensor.home_quick_action}

View File

@ -1,20 +1,14 @@
"""
This component provides HA switch support for Abode Security System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.abode/
"""
"""Support for Abode Security System switches."""
import logging
from homeassistant.components.abode import (AbodeDevice, AbodeAutomation,
DOMAIN as ABODE_DOMAIN)
from homeassistant.components.switch import SwitchDevice
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['abode']
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode switch devices."""

View File

@ -1,9 +1,4 @@
"""
Support for Automation Device Specification (ADS).
For more details about this component, please refer to the documentation.
https://home-assistant.io/components/ads/
"""
"""Support for Automation Device Specification (ADS)."""
import threading
import struct
import logging
@ -14,7 +9,7 @@ from homeassistant.const import CONF_DEVICE, CONF_PORT, CONF_IP_ADDRESS, \
EVENT_HOMEASSISTANT_STOP
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pyads==2.2.6']
REQUIREMENTS = ['pyads==3.0.7']
_LOGGER = logging.getLogger(__name__)
@ -78,9 +73,10 @@ def setup(hass, config):
try:
ads = AdsHub(client)
except pyads.pyads.ADSError:
except pyads.ADSError:
_LOGGER.error(
"Could not connect to ADS host (netid=%s, port=%s)", net_id, port)
"Could not connect to ADS host (netid=%s, ip=%s, port=%s)",
net_id, ip_address, port)
return False
hass.data[DATA_ADS] = ads
@ -173,7 +169,7 @@ class AdsHub:
self._notification_items[hnotify] = NotificationItem(
hnotify, huser, name, plc_datatype, callback)
def _device_notification_callback(self, addr, notification, huser):
def _device_notification_callback(self, notification, name):
"""Handle device notifications."""
contents = notification.contents

View File

@ -1,9 +1,4 @@
"""
Support for ADS binary sensors.
For more details about this platform, please refer to the documentation.
https://home-assistant.io/components/binary_sensor.ads/
"""
"""Support for ADS binary sensors."""
import logging
import voluptuous as vol
@ -44,6 +39,7 @@ class AdsBinarySensor(BinarySensorDevice):
def __init__(self, ads_hub, name, ads_var, device_class):
"""Initialize ADS binary sensor."""
self._name = name
self._unique_id = ads_var
self._state = False
self._device_class = device_class or 'moving'
self._ads_hub = ads_hub
@ -66,6 +62,11 @@ class AdsBinarySensor(BinarySensorDevice):
"""Return the default name of the binary sensor."""
return self._name
@property
def unique_id(self):
"""Return an unique identifier for this entity."""
return self._unique_id
@property
def device_class(self):
"""Return the device class."""

View File

@ -1,10 +1,4 @@
"""
Support for ADS light sources.
For more details about this platform, please refer to the documentation.
https://home-assistant.io/components/light.ads/
"""
"""Support for ADS light sources."""
import logging
import voluptuous as vol
from homeassistant.components.light import Light, ATTR_BRIGHTNESS, \
@ -46,6 +40,7 @@ class AdsLight(Light):
self._on_state = False
self._brightness = None
self._name = name
self._unique_id = ads_var_enable
self.ads_var_enable = ads_var_enable
self.ads_var_brightness = ads_var_brightness
@ -79,6 +74,11 @@ class AdsLight(Light):
"""Return the name of the device if any."""
return self._name
@property
def unique_id(self):
"""Return an unique identifier for this entity."""
return self._unique_id
@property
def brightness(self):
"""Return the brightness of the light (0..255)."""

View File

@ -1,9 +1,4 @@
"""
Support for ADS sensors.
For more details about this platform, please refer to the documentation.
https://home-assistant.io/components/sensor.ads/
"""
"""Support for ADS sensors."""
import logging
import voluptuous as vol
@ -55,6 +50,7 @@ class AdsSensor(Entity):
"""Initialize AdsSensor entity."""
self._ads_hub = ads_hub
self._name = name
self._unique_id = ads_var
self._value = None
self._unit_of_measurement = unit_of_measurement
self.ads_var = ads_var
@ -84,6 +80,11 @@ class AdsSensor(Entity):
"""Return the name of the entity."""
return self._name
@property
def unique_id(self):
"""Return an unique identifier for this entity."""
return self._unique_id
@property
def state(self):
"""Return the state of the device."""

View File

@ -1,9 +1,4 @@
"""
Support for ADS switch platform.
For more details about this platform, please refer to the documentation.
https://home-assistant.io/components/switch.ads/
"""
"""Support for ADS switch platform."""
import logging
import voluptuous as vol
@ -37,20 +32,21 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class AdsSwitch(ToggleEntity):
"""Representation of an Ads switch device."""
"""Representation of an ADS switch device."""
def __init__(self, ads_hub, name, ads_var):
"""Initialize the AdsSwitch entity."""
self._ads_hub = ads_hub
self._on_state = False
self._name = name
self._unique_id = ads_var
self.ads_var = ads_var
async def async_added_to_hass(self):
"""Register device notification."""
def update(name, value):
"""Handle device notification."""
_LOGGER.debug('Variable %s changed its value to %d', name, value)
_LOGGER.debug("Variable %s changed its value to %d", name, value)
self._on_state = value
self.schedule_update_ha_state()
@ -68,6 +64,11 @@ class AdsSwitch(ToggleEntity):
"""Return the name of the entity."""
return self._name
@property
def unique_id(self):
"""Return an unique identifier for this entity."""
return self._unique_id
@property
def should_poll(self):
"""Return False because entity pushes its state to HA."""

View File

@ -8,7 +8,8 @@ from datetime import timedelta
import logging
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
from homeassistant.helpers.config_validation import ( # noqa
PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE)
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)

View File

@ -0,0 +1,138 @@
"""
Sensor for checking the air quality forecast around Norway.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/air_quality.norway_air/
"""
import logging
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.air_quality import (
PLATFORM_SCHEMA, AirQualityEntity)
from homeassistant.const import (CONF_LATITUDE, CONF_LONGITUDE,
CONF_NAME)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
REQUIREMENTS = ['pyMetno==0.4.5']
_LOGGER = logging.getLogger(__name__)
ATTRIBUTION = "Air quality from " \
"https://luftkvalitet.miljostatus.no/, " \
"delivered by the Norwegian Meteorological Institute."
# https://api.met.no/license_data.html
CONF_FORECAST = 'forecast'
DEFAULT_FORECAST = 0
DEFAULT_NAME = 'Air quality Norway'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_FORECAST, default=DEFAULT_FORECAST): vol.Coerce(int),
vol.Optional(CONF_LATITUDE): cv.latitude,
vol.Optional(CONF_LONGITUDE): cv.longitude,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
SCAN_INTERVAL = timedelta(minutes=5)
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up the air_quality norway sensor."""
forecast = config.get(CONF_FORECAST)
latitude = config.get(CONF_LATITUDE, hass.config.latitude)
longitude = config.get(CONF_LONGITUDE, hass.config.longitude)
name = config.get(CONF_NAME)
if None in (latitude, longitude):
_LOGGER.error("Latitude or longitude not set in Home Assistant config")
return
coordinates = {
'lat': str(latitude),
'lon': str(longitude),
}
async_add_entities([AirSensor(name, coordinates,
forecast, async_get_clientsession(hass),
)],
True)
def round_state(func):
"""Round state."""
def _decorator(self):
res = func(self)
if isinstance(res, float):
return round(res, 2)
return res
return _decorator
class AirSensor(AirQualityEntity):
"""Representation of an Yr.no sensor."""
def __init__(self, name, coordinates, forecast, session):
"""Initialize the sensor."""
import metno
self._name = name
self._api = metno.AirQualityData(coordinates, forecast, session)
@property
def attribution(self) -> str:
"""Return the attribution."""
return ATTRIBUTION
@property
def device_state_attributes(self) -> dict:
"""Return other details about the sensor state."""
return {'level': self._api.data.get('level')}
@property
def name(self) -> str:
"""Return the name of the sensor."""
return self._name
@property
@round_state
def air_quality_index(self):
"""Return the Air Quality Index (AQI)."""
return self._api.data.get('aqi')
@property
@round_state
def nitrogen_dioxide(self):
"""Return the NO2 (nitrogen dioxide) level."""
return self._api.data.get('no2_concentration')
@property
@round_state
def ozone(self):
"""Return the O3 (ozone) level."""
return self._api.data.get('o3_concentration')
@property
@round_state
def particulate_matter_2_5(self):
"""Return the particulate matter 2.5 level."""
return self._api.data.get('pm25_concentration')
@property
@round_state
def particulate_matter_10(self):
"""Return the particulate matter 10 level."""
return self._api.data.get('pm10_concentration')
@property
def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
return self._api.units.get('pm25_concentration')
async def async_update(self) -> None:
"""Update the sensor."""
await self._api.update()

View File

@ -2,7 +2,7 @@
Support for openSenseMap Air Quality data.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/air_quality/opensensemap/
https://home-assistant.io/components/air_quality.opensensemap/
"""
from datetime import timedelta
import logging

View File

@ -14,7 +14,7 @@ from homeassistant.const import (
SERVICE_ALARM_DISARM, SERVICE_ALARM_ARM_HOME, SERVICE_ALARM_ARM_AWAY,
SERVICE_ALARM_ARM_NIGHT, SERVICE_ALARM_ARM_CUSTOM_BYPASS)
from homeassistant.helpers.config_validation import ( # noqa
PLATFORM_SCHEMA_BASE, PLATFORM_SCHEMA_2 as PLATFORM_SCHEMA)
PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent

View File

@ -1,9 +1,4 @@
"""
Support for AlarmDecoder devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alarmdecoder/
"""
"""Support for AlarmDecoder devices."""
import logging
from datetime import timedelta

View File

@ -1,9 +1,4 @@
"""
Support for AlarmDecoder-based alarm control panels (Honeywell/DSC).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.alarmdecoder/
"""
"""Support for AlarmDecoder-based alarm control panels (Honeywell/DSC)."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Support for AlarmDecoder zone states- represented as binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.alarmdecoder/
"""
"""Support for AlarmDecoder zone states- represented as binary sensors."""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice

View File

@ -1,9 +1,4 @@
"""
Support for AlarmDecoder Sensors (Shows Panel Display).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.alarmdecoder/
"""
"""Support for AlarmDecoder sensors (Shows Panel Display)."""
import logging
from homeassistant.helpers.entity import Entity

View File

@ -1,9 +1,4 @@
"""
Support for repeating alerts when conditions are met.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alert/
"""
"""Support for repeating alerts when conditions are met."""
import asyncio
import logging
from datetime import datetime, timedelta

View File

@ -0,0 +1,12 @@
toggle:
description: Toggle alert's notifications.
fields:
entity_id: {description: Name of the alert to toggle., example: alert.garage_door_open}
turn_off:
description: Silence alert's notifications.
fields:
entity_id: {description: Name of the alert to silence., example: alert.garage_door_open}
turn_on:
description: Reset alert's notifications.
fields:
entity_id: {description: Name of the alert to reset., example: alert.garage_door_open}

View File

@ -1,9 +1,4 @@
"""
Support for Alexa skill service end point.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alexa/
"""
"""Support for Alexa skill service end point."""
import logging
import voluptuous as vol
@ -57,7 +52,7 @@ CONFIG_SCHEMA = vol.Schema({
async def async_setup(hass, config):
"""Activate Alexa component."""
"""Activate the Alexa component."""
config = config.get(DOMAIN, {})
flash_briefings_config = config.get(CONF_FLASH_BRIEFINGS)

View File

@ -1,5 +1,4 @@
"""Support for Alexa skill auth."""
import asyncio
import json
import logging

View File

@ -1,9 +1,4 @@
"""
Support for Alexa skill service end point.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alexa/
"""
"""Support for Alexa skill service end point."""
import copy
from datetime import datetime
import logging

View File

@ -1,9 +1,4 @@
"""
Support for Alexa skill service end point.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alexa/
"""
"""Support for Alexa skill service end point."""
import enum
import logging

View File

@ -1,10 +1,4 @@
"""Support for alexa Smart Home Skill API.
API documentation:
https://developer.amazon.com/docs/smarthome/understand-the-smart-home-skill-api.html
https://developer.amazon.com/docs/device-apis/message-guide.html
"""
"""Support for alexa Smart Home Skill API."""
import asyncio
from collections import OrderedDict
from datetime import datetime
@ -27,9 +21,9 @@ from homeassistant.const import (
CONF_NAME, SERVICE_LOCK, SERVICE_MEDIA_NEXT_TRACK, SERVICE_MEDIA_PAUSE,
SERVICE_MEDIA_PLAY, SERVICE_MEDIA_PREVIOUS_TRACK, SERVICE_MEDIA_STOP,
SERVICE_SET_COVER_POSITION, SERVICE_TURN_OFF, SERVICE_TURN_ON,
SERVICE_UNLOCK, SERVICE_VOLUME_SET, STATE_LOCKED, STATE_ON,
STATE_UNAVAILABLE, STATE_UNLOCKED, TEMP_CELSIUS, TEMP_FAHRENHEIT,
MATCH_ALL)
SERVICE_UNLOCK, SERVICE_VOLUME_DOWN, SERVICE_VOLUME_UP, SERVICE_VOLUME_SET,
SERVICE_VOLUME_MUTE, STATE_LOCKED, STATE_ON, STATE_UNAVAILABLE,
STATE_UNLOCKED, TEMP_CELSIUS, TEMP_FAHRENHEIT, MATCH_ALL)
import homeassistant.core as ha
import homeassistant.util.color as color_util
from homeassistant.util.decorator import Registry
@ -63,10 +57,11 @@ API_THERMOSTAT_MODES = OrderedDict([
(climate.STATE_COOL, 'COOL'),
(climate.STATE_AUTO, 'AUTO'),
(climate.STATE_ECO, 'ECO'),
(climate.STATE_MANUAL, 'AUTO'),
(climate.STATE_OFF, 'OFF'),
(climate.STATE_IDLE, 'OFF'),
(climate.STATE_FAN_ONLY, 'OFF'),
(climate.STATE_DRY, 'OFF')
(climate.STATE_DRY, 'OFF'),
])
SMART_HOME_HTTP_ENDPOINT = '/api/alexa/smart_home'
@ -883,7 +878,7 @@ class _LockCapabilities(_AlexaEntity):
_AlexaEndpointHealth(self.hass, self.entity)]
@ENTITY_ADAPTERS.register(media_player.DOMAIN)
@ENTITY_ADAPTERS.register(media_player.const.DOMAIN)
class _MediaPlayerCapabilities(_AlexaEntity):
def default_display_categories(self):
return [_DisplayCategory.TV]
@ -893,19 +888,19 @@ class _MediaPlayerCapabilities(_AlexaEntity):
yield _AlexaEndpointHealth(self.hass, self.entity)
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
if supported & media_player.SUPPORT_VOLUME_SET:
if supported & media_player.const.SUPPORT_VOLUME_SET:
yield _AlexaSpeaker(self.entity)
step_volume_features = (media_player.SUPPORT_VOLUME_MUTE |
media_player.SUPPORT_VOLUME_STEP)
step_volume_features = (media_player.const.SUPPORT_VOLUME_MUTE |
media_player.const.SUPPORT_VOLUME_STEP)
if supported & step_volume_features:
yield _AlexaStepSpeaker(self.entity)
playback_features = (media_player.SUPPORT_PLAY |
media_player.SUPPORT_PAUSE |
media_player.SUPPORT_STOP |
media_player.SUPPORT_NEXT_TRACK |
media_player.SUPPORT_PREVIOUS_TRACK)
playback_features = (media_player.const.SUPPORT_PLAY |
media_player.const.SUPPORT_PAUSE |
media_player.const.SUPPORT_STOP |
media_player.const.SUPPORT_NEXT_TRACK |
media_player.const.SUPPORT_PREVIOUS_TRACK)
if supported & playback_features:
yield _AlexaPlaybackController(self.entity)
@ -1792,7 +1787,7 @@ async def async_api_set_volume(hass, config, directive, context):
data = {
ATTR_ENTITY_ID: entity.entity_id,
media_player.ATTR_MEDIA_VOLUME_LEVEL: volume,
media_player.const.ATTR_MEDIA_VOLUME_LEVEL: volume,
}
await hass.services.async_call(
@ -1809,7 +1804,8 @@ async def async_api_select_input(hass, config, directive, context):
entity = directive.entity
# attempt to map the ALL UPPERCASE payload name to a source
source_list = entity.attributes[media_player.ATTR_INPUT_SOURCE_LIST] or []
source_list = entity.attributes[
media_player.const.ATTR_INPUT_SOURCE_LIST] or []
for source in source_list:
# response will always be space separated, so format the source in the
# most likely way to find a match
@ -1824,7 +1820,7 @@ async def async_api_select_input(hass, config, directive, context):
data = {
ATTR_ENTITY_ID: entity.entity_id,
media_player.ATTR_INPUT_SOURCE: media_input,
media_player.const.ATTR_INPUT_SOURCE: media_input,
}
await hass.services.async_call(
@ -1840,7 +1836,8 @@ async def async_api_adjust_volume(hass, config, directive, context):
volume_delta = int(directive.payload['volume'])
entity = directive.entity
current_level = entity.attributes.get(media_player.ATTR_MEDIA_VOLUME_LEVEL)
current_level = entity.attributes.get(
media_player.const.ATTR_MEDIA_VOLUME_LEVEL)
# read current state
try:
@ -1852,11 +1849,11 @@ async def async_api_adjust_volume(hass, config, directive, context):
data = {
ATTR_ENTITY_ID: entity.entity_id,
media_player.ATTR_MEDIA_VOLUME_LEVEL: volume,
media_player.const.ATTR_MEDIA_VOLUME_LEVEL: volume,
}
await hass.services.async_call(
entity.domain, media_player.SERVICE_VOLUME_SET,
entity.domain, SERVICE_VOLUME_SET,
data, blocking=False, context=context)
return directive.response()
@ -1878,11 +1875,11 @@ async def async_api_adjust_volume_step(hass, config, directive, context):
if volume_step > 0:
await hass.services.async_call(
entity.domain, media_player.SERVICE_VOLUME_UP,
entity.domain, SERVICE_VOLUME_UP,
data, blocking=False, context=context)
elif volume_step < 0:
await hass.services.async_call(
entity.domain, media_player.SERVICE_VOLUME_DOWN,
entity.domain, SERVICE_VOLUME_DOWN,
data, blocking=False, context=context)
return directive.response()
@ -1897,11 +1894,11 @@ async def async_api_set_mute(hass, config, directive, context):
data = {
ATTR_ENTITY_ID: entity.entity_id,
media_player.ATTR_MEDIA_VOLUME_MUTED: mute,
media_player.const.ATTR_MEDIA_VOLUME_MUTED: mute,
}
await hass.services.async_call(
entity.domain, media_player.SERVICE_VOLUME_MUTE,
entity.domain, SERVICE_VOLUME_MUTE,
data, blocking=False, context=context)
return directive.response()

View File

@ -0,0 +1,19 @@
{
"config": {
"error": {
"identifier_exists": "Applikationsn\u00f8gle og/eller API n\u00f8gle er allerede registreret",
"invalid_key": "Ugyldig API n\u00f8gle og/eller applikationsn\u00f8gle",
"no_devices": "Ingen enheder fundet i konto"
},
"step": {
"user": {
"data": {
"api_key": "API n\u00f8gle",
"app_key": "Applikationsn\u00f8gle"
},
"title": "Udfyld dine oplysninger"
}
},
"title": "Ambient PWS"
}
}

View File

@ -0,0 +1,18 @@
{
"config": {
"error": {
"identifier_exists": "Cl\u00e9 d'application et / ou cl\u00e9 API d\u00e9j\u00e0 enregistr\u00e9e",
"invalid_key": "Cl\u00e9 d'API et / ou cl\u00e9 d'application non valide",
"no_devices": "Aucun appareil trouv\u00e9 dans le compte"
},
"step": {
"user": {
"data": {
"api_key": "Cl\u00e9 d'API",
"app_key": "Cl\u00e9 d'application"
},
"title": "Veuillez saisir vos informations"
}
}
}
}

View File

@ -11,7 +11,7 @@
"api_key": "API \ud0a4",
"app_key": "Application \ud0a4"
},
"title": "\uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694"
"title": "\uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694"
}
},
"title": "Ambient PWS"

View File

@ -0,0 +1,19 @@
{
"config": {
"error": {
"identifier_exists": "Applicatiesleutel en/of API-sleutel al geregistreerd",
"invalid_key": "Ongeldige API-sleutel en/of applicatiesleutel",
"no_devices": "Geen apparaten gevonden in account"
},
"step": {
"user": {
"data": {
"api_key": "API-sleutel",
"app_key": "Applicatiesleutel"
},
"title": "Vul uw gegevens in"
}
},
"title": "Ambient PWS"
}
}

View File

@ -0,0 +1,19 @@
{
"config": {
"error": {
"identifier_exists": "Programn\u00f8kkel og/eller API-n\u00f8kkel er allerede registrert",
"invalid_key": "Ugyldig API-n\u00f8kkel og/eller programn\u00f8kkel",
"no_devices": "Ingen enheter funnet i kontoen"
},
"step": {
"user": {
"data": {
"api_key": "API-n\u00f8kkel",
"app_key": "Applikasjonsn\u00f8kkel"
},
"title": "Fyll ut informasjonen din"
}
},
"title": "Ambient PWS"
}
}

View File

@ -0,0 +1,19 @@
{
"config": {
"error": {
"identifier_exists": "Klucz aplikacji i/lub klucz API ju\u017c jest zarejestrowany",
"invalid_key": "Nieprawid\u0142owy klucz API i/lub klucz aplikacji",
"no_devices": "Nie znaleziono urz\u0105dze\u0144 na koncie"
},
"step": {
"user": {
"data": {
"api_key": "Klucz API",
"app_key": "Klucz aplikacji"
},
"title": "Wprowad\u017a swoje dane"
}
},
"title": "Ambient PWS"
}
}

View File

@ -0,0 +1,11 @@
{
"config": {
"step": {
"user": {
"data": {
"api_key": "Chave de API"
}
}
}
}
}

View File

@ -1,9 +1,4 @@
"""
Support for Ambient Weather Station Service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/ambient_station/
"""
"""Support for Ambient Weather Station Service."""
import logging
import voluptuous as vol
@ -12,62 +7,216 @@ from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import (
ATTR_NAME, ATTR_LOCATION, CONF_API_KEY, CONF_MONITORED_CONDITIONS,
EVENT_HOMEASSISTANT_STOP)
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.dispatcher import (
async_dispatcher_connect, async_dispatcher_send)
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.event import async_call_later
from .config_flow import configured_instances
from .const import (
ATTR_LAST_DATA, CONF_APP_KEY, DATA_CLIENT, DOMAIN, TOPIC_UPDATE)
ATTR_LAST_DATA, CONF_APP_KEY, DATA_CLIENT, DOMAIN, TOPIC_UPDATE,
TYPE_BINARY_SENSOR, TYPE_SENSOR)
REQUIREMENTS = ['aioambient==0.1.2']
REQUIREMENTS = ['aioambient==0.1.0']
_LOGGER = logging.getLogger(__name__)
DATA_CONFIG = 'config'
DEFAULT_SOCKET_MIN_RETRY = 15
TYPE_24HOURRAININ = '24hourrainin'
TYPE_BAROMABSIN = 'baromabsin'
TYPE_BAROMRELIN = 'baromrelin'
TYPE_BATT1 = 'batt1'
TYPE_BATT10 = 'batt10'
TYPE_BATT2 = 'batt2'
TYPE_BATT3 = 'batt3'
TYPE_BATT4 = 'batt4'
TYPE_BATT5 = 'batt5'
TYPE_BATT6 = 'batt6'
TYPE_BATT7 = 'batt7'
TYPE_BATT8 = 'batt8'
TYPE_BATT9 = 'batt9'
TYPE_BATTOUT = 'battout'
TYPE_CO2 = 'co2'
TYPE_DAILYRAININ = 'dailyrainin'
TYPE_DEWPOINT = 'dewPoint'
TYPE_EVENTRAININ = 'eventrainin'
TYPE_FEELSLIKE = 'feelsLike'
TYPE_HOURLYRAININ = 'hourlyrainin'
TYPE_HUMIDITY = 'humidity'
TYPE_HUMIDITY1 = 'humidity1'
TYPE_HUMIDITY10 = 'humidity10'
TYPE_HUMIDITY2 = 'humidity2'
TYPE_HUMIDITY3 = 'humidity3'
TYPE_HUMIDITY4 = 'humidity4'
TYPE_HUMIDITY5 = 'humidity5'
TYPE_HUMIDITY6 = 'humidity6'
TYPE_HUMIDITY7 = 'humidity7'
TYPE_HUMIDITY8 = 'humidity8'
TYPE_HUMIDITY9 = 'humidity9'
TYPE_HUMIDITYIN = 'humidityin'
TYPE_LASTRAIN = 'lastRain'
TYPE_MAXDAILYGUST = 'maxdailygust'
TYPE_MONTHLYRAININ = 'monthlyrainin'
TYPE_RELAY1 = 'relay1'
TYPE_RELAY10 = 'relay10'
TYPE_RELAY2 = 'relay2'
TYPE_RELAY3 = 'relay3'
TYPE_RELAY4 = 'relay4'
TYPE_RELAY5 = 'relay5'
TYPE_RELAY6 = 'relay6'
TYPE_RELAY7 = 'relay7'
TYPE_RELAY8 = 'relay8'
TYPE_RELAY9 = 'relay9'
TYPE_SOILHUM1 = 'soilhum1'
TYPE_SOILHUM10 = 'soilhum10'
TYPE_SOILHUM2 = 'soilhum2'
TYPE_SOILHUM3 = 'soilhum3'
TYPE_SOILHUM4 = 'soilhum4'
TYPE_SOILHUM5 = 'soilhum5'
TYPE_SOILHUM6 = 'soilhum6'
TYPE_SOILHUM7 = 'soilhum7'
TYPE_SOILHUM8 = 'soilhum8'
TYPE_SOILHUM9 = 'soilhum9'
TYPE_SOILTEMP1F = 'soiltemp1f'
TYPE_SOILTEMP10F = 'soiltemp10f'
TYPE_SOILTEMP2F = 'soiltemp2f'
TYPE_SOILTEMP3F = 'soiltemp3f'
TYPE_SOILTEMP4F = 'soiltemp4f'
TYPE_SOILTEMP5F = 'soiltemp5f'
TYPE_SOILTEMP6F = 'soiltemp6f'
TYPE_SOILTEMP7F = 'soiltemp7f'
TYPE_SOILTEMP8F = 'soiltemp8f'
TYPE_SOILTEMP9F = 'soiltemp9f'
TYPE_SOLARRADIATION = 'solarradiation'
TYPE_TEMP10F = 'temp10f'
TYPE_TEMP1F = 'temp1f'
TYPE_TEMP2F = 'temp2f'
TYPE_TEMP3F = 'temp3f'
TYPE_TEMP4F = 'temp4f'
TYPE_TEMP5F = 'temp5f'
TYPE_TEMP6F = 'temp6f'
TYPE_TEMP7F = 'temp7f'
TYPE_TEMP8F = 'temp8f'
TYPE_TEMP9F = 'temp9f'
TYPE_TEMPF = 'tempf'
TYPE_TEMPINF = 'tempinf'
TYPE_TOTALRAININ = 'totalrainin'
TYPE_UV = 'uv'
TYPE_WEEKLYRAININ = 'weeklyrainin'
TYPE_WINDDIR = 'winddir'
TYPE_WINDDIR_AVG10M = 'winddir_avg10m'
TYPE_WINDDIR_AVG2M = 'winddir_avg2m'
TYPE_WINDGUSTDIR = 'windgustdir'
TYPE_WINDGUSTMPH = 'windgustmph'
TYPE_WINDSPDMPH_AVG10M = 'windspdmph_avg10m'
TYPE_WINDSPDMPH_AVG2M = 'windspdmph_avg2m'
TYPE_WINDSPEEDMPH = 'windspeedmph'
TYPE_YEARLYRAININ = 'yearlyrainin'
SENSOR_TYPES = {
'24hourrainin': ('24 Hr Rain', 'in'),
'baromabsin': ('Abs Pressure', 'inHg'),
'baromrelin': ('Rel Pressure', 'inHg'),
'battout': ('Battery', ''),
'co2': ('co2', 'ppm'),
'dailyrainin': ('Daily Rain', 'in'),
'dewPoint': ('Dew Point', '°F'),
'eventrainin': ('Event Rain', 'in'),
'feelsLike': ('Feels Like', '°F'),
'hourlyrainin': ('Hourly Rain Rate', 'in/hr'),
'humidity': ('Humidity', '%'),
'humidityin': ('Humidity In', '%'),
'lastRain': ('Last Rain', ''),
'maxdailygust': ('Max Gust', 'mph'),
'monthlyrainin': ('Monthly Rain', 'in'),
'solarradiation': ('Solar Rad', 'W/m^2'),
'tempf': ('Temp', '°F'),
'tempinf': ('Inside Temp', '°F'),
'totalrainin': ('Lifetime Rain', 'in'),
'uv': ('uv', 'Index'),
'weeklyrainin': ('Weekly Rain', 'in'),
'winddir': ('Wind Dir', '°'),
'winddir_avg10m': ('Wind Dir Avg 10m', '°'),
'winddir_avg2m': ('Wind Dir Avg 2m', 'mph'),
'windgustdir': ('Gust Dir', '°'),
'windgustmph': ('Wind Gust', 'mph'),
'windspdmph_avg10m': ('Wind Avg 10m', 'mph'),
'windspdmph_avg2m': ('Wind Avg 2m', 'mph'),
'windspeedmph': ('Wind Speed', 'mph'),
'yearlyrainin': ('Yearly Rain', 'in'),
TYPE_24HOURRAININ: ('24 Hr Rain', 'in', TYPE_SENSOR, None),
TYPE_BAROMABSIN: ('Abs Pressure', 'inHg', TYPE_SENSOR, None),
TYPE_BAROMRELIN: ('Rel Pressure', 'inHg', TYPE_SENSOR, None),
TYPE_BATT10: ('Battery 10', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT1: ('Battery 1', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT2: ('Battery 2', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT3: ('Battery 3', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT4: ('Battery 4', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT5: ('Battery 5', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT6: ('Battery 6', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT7: ('Battery 7', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT8: ('Battery 8', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATT9: ('Battery 9', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_BATTOUT: ('Battery', None, TYPE_BINARY_SENSOR, 'battery'),
TYPE_CO2: ('co2', 'ppm', TYPE_SENSOR, None),
TYPE_DAILYRAININ: ('Daily Rain', 'in', TYPE_SENSOR, None),
TYPE_DEWPOINT: ('Dew Point', '°F', TYPE_SENSOR, None),
TYPE_EVENTRAININ: ('Event Rain', 'in', TYPE_SENSOR, None),
TYPE_FEELSLIKE: ('Feels Like', '°F', TYPE_SENSOR, None),
TYPE_HOURLYRAININ: ('Hourly Rain Rate', 'in/hr', TYPE_SENSOR, None),
TYPE_HUMIDITY10: ('Humidity 10', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY1: ('Humidity 1', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY2: ('Humidity 2', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY3: ('Humidity 3', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY4: ('Humidity 4', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY5: ('Humidity 5', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY6: ('Humidity 6', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY7: ('Humidity 7', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY8: ('Humidity 8', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY9: ('Humidity 9', '%', TYPE_SENSOR, None),
TYPE_HUMIDITY: ('Humidity', '%', TYPE_SENSOR, None),
TYPE_HUMIDITYIN: ('Humidity In', '%', TYPE_SENSOR, None),
TYPE_LASTRAIN: ('Last Rain', None, TYPE_SENSOR, None),
TYPE_MAXDAILYGUST: ('Max Gust', 'mph', TYPE_SENSOR, None),
TYPE_MONTHLYRAININ: ('Monthly Rain', 'in', TYPE_SENSOR, None),
TYPE_RELAY10: ('Relay 10', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY1: ('Relay 1', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY2: ('Relay 2', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY3: ('Relay 3', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY4: ('Relay 4', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY5: ('Relay 5', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY6: ('Relay 6', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY7: ('Relay 7', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY8: ('Relay 8', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_RELAY9: ('Relay 9', None, TYPE_BINARY_SENSOR, 'connectivity'),
TYPE_SOILHUM10: ('Soil Humidity 10', '%', TYPE_SENSOR, None),
TYPE_SOILHUM1: ('Soil Humidity 1', '%', TYPE_SENSOR, None),
TYPE_SOILHUM2: ('Soil Humidity 2', '%', TYPE_SENSOR, None),
TYPE_SOILHUM3: ('Soil Humidity 3', '%', TYPE_SENSOR, None),
TYPE_SOILHUM4: ('Soil Humidity 4', '%', TYPE_SENSOR, None),
TYPE_SOILHUM5: ('Soil Humidity 5', '%', TYPE_SENSOR, None),
TYPE_SOILHUM6: ('Soil Humidity 6', '%', TYPE_SENSOR, None),
TYPE_SOILHUM7: ('Soil Humidity 7', '%', TYPE_SENSOR, None),
TYPE_SOILHUM8: ('Soil Humidity 8', '%', TYPE_SENSOR, None),
TYPE_SOILHUM9: ('Soil Humidity 9', '%', TYPE_SENSOR, None),
TYPE_SOILTEMP10F: ('Soil Temp 10', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP1F: ('Soil Temp 1', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP2F: ('Soil Temp 2', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP3F: ('Soil Temp 3', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP4F: ('Soil Temp 4', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP5F: ('Soil Temp 5', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP6F: ('Soil Temp 6', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP7F: ('Soil Temp 7', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP8F: ('Soil Temp 8', '°F', TYPE_SENSOR, None),
TYPE_SOILTEMP9F: ('Soil Temp 9', '°F', TYPE_SENSOR, None),
TYPE_SOLARRADIATION: ('Solar Rad', 'W/m^2', TYPE_SENSOR, None),
TYPE_TEMP10F: ('Temp 10', '°F', TYPE_SENSOR, None),
TYPE_TEMP1F: ('Temp 1', '°F', TYPE_SENSOR, None),
TYPE_TEMP2F: ('Temp 2', '°F', TYPE_SENSOR, None),
TYPE_TEMP3F: ('Temp 3', '°F', TYPE_SENSOR, None),
TYPE_TEMP4F: ('Temp 4', '°F', TYPE_SENSOR, None),
TYPE_TEMP5F: ('Temp 5', '°F', TYPE_SENSOR, None),
TYPE_TEMP6F: ('Temp 6', '°F', TYPE_SENSOR, None),
TYPE_TEMP7F: ('Temp 7', '°F', TYPE_SENSOR, None),
TYPE_TEMP8F: ('Temp 8', '°F', TYPE_SENSOR, None),
TYPE_TEMP9F: ('Temp 9', '°F', TYPE_SENSOR, None),
TYPE_TEMPF: ('Temp', '°F', TYPE_SENSOR, None),
TYPE_TEMPINF: ('Inside Temp', '°F', TYPE_SENSOR, None),
TYPE_TOTALRAININ: ('Lifetime Rain', 'in', TYPE_SENSOR, None),
TYPE_UV: ('uv', 'Index', TYPE_SENSOR, None),
TYPE_WEEKLYRAININ: ('Weekly Rain', 'in', TYPE_SENSOR, None),
TYPE_WINDDIR: ('Wind Dir', '°', TYPE_SENSOR, None),
TYPE_WINDDIR_AVG10M: ('Wind Dir Avg 10m', '°', TYPE_SENSOR, None),
TYPE_WINDDIR_AVG2M: ('Wind Dir Avg 2m', 'mph', TYPE_SENSOR, None),
TYPE_WINDGUSTDIR: ('Gust Dir', '°', TYPE_SENSOR, None),
TYPE_WINDGUSTMPH: ('Wind Gust', 'mph', TYPE_SENSOR, None),
TYPE_WINDSPDMPH_AVG10M: ('Wind Avg 10m', 'mph', TYPE_SENSOR, None),
TYPE_WINDSPDMPH_AVG2M: ('Wind Avg 2m', 'mph', TYPE_SENSOR, None),
TYPE_WINDSPEEDMPH: ('Wind Speed', 'mph', TYPE_SENSOR, None),
TYPE_YEARLYRAININ: ('Yearly Rain', 'in', TYPE_SENSOR, None),
}
CONFIG_SCHEMA = vol.Schema({
DOMAIN:
vol.Schema({
vol.Required(CONF_APP_KEY):
cv.string,
vol.Required(CONF_API_KEY):
cv.string,
vol.Optional(
CONF_MONITORED_CONDITIONS, default=list(SENSOR_TYPES)):
vol.Required(CONF_APP_KEY): cv.string,
vol.Required(CONF_API_KEY): cv.string,
vol.Optional(CONF_MONITORED_CONDITIONS):
vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)]),
})
}, extra=vol.ALLOW_EXTRA)
@ -83,12 +232,20 @@ async def async_setup(hass, config):
conf = config[DOMAIN]
# Store config for use during entry setup:
hass.data[DOMAIN][DATA_CONFIG] = conf
if conf[CONF_APP_KEY] in configured_instances(hass):
return True
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={'source': SOURCE_IMPORT}, data=conf))
DOMAIN,
context={'source': SOURCE_IMPORT},
data={
CONF_API_KEY: conf[CONF_API_KEY],
CONF_APP_KEY: conf[CONF_APP_KEY]
}))
return True
@ -96,22 +253,20 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, config_entry):
"""Set up the Ambient PWS as config entry."""
from aioambient import Client
from aioambient.errors import WebsocketConnectionError
from aioambient.errors import WebsocketError
session = aiohttp_client.async_get_clientsession(hass)
try:
ambient = AmbientStation(
hass,
config_entry,
hass, config_entry,
Client(
config_entry.data[CONF_API_KEY],
config_entry.data[CONF_APP_KEY], session),
config_entry.data.get(
CONF_MONITORED_CONDITIONS, list(SENSOR_TYPES)))
hass.data[DOMAIN][DATA_CONFIG].get(CONF_MONITORED_CONDITIONS, []))
hass.loop.create_task(ambient.ws_connect())
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = ambient
except WebsocketConnectionError as err:
except WebsocketError as err:
_LOGGER.error('Config entry failed: %s', err)
raise ConfigEntryNotReady
@ -126,8 +281,9 @@ async def async_unload_entry(hass, config_entry):
ambient = hass.data[DOMAIN][DATA_CLIENT].pop(config_entry.entry_id)
hass.async_create_task(ambient.ws_disconnect())
await hass.config_entries.async_forward_entry_unload(
config_entry, 'sensor')
for component in ('binary_sensor', 'sensor'):
await hass.config_entries.async_forward_entry_unload(
config_entry, component)
return True
@ -172,15 +328,27 @@ class AmbientStation:
_LOGGER.debug('New station subscription: %s', data)
# If the user hasn't specified monitored conditions, use only
# those that their station supports (and which are defined
# here):
if not self.monitored_conditions:
self.monitored_conditions = [
k for k in station['lastData'].keys()
if k in SENSOR_TYPES
]
self.stations[station['macAddress']] = {
ATTR_LAST_DATA: station['lastData'],
ATTR_LOCATION: station['info']['location'],
ATTR_NAME: station['info']['name'],
ATTR_LOCATION: station.get('info', {}).get('location'),
ATTR_NAME:
station.get('info', {}).get(
'name', station['macAddress']),
}
for component in ('binary_sensor', 'sensor'):
self._hass.async_create_task(
self._hass.config_entries.async_forward_entry_setup(
self._config_entry, 'sensor'))
self._config_entry, component))
self._ws_reconnect_delay = DEFAULT_SOCKET_MIN_RETRY
@ -194,8 +362,7 @@ class AmbientStation:
except WebsocketError as err:
_LOGGER.error("Error with the websocket connection: %s", err)
self._ws_reconnect_delay = min(
2 * self._ws_reconnect_delay, 480)
self._ws_reconnect_delay = min(2 * self._ws_reconnect_delay, 480)
async_call_later(
self._hass, self._ws_reconnect_delay, self.ws_connect)
@ -203,3 +370,60 @@ class AmbientStation:
async def ws_disconnect(self):
"""Disconnect from the websocket."""
await self.client.websocket.disconnect()
class AmbientWeatherEntity(Entity):
"""Define a base Ambient PWS entity."""
def __init__(
self, ambient, mac_address, station_name, sensor_type,
sensor_name):
"""Initialize the sensor."""
self._ambient = ambient
self._async_unsub_dispatcher_connect = None
self._mac_address = mac_address
self._sensor_name = sensor_name
self._sensor_type = sensor_type
self._state = None
self._station_name = station_name
@property
def device_info(self):
"""Return device registry information for this entity."""
return {
'identifiers': {
(DOMAIN, self._mac_address)
},
'name': self._station_name,
'manufacturer': 'Ambient Weather',
}
@property
def name(self):
"""Return the name of the sensor."""
return '{0}_{1}'.format(self._station_name, self._sensor_name)
@property
def should_poll(self):
"""Disable polling."""
return False
@property
def unique_id(self):
"""Return a unique, unchanging string that represents this sensor."""
return '{0}_{1}'.format(self._mac_address, self._sensor_name)
async def async_added_to_hass(self):
"""Register callbacks."""
@callback
def update():
"""Update the state."""
self.async_schedule_update_ha_state(True)
self._async_unsub_dispatcher_connect = async_dispatcher_connect(
self.hass, TOPIC_UPDATE, update)
async def async_will_remove_from_hass(self):
"""Disconnect dispatcher listener when removed."""
if self._async_unsub_dispatcher_connect:
self._async_unsub_dispatcher_connect()

View File

@ -0,0 +1,72 @@
"""Support for Ambient Weather Station binary sensors."""
import logging
from homeassistant.components.ambient_station import (
SENSOR_TYPES, TYPE_BATT1, TYPE_BATT10, TYPE_BATT2, TYPE_BATT3, TYPE_BATT4,
TYPE_BATT5, TYPE_BATT6, TYPE_BATT7, TYPE_BATT8, TYPE_BATT9, TYPE_BATTOUT,
AmbientWeatherEntity)
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.const import ATTR_NAME
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TYPE_BINARY_SENSOR
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['ambient_station']
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up Ambient PWS binary sensors based on the old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Ambient PWS binary sensors based on a config entry."""
ambient = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]
binary_sensor_list = []
for mac_address, station in ambient.stations.items():
for condition in ambient.monitored_conditions:
name, _, kind, device_class = SENSOR_TYPES[condition]
if kind == TYPE_BINARY_SENSOR:
binary_sensor_list.append(
AmbientWeatherBinarySensor(
ambient, mac_address, station[ATTR_NAME], condition,
name, device_class))
async_add_entities(binary_sensor_list, True)
class AmbientWeatherBinarySensor(AmbientWeatherEntity, BinarySensorDevice):
"""Define an Ambient binary sensor."""
def __init__(
self, ambient, mac_address, station_name, sensor_type, sensor_name,
device_class):
"""Initialize the sensor."""
super().__init__(
ambient, mac_address, station_name, sensor_type, sensor_name)
self._device_class = device_class
@property
def device_class(self):
"""Return the device class."""
return self._device_class
@property
def is_on(self):
"""Return the status of the sensor."""
if self._sensor_type in (TYPE_BATT1, TYPE_BATT10, TYPE_BATT2,
TYPE_BATT3, TYPE_BATT4, TYPE_BATT5,
TYPE_BATT6, TYPE_BATT7, TYPE_BATT8,
TYPE_BATT9, TYPE_BATTOUT):
return self._state == 0
return self._state == 1
async def async_update(self):
"""Fetch new state data for the entity."""
self._state = self._ambient.stations[
self._mac_address][ATTR_LAST_DATA].get(self._sensor_type)

View File

@ -1,5 +1,4 @@
"""Config flow to configure the Ambient PWS component."""
import voluptuous as vol
from homeassistant import config_entries

View File

@ -8,3 +8,6 @@ CONF_APP_KEY = 'app_key'
DATA_CLIENT = 'data_client'
TOPIC_UPDATE = 'update'
TYPE_BINARY_SENSOR = 'binary_sensor'
TYPE_SENSOR = 'sensor'

View File

@ -1,71 +1,52 @@
"""
Support for Ambient Weather Station Service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ambient_station/
"""
"""Support for Ambient Weather Station sensors."""
import logging
from homeassistant.components.ambient_station import SENSOR_TYPES
from homeassistant.helpers.entity import Entity
from homeassistant.components.ambient_station import (
SENSOR_TYPES, AmbientWeatherEntity)
from homeassistant.const import ATTR_NAME
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TOPIC_UPDATE
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TYPE_SENSOR
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['ambient_station']
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up an Ambient PWS sensor based on existing config."""
"""Set up Ambient PWS sensors based on existing config."""
pass
async def async_setup_entry(hass, entry, async_add_entities):
"""Set up an Ambient PWS sensor based on a config entry."""
"""Set up Ambient PWS sensors based on a config entry."""
ambient = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]
sensor_list = []
for mac_address, station in ambient.stations.items():
for condition in ambient.monitored_conditions:
name, unit = SENSOR_TYPES[condition]
sensor_list.append(
AmbientWeatherSensor(
ambient, mac_address, station[ATTR_NAME], condition, name,
unit))
name, unit, kind, _ = SENSOR_TYPES[condition]
if kind == TYPE_SENSOR:
sensor_list.append(
AmbientWeatherSensor(
ambient, mac_address, station[ATTR_NAME], condition,
name, unit))
async_add_entities(sensor_list, True)
class AmbientWeatherSensor(Entity):
class AmbientWeatherSensor(AmbientWeatherEntity):
"""Define an Ambient sensor."""
def __init__(
self, ambient, mac_address, station_name, sensor_type, sensor_name,
unit):
"""Initialize the sensor."""
self._ambient = ambient
self._async_unsub_dispatcher_connect = None
self._mac_address = mac_address
self._sensor_name = sensor_name
self._sensor_type = sensor_type
self._state = None
self._station_name = station_name
super().__init__(
ambient, mac_address, station_name, sensor_type, sensor_name)
self._unit = unit
@property
def name(self):
"""Return the name of the sensor."""
return '{0}_{1}'.format(self._station_name, self._sensor_name)
@property
def should_poll(self):
"""Disable polling."""
return False
@property
def state(self):
"""Return the state of the sensor."""
@ -76,26 +57,6 @@ class AmbientWeatherSensor(Entity):
"""Return the unit of measurement."""
return self._unit
@property
def unique_id(self):
"""Return a unique, unchanging string that represents this sensor."""
return '{0}_{1}'.format(self._mac_address, self._sensor_name)
async def async_added_to_hass(self):
"""Register callbacks."""
@callback
def update():
"""Update the state."""
self.async_schedule_update_ha_state(True)
self._async_unsub_dispatcher_connect = async_dispatcher_connect(
self.hass, TOPIC_UPDATE, update)
async def async_will_remove_from_hass(self):
"""Disconnect dispatcher listener when removed."""
if self._async_unsub_dispatcher_connect:
self._async_unsub_dispatcher_connect()
async def async_update(self):
"""Fetch new state data for the sensor."""
self._state = self._ambient.stations[

View File

@ -1,9 +1,4 @@
"""
This component provides basic support for Amcrest IP cameras.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/amcrest/
"""
"""Support for Amcrest IP cameras."""
import logging
from datetime import timedelta

View File

@ -1,9 +1,4 @@
"""
This component provides basic support for Amcrest IP cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/camera.amcrest/
"""
"""Support for Amcrest IP cameras."""
import logging
from homeassistant.components.amcrest import (

View File

@ -1,9 +1,4 @@
"""
This component provides HA sensor support for Amcrest IP cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.amcrest/
"""
"""Suppoort for Amcrest IP camera sensors."""
from datetime import timedelta
import logging
@ -18,8 +13,8 @@ _LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(seconds=10)
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up a sensor for an Amcrest IP Camera."""
if discovery_info is None:
return
@ -45,8 +40,8 @@ class AmcrestSensor(Entity):
self._attrs = {}
self._camera = camera
self._sensor_type = sensor_type
self._name = '{0}_{1}'.format(name,
SENSORS.get(self._sensor_type)[0])
self._name = '{0}_{1}'.format(
name, SENSORS.get(self._sensor_type)[0])
self._icon = 'mdi:{}'.format(SENSORS.get(self._sensor_type)[2])
self._state = None

View File

@ -1,9 +1,4 @@
"""
Support for toggling Amcrest IP camera settings.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.amcrest/
"""
"""Support for toggling Amcrest IP camera settings."""
import logging
from homeassistant.components.amcrest import DATA_AMCREST, SWITCHES
@ -16,8 +11,8 @@ _LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['amcrest']
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the IP Amcrest camera switch platform."""
if discovery_info is None:
return

View File

@ -1,9 +1,4 @@
"""
Support for IP Webcam, an Android app that acts as a full-featured webcam.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/android_ip_webcam/
"""
"""Support for Android IP Webcam."""
import asyncio
import logging
from datetime import timedelta

View File

@ -1,9 +1,4 @@
"""
Support for IP Webcam binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.android_ip_webcam/
"""
"""Support for Android IP Webcam binary sensors."""
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.android_ip_webcam import (
KEY_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST, CONF_NAME)
@ -11,8 +6,8 @@ from homeassistant.components.android_ip_webcam import (
DEPENDENCIES = ['android_ip_webcam']
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the IP Webcam binary sensors."""
if discovery_info is None:
return

View File

@ -1,10 +1,4 @@
"""
Support for IP Webcam sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.android_ip_webcam/
"""
"""Support for Android IP Webcam sensors."""
from homeassistant.components.android_ip_webcam import (
KEY_MAP, ICON_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST,
CONF_NAME, CONF_SENSORS)
@ -13,8 +7,8 @@ from homeassistant.helpers.icon import icon_for_battery_level
DEPENDENCIES = ['android_ip_webcam']
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the IP Webcam Sensor."""
if discovery_info is None:
return

View File

@ -1,10 +1,4 @@
"""
Support for IP Webcam settings.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.android_ip_webcam/
"""
"""Support for Android IP Webcam settings."""
from homeassistant.components.switch import SwitchDevice
from homeassistant.components.android_ip_webcam import (
KEY_MAP, ICON_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST,
@ -13,8 +7,8 @@ from homeassistant.components.android_ip_webcam import (
DEPENDENCIES = ['android_ip_webcam']
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the IP Webcam switch platform."""
if discovery_info is None:
return

View File

@ -1,9 +1,4 @@
"""
Support for status output of APCUPSd via its Network Information Server (NIS).
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/apcupsd/
"""
"""Support for APCUPSd via its Network Information Server (NIS)."""
import logging
from datetime import timedelta

View File

@ -1,9 +1,4 @@
"""
Support for tracking the online status of a UPS.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.apcupsd/
"""
"""Support for tracking the online status of a UPS."""
import voluptuous as vol
from homeassistant.components.binary_sensor import (

View File

@ -1,9 +1,4 @@
"""
Provides a sensor to track various status aspects of a UPS.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.apcupsd/
"""
"""Support for APCUPSd sensors."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Rest API for Home Assistant.
For more details about the RESTful API, please refer to the documentation at
https://developers.home-assistant.io/docs/en/external_api_rest.html
"""
"""Rest API for Home Assistant."""
import asyncio
import json
import logging

View File

@ -1,9 +1,4 @@
"""
Support for Apple TV.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/apple_tv/
"""
"""Support for Apple TV."""
import asyncio
import logging
from typing import Sequence, TypeVar, Union

View File

@ -1,18 +1,13 @@
"""
Support for Apple TV.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.apple_tv/
"""
"""Support for Apple TV media player."""
import logging
from homeassistant.components.apple_tv import (
ATTR_ATV, ATTR_POWER, DATA_APPLE_TV, DATA_ENTITIES)
from homeassistant.components.media_player import (
from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO, SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PLAY_MEDIA, SUPPORT_PREVIOUS_TRACK,
SUPPORT_SEEK, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
MediaPlayerDevice)
SUPPORT_SEEK, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON)
from homeassistant.const import (
CONF_HOST, CONF_NAME, EVENT_HOMEASSISTANT_STOP, STATE_IDLE, STATE_OFF,
STATE_PAUSED, STATE_PLAYING, STATE_STANDBY)

View File

@ -1,21 +1,14 @@
"""
Remote control support for Apple TV.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/remote.apple_tv/
"""
"""Remote control support for Apple TV."""
from homeassistant.components.apple_tv import (
ATTR_ATV, ATTR_POWER, DATA_APPLE_TV)
from homeassistant.components import remote
from homeassistant.const import (CONF_NAME, CONF_HOST)
DEPENDENCIES = ['apple_tv']
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the Apple TV remote platform."""
if not discovery_info:
return

View File

@ -0,0 +1,5 @@
apple_tv_authenticate:
description: Start AirPlay device authentication.
fields:
entity_id: {description: Name(s) of entities to authenticate with., example: media_player.apple_tv}
apple_tv_scan: {description: Scan for Apple TV devices.}

View File

@ -1,9 +1,4 @@
"""
Support for AquaLogic component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/aqualogic/
"""
"""Support for AquaLogic devices."""
from datetime import timedelta
import logging
import time
@ -20,15 +15,15 @@ REQUIREMENTS = ["aqualogic==1.0"]
_LOGGER = logging.getLogger(__name__)
DOMAIN = "aqualogic"
UPDATE_TOPIC = DOMAIN + "_update"
CONF_UNIT = "unit"
DOMAIN = 'aqualogic'
UPDATE_TOPIC = DOMAIN + '_update'
CONF_UNIT = 'unit'
RECONNECT_INTERVAL = timedelta(seconds=10)
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PORT): cv.port
vol.Required(CONF_PORT): cv.port,
}),
}, extra=vol.ALLOW_EXTRA)
@ -39,10 +34,8 @@ def setup(hass, config):
port = config[DOMAIN][CONF_PORT]
processor = AquaLogicProcessor(hass, host, port)
hass.data[DOMAIN] = processor
hass.bus.listen_once(EVENT_HOMEASSISTANT_START,
processor.start_listen)
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP,
processor.shutdown)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, processor.start_listen)
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, processor.shutdown)
_LOGGER.debug("AquaLogicProcessor %s:%i initialized", host, port)
return True
@ -85,8 +78,7 @@ class AquaLogicProcessor(threading.Thread):
if self._shutdown:
return
_LOGGER.error("Connection to %s:%d lost",
self._host, self._port)
_LOGGER.error("Connection to %s:%d lost", self._host, self._port)
time.sleep(RECONNECT_INTERVAL.seconds)
@property

View File

@ -1,9 +1,4 @@
"""
Support for AquaLogic sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.aqualogic/
"""
"""Support for AquaLogic sensors."""
import logging
import voluptuous as vol
@ -46,8 +41,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
})
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the sensor platform."""
sensors = []

View File

@ -1,9 +1,4 @@
"""
Support for AquaLogic switches.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.aqualogic/
"""
"""Support for AquaLogic switches."""
import logging
import voluptuous as vol
@ -37,8 +32,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
})
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the switch platform."""
switches = []

View File

@ -1,9 +1,4 @@
"""
Support for Arduino boards running with the Firmata firmware.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/arduino/
"""
"""Support for Arduino boards running with the Firmata firmware."""
import logging
import voluptuous as vol

View File

@ -1,11 +1,4 @@
"""
Support for getting information from Arduino pins.
Only analog pins are supported.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.arduino/
"""
"""Support for getting information from Arduino pins."""
import logging
import voluptuous as vol

View File

@ -1,11 +1,4 @@
"""
Support for switching Arduino pins on and off.
So far only digital pins are supported.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.arduino/
"""
"""Support for switching Arduino pins on and off."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
This component provides support for Netgear Arlo IP cameras.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/arlo/
"""
"""Support for Netgear Arlo IP cameras."""
import logging
from datetime import timedelta

View File

@ -1,9 +1,4 @@
"""
Support for Arlo Alarm Control Panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.arlo/
"""
"""Support for Arlo Alarm Control Panels."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Support for Netgear Arlo IP cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/camera.arlo/
"""
"""Support for Netgear Arlo IP cameras."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
This component provides HA sensor for Netgear Arlo IP cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.arlo/
"""
"""Sensor support for Netgear Arlo IP cameras."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Support for Asterisk Voicemail interface.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/asterisk_mbox/
"""
"""Support for Asterisk Voicemail interface."""
import logging
import voluptuous as vol
@ -78,9 +73,8 @@ class AsteriskData:
@callback
def handle_data(self, command, msg):
"""Handle changes to the mailbox."""
from asterisk_mbox.commands import (CMD_MESSAGE_LIST,
CMD_MESSAGE_CDR_AVAILABLE,
CMD_MESSAGE_CDR)
from asterisk_mbox.commands import (
CMD_MESSAGE_LIST, CMD_MESSAGE_CDR_AVAILABLE, CMD_MESSAGE_CDR)
if command == CMD_MESSAGE_LIST:
_LOGGER.debug("AsteriskVM sent updated message list: Len %d",
@ -89,8 +83,8 @@ class AsteriskData:
self.messages = sorted(
msg, key=lambda item: item['info']['origtime'], reverse=True)
if not isinstance(old_messages, list):
async_dispatcher_send(self.hass, SIGNAL_DISCOVER_PLATFORM,
DOMAIN)
async_dispatcher_send(
self.hass, SIGNAL_DISCOVER_PLATFORM, DOMAIN)
async_dispatcher_send(self.hass, SIGNAL_MESSAGE_UPDATE,
self.messages)
elif command == CMD_MESSAGE_CDR:

View File

@ -1,9 +1,4 @@
"""
Asterisk Voicemail interface.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/mailbox.asteriskvm/
"""
"""Support for the Asterisk Voicemail interface."""
import logging
from homeassistant.components.asterisk_mbox import DOMAIN as ASTERISK_DOMAIN

View File

@ -1,9 +1,4 @@
"""
Support for ASUSWRT devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/asuswrt/
"""
"""Support for ASUSWRT devices."""
import logging
import voluptuous as vol
@ -18,15 +13,16 @@ REQUIREMENTS = ['aioasuswrt==1.1.20']
_LOGGER = logging.getLogger(__name__)
CONF_PUB_KEY = 'pub_key'
CONF_REQUIRE_IP = 'require_ip'
CONF_SENSORS = 'sensors'
CONF_SSH_KEY = 'ssh_key'
DOMAIN = "asuswrt"
DATA_ASUSWRT = DOMAIN
CONF_PUB_KEY = 'pub_key'
CONF_SSH_KEY = 'ssh_key'
CONF_REQUIRE_IP = 'require_ip'
DEFAULT_SSH_PORT = 22
SECRET_GROUP = 'Password or SSH Key'
CONF_SENSORS = 'sensors'
SENSOR_TYPES = ['upload_speed', 'download_speed', 'download', 'upload']
CONFIG_SCHEMA = vol.Schema({

View File

@ -1,9 +1,4 @@
"""
Support for August devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/august/
"""
"""Support for August devices."""
import logging
from datetime import timedelta

View File

@ -1,9 +1,4 @@
"""
Support for August binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.august/
"""
"""Support for August binary sensors."""
import logging
from datetime import timedelta, datetime
@ -144,6 +139,13 @@ class AugustDoorBinarySensor(BinarySensorDevice):
from august.lock import LockDoorStatus
self._state = self._state == LockDoorStatus.OPEN
@property
def unique_id(self) -> str:
"""Get the unique of the door open binary sensor."""
return '{:s}_{:s}'.format(self._door.device_id,
SENSOR_TYPES_DOOR[self._sensor_type][0]
.lower())
class AugustDoorbellBinarySensor(BinarySensorDevice):
"""Representation of an August binary sensor."""
@ -181,4 +183,11 @@ class AugustDoorbellBinarySensor(BinarySensorDevice):
"""Get the latest state of the sensor."""
state_provider = SENSOR_TYPES_DOORBELL[self._sensor_type][2]
self._state = state_provider(self._data, self._doorbell)
self._available = self._state is not None
self._available = self._doorbell.is_online
@property
def unique_id(self) -> str:
"""Get the unique id of the doorbell sensor."""
return '{:s}_{:s}'.format(self._doorbell.device_id,
SENSOR_TYPES_DOORBELL[self._sensor_type][0]
.lower())

View File

@ -1,9 +1,4 @@
"""
Support for August camera.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/camera.august/
"""
"""Support for August camera."""
from datetime import timedelta
import requests
@ -74,3 +69,8 @@ class AugustCamera(Camera):
timeout=self._timeout).content
return self._image_content
@property
def unique_id(self) -> str:
"""Get the unique id of the camera."""
return '{:s}_camera'.format(self._doorbell.device_id)

View File

@ -1,9 +1,4 @@
"""
Support for August lock.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/lock.august/
"""
"""Support for August lock."""
import logging
from datetime import timedelta
@ -95,3 +90,8 @@ class AugustLock(LockDevice):
return {
ATTR_BATTERY_LEVEL: self._lock_detail.battery_level,
}
@property
def unique_id(self) -> str:
"""Get the unique id of the lock."""
return '{:s}_lock'.format(self._lock.device_id)

View File

@ -0,0 +1,35 @@
{
"mfa_setup": {
"notify": {
"abort": {
"no_available_service": "Ingen underretningstjenester til r\u00e5dighed."
},
"error": {
"invalid_code": "Ugyldig kode, pr\u00f8v venligst igen."
},
"step": {
"init": {
"description": "V\u00e6lg venligst en af meddelelsestjenesterne:",
"title": "Ops\u00e6t engangsadgangskode, der er leveret af besked komponenten"
},
"setup": {
"description": "En engangsadgangskode er blevet sendt via **notify.{notify_service}**. Indtast den venligst nedenunder:",
"title": "Bekr\u00e6ft ops\u00e6tningen"
}
},
"title": "Advis\u00e9r engangskodeord"
},
"totp": {
"error": {
"invalid_code": "Ugyldig kode, pr\u00f8v venligst igen. Hvis du konsekvent f\u00e5r denne fejl skal du s\u00f8rge for at uret p\u00e5 dit Home Assistant system er g\u00e5r n\u00f8jagtigt."
},
"step": {
"init": {
"description": "Hvis du vil aktivere tofaktorautentificering ved hj\u00e6lp af tidsbaserede engangskoder skal du scanne QR-koden med din autentificeringsapp. Hvis du ikke har en anbefaler vi enten [Google Authenticator] (https://support.google.com/accounts/answer/1066447) eller [Authy] (https://authy.com/). \n\n {qr_code} \n \nN\u00e5r du har scannet koden skal du indtaste den sekscifrede kode fra din app for at bekr\u00e6fte ops\u00e6tningen. Hvis du har problemer med at scanne QR-koden skal du lave en manuel ops\u00e6tning med kode **`{code}`**.",
"title": "Konfigurer to-faktors godkendelse ved hj\u00e6lp af TOTP"
}
},
"title": "TOTP"
}
}
}

View File

@ -13,7 +13,7 @@
"title": "\uc54c\ub9bc \uad6c\uc131\uc694\uc18c\uac00 \uc81c\uacf5\ud558\ub294 \uc77c\ud68c\uc6a9 \ube44\ubc00\ubc88\ud638 \uc124\uc815"
},
"setup": {
"description": "**notify.{notify_service}** \uc5d0\uc11c \uc77c\ud68c\uc6a9 \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ub0c8\uc2b5\ub2c8\ub2e4. \uc544\ub798\uc758 \uacf5\ub780\uc5d0 \uc785\ub825\ud574 \uc8fc\uc138\uc694:",
"description": "**notify.{notify_service}** \uc5d0\uc11c \uc77c\ud68c\uc6a9 \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ub0c8\uc2b5\ub2c8\ub2e4. \uc544\ub798\uc758 \uacf5\ub780\uc5d0 \uc785\ub825\ud574\uc8fc\uc138\uc694:",
"title": "\uc124\uc815 \ud655\uc778"
}
},
@ -25,7 +25,7 @@
},
"step": {
"init": {
"description": "\uc2dc\uac04 \uae30\ubc18\uc758 \uc77c\ud68c\uc6a9 \ube44\ubc00\ubc88\ud638\ub97c \uc0ac\uc6a9\ud558\ub294 2\ub2e8\uacc4 \uc778\uc99d\uc744 \ud558\ub824\uba74 \uc778\uc99d\uc6a9 \uc571\uc744 \uc774\uc6a9\ud574\uc11c QR \ucf54\ub4dc\ub97c \uc2a4\uce94\ud574 \uc8fc\uc138\uc694. \uc778\uc99d\uc6a9 \uc571\uc740 [Google OTP](https://support.google.com/accounts/answer/1066447) \ub610\ub294 [Authy](https://authy.com/) \ub97c \ucd94\ucc9c\ub4dc\ub9bd\ub2c8\ub2e4.\n\n{qr_code}\n\n\uc2a4\uce94 \ud6c4\uc5d0 \uc0dd\uc131\ub41c 6\uc790\ub9ac \ucf54\ub4dc\ub97c \uc785\ub825\ud574\uc11c \uc124\uc815\uc744 \ud655\uc778\ud558\uc138\uc694. QR \ucf54\ub4dc \uc2a4\uce94\uc5d0 \ubb38\uc81c\uac00 \uc788\ub2e4\uba74, **`{code}`** \ucf54\ub4dc\ub85c \uc9c1\uc811 \uc124\uc815\ud574\ubcf4\uc138\uc694.",
"description": "\uc2dc\uac04 \uae30\ubc18\uc758 \uc77c\ud68c\uc6a9 \ube44\ubc00\ubc88\ud638\ub97c \uc0ac\uc6a9\ud558\ub294 2\ub2e8\uacc4 \uc778\uc99d\uc744 \ud558\ub824\uba74 \uc778\uc99d\uc6a9 \uc571\uc744 \uc774\uc6a9\ud574\uc11c QR \ucf54\ub4dc\ub97c \uc2a4\uce94\ud574\uc8fc\uc138\uc694. \uc778\uc99d\uc6a9 \uc571\uc740 [Google OTP](https://support.google.com/accounts/answer/1066447) \ub610\ub294 [Authy](https://authy.com/) \ub97c \ucd94\ucc9c\ub4dc\ub9bd\ub2c8\ub2e4.\n\n{qr_code}\n\n\uc2a4\uce94 \ud6c4\uc5d0 \uc0dd\uc131\ub41c 6\uc790\ub9ac \ucf54\ub4dc\ub97c \uc785\ub825\ud574\uc11c \uc124\uc815\uc744 \ud655\uc778\ud558\uc138\uc694. QR \ucf54\ub4dc \uc2a4\uce94\uc5d0 \ubb38\uc81c\uac00 \uc788\ub2e4\uba74, **`{code}`** \ucf54\ub4dc\ub85c \uc9c1\uc811 \uc124\uc815\ud574\ubcf4\uc138\uc694.",
"title": "TOTP \ub97c \uc0ac\uc6a9\ud558\uc5ec 2\ub2e8\uacc4 \uc778\uc99d \uad6c\uc131"
}
},

View File

@ -1,9 +1,4 @@
"""
Allow to set up simple automation rules via the config file.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/automation/
"""
"""Allow to set up simple automation rules via the config file."""
import asyncio
from functools import partial
import importlib

View File

@ -1,9 +1,4 @@
"""
Offer event listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#event-trigger
"""
"""Offer event listening automation rules."""
import logging
import voluptuous as vol

View File

@ -1,10 +1,4 @@
"""
Offer geolocation automation rules.
For more details about this automation trigger, please refer to the
documentation at
https://home-assistant.io/docs/automation/trigger/#geolocation-trigger
"""
"""Offer geolocation automation rules."""
import voluptuous as vol
from homeassistant.components.geo_location import DOMAIN

View File

@ -1,9 +1,4 @@
"""
Offer Home Assistant core automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#homeassistant-trigger
"""
"""Offer Home Assistant core automation rules."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Trigger an automation when a LiteJet switch is released.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/automation.litejet/
"""
"""Trigger an automation when a LiteJet switch is released."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Offer MQTT listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#mqtt-trigger
"""
"""Offer MQTT listening automation rules."""
import json
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Offer numeric state listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#numeric-state-trigger
"""
"""Offer numeric state listening automation rules."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Offer state listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#state-trigger
"""
"""Offer state listening automation rules."""
import voluptuous as vol
from homeassistant.core import callback

View File

@ -1,9 +1,4 @@
"""
Offer sun based automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#sun-trigger
"""
"""Offer sun based automation rules."""
from datetime import timedelta
import logging

View File

@ -1,9 +1,4 @@
"""
Offer template automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#template-trigger
"""
"""Offer template automation rules."""
import logging
import voluptuous as vol
@ -13,7 +8,6 @@ from homeassistant.const import CONF_VALUE_TEMPLATE, CONF_PLATFORM
from homeassistant.helpers.event import async_track_template
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
TRIGGER_SCHEMA = IF_ACTION_SCHEMA = vol.Schema({

View File

@ -1,9 +1,4 @@
"""
Offer time listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#time-trigger
"""
"""Offer time listening automation rules."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Offer time listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#time-trigger
"""
"""Offer time listening automation rules."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Offer webhook triggered automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#webhook-trigger
"""
"""Offer webhook triggered automation rules."""
from functools import partial
import logging

View File

@ -1,9 +1,4 @@
"""
Offer zone automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#zone-trigger
"""
"""Offer zone automation rules."""
import voluptuous as vol
from homeassistant.core import callback

View File

@ -1,9 +1,4 @@
"""
Support for Axis devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/axis/
"""
"""Support for Axis devices."""
import logging
import voluptuous as vol

View File

@ -1,9 +1,4 @@
"""
Support for Axis binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.axis/
"""
"""Support for Axis binary sensors."""
from datetime import timedelta
import logging

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