Merge remote-tracking branch 'origin/next' into rc

This commit is contained in:
Paulus Schoutsen 2020-01-08 21:07:26 +01:00
commit 5fb803c5eb
1026 changed files with 6224 additions and 3739 deletions

4
.vscode/cSpell.json vendored
View File

@ -18,8 +18,8 @@
"geizhals",
"Harman",
"hass",
"hass.io",
"hassos",
"Hass.io",
"HassOS",
"hcitool",
"heos",
"hikvision",

376
CODEOWNERS Normal file
View File

@ -0,0 +1,376 @@
# This file is generated.
#
# People marked here will be automatically requested for a review
# when the documentation that they own is touched.
#
# It is synced with the codebase, so if you own the integration,
# you will own the docs as well.
# https://github.com/blog/2392-introducing-code-owners
# Pages
source/_integrations/abode.markdown @shred86
source/_integrations/adguard.markdown @frenck
source/_integrations/airly.markdown @bieniu
source/_integrations/airvisual.markdown @bachya
source/_integrations/alexa.markdown @home-assistant/cloud @ochlocracy
source/_integrations/almond.markdown @gcampax @balloob
source/_integrations/alpha_vantage.markdown @fabaff
source/_integrations/amazon_polly.markdown @robbiet480
source/_integrations/ambiclimate.markdown @danielhiversen
source/_integrations/ambient_station.markdown @bachya
source/_integrations/androidtv.markdown @JeffLIrion
source/_integrations/apache_kafka.markdown @bachya
source/_integrations/api.markdown @home-assistant/core
source/_integrations/apprise.markdown @caronc
source/_integrations/aprs.markdown @PhilRW
source/_integrations/arcam_fmj.markdown @elupus
source/_integrations/arduino.markdown @fabaff
source/_integrations/arest.markdown @fabaff
source/_integrations/asuswrt.markdown @kennedyshead
source/_integrations/aten_pe.markdown @mtdcr
source/_integrations/atome.markdown @baqs
source/_integrations/aurora_abb_powerone.markdown @davet2001
source/_integrations/auth.markdown @home-assistant/core
source/_integrations/automatic.markdown @armills
source/_integrations/automation.markdown @home-assistant/core
source/_integrations/avea.markdown @pattyland
source/_integrations/awair.markdown @danielsjf
source/_integrations/aws.markdown @awarecan @robbiet480
source/_integrations/axis.markdown @kane610
source/_integrations/azure_event_hub.markdown @eavanvalkenburg
source/_integrations/azure_service_bus.markdown @hfurubotten
source/_integrations/beewi_smartclim.markdown @alemuro
source/_integrations/bitcoin.markdown @fabaff
source/_integrations/bizkaibus.markdown @UgaitzEtxebarria
source/_integrations/blink.markdown @fronzbot
source/_integrations/bmw_connected_drive.markdown @gerard33
source/_integrations/braviatv.markdown @robbiet480
source/_integrations/broadlink.markdown @danielhiversen @felipediel
source/_integrations/brunt.markdown @eavanvalkenburg
source/_integrations/bt_smarthub.markdown @jxwolstenholme
source/_integrations/buienradar.markdown @mjj4791 @ties
source/_integrations/cert_expiry.markdown @Cereal2nd @jjlawren
source/_integrations/cisco_ios.markdown @fbradyirl
source/_integrations/cisco_mobility_express.markdown @fbradyirl
source/_integrations/cisco_webex_teams.markdown @fbradyirl
source/_integrations/ciscospark.markdown @fbradyirl
source/_integrations/cloud.markdown @home-assistant/cloud
source/_integrations/cloudflare.markdown @ludeeus
source/_integrations/comfoconnect.markdown @michaelarnauts
source/_integrations/config.markdown @home-assistant/core
source/_integrations/configurator.markdown @home-assistant/core
source/_integrations/conversation.markdown @home-assistant/core
source/_integrations/coolmaster.markdown @OnFreund
source/_integrations/counter.markdown @fabaff
source/_integrations/cover.markdown @home-assistant/core
source/_integrations/cpuspeed.markdown @fabaff
source/_integrations/cups.markdown @fabaff
source/_integrations/daikin.markdown @fredrike @rofrantz
source/_integrations/darksky.markdown @fabaff
source/_integrations/deconz.markdown @kane610
source/_integrations/delijn.markdown @bollewolle
source/_integrations/demo.markdown @home-assistant/core
source/_integrations/device_automation.markdown @home-assistant/core
source/_integrations/digital_ocean.markdown @fabaff
source/_integrations/discogs.markdown @thibmaek
source/_integrations/doorbird.markdown @oblogic7
source/_integrations/dsmr_reader.markdown @depl0y
source/_integrations/dweet.markdown @fabaff
source/_integrations/ecobee.markdown @marthoc
source/_integrations/ecovacs.markdown @OverloadUT
source/_integrations/egardia.markdown @jeroenterheerdt
source/_integrations/eight_sleep.markdown @mezz64
source/_integrations/elv.markdown @majuss
source/_integrations/emby.markdown @mezz64
source/_integrations/emulated_hue.markdown @NobleKangaroo
source/_integrations/enigma2.markdown @fbradyirl
source/_integrations/enocean.markdown @bdurrer
source/_integrations/entur_public_transport.markdown @hfurubotten
source/_integrations/environment_canada.markdown @michaeldavie
source/_integrations/ephember.markdown @ttroy50
source/_integrations/epsonworkforce.markdown @ThaStealth
source/_integrations/eq3btsmart.markdown @rytilahti
source/_integrations/esphome.markdown @OttoWinter
source/_integrations/essent.markdown @TheLastProject
source/_integrations/evohome.markdown @zxdavb
source/_integrations/fastdotcom.markdown @rohankapoorcom
source/_integrations/file.markdown @fabaff
source/_integrations/filter.markdown @dgomes
source/_integrations/fitbit.markdown @robbiet480
source/_integrations/fixer.markdown @fabaff
source/_integrations/flock.markdown @fabaff
source/_integrations/flume.markdown @ChrisMandich
source/_integrations/flunearyou.markdown @bachya
source/_integrations/fortigate.markdown @kifeo
source/_integrations/fortios.markdown @kimfrellsen
source/_integrations/foscam.markdown @skgsergio
source/_integrations/foursquare.markdown @robbiet480
source/_integrations/freebox.markdown @snoof85
source/_integrations/fronius.markdown @nielstron
source/_integrations/frontend.markdown @home-assistant/frontend
source/_integrations/gearbest.markdown @HerrHofrat
source/_integrations/geniushub.markdown @zxdavb
source/_integrations/geo_rss_events.markdown @exxamalte
source/_integrations/geonetnz_quakes.markdown @exxamalte
source/_integrations/geonetnz_volcano.markdown @exxamalte
source/_integrations/gitter.markdown @fabaff
source/_integrations/glances.markdown @fabaff @engrbm87
source/_integrations/gntp.markdown @robbiet480
source/_integrations/google_assistant.markdown @home-assistant/cloud
source/_integrations/google_cloud.markdown @lufton
source/_integrations/google_translate.markdown @awarecan
source/_integrations/google_travel_time.markdown @robbiet480
source/_integrations/gpsd.markdown @fabaff
source/_integrations/group.markdown @home-assistant/core
source/_integrations/growatt_server.markdown @indykoning
source/_integrations/gtfs.markdown @robbiet480
source/_integrations/harmony.markdown @ehendrix23
source/_integrations/heatmiser.markdown @andylockran
source/_integrations/heos.markdown @andrewsayre
source/_integrations/here_travel_time.markdown @eifinger
source/_integrations/hikvision.markdown @mezz64
source/_integrations/hikvisioncam.markdown @fbradyirl
source/_integrations/hisense_aehw4a1.markdown @bannhead
source/_integrations/history.markdown @home-assistant/core
source/_integrations/history_graph.markdown @andrey-git
source/_integrations/hive.markdown @Rendili @KJonline
source/_integrations/homeassistant.markdown @home-assistant/core
source/_integrations/homekit_controller.markdown @Jc2k
source/_integrations/homematic.markdown @pvizeli @danielperna84
source/_integrations/homematicip_cloud.markdown @SukramJ
source/_integrations/honeywell.markdown @zxdavb
source/_integrations/html5.markdown @robbiet480
source/_integrations/http.markdown @home-assistant/core
source/_integrations/huawei_lte.markdown @scop
source/_integrations/huawei_router.markdown @abmantis
source/_integrations/hue.markdown @balloob
source/_integrations/iaqualink.markdown @flz
source/_integrations/ign_sismologia.markdown @exxamalte
source/_integrations/incomfort.markdown @zxdavb
source/_integrations/influxdb.markdown @fabaff
source/_integrations/input_boolean.markdown @home-assistant/core
source/_integrations/input_datetime.markdown @home-assistant/core
source/_integrations/input_number.markdown @home-assistant/core
source/_integrations/input_select.markdown @home-assistant/core
source/_integrations/input_text.markdown @home-assistant/core
source/_integrations/integration.markdown @dgomes
source/_integrations/ios.markdown @robbiet480
source/_integrations/iperf3.markdown @rohankapoorcom
source/_integrations/ipma.markdown @dgomes
source/_integrations/iqvia.markdown @bachya
source/_integrations/irish_rail_transport.markdown @ttroy50
source/_integrations/izone.markdown @Swamp-Ig
source/_integrations/jewish_calendar.markdown @tsvi
source/_integrations/juicenet.markdown @jesserockz
source/_integrations/kaiterra.markdown @Michsior14
source/_integrations/keba.markdown @dannerph
source/_integrations/keenetic_ndms2.markdown @foxel
source/_integrations/keyboard_remote.markdown @bendavid
source/_integrations/knx.markdown @Julius2342
source/_integrations/kodi.markdown @armills
source/_integrations/konnected.markdown @heythisisnate
source/_integrations/lametric.markdown @robbiet480
source/_integrations/launch_library.markdown @ludeeus
source/_integrations/lcn.markdown @alengwenus
source/_integrations/life360.markdown @pnbruckner
source/_integrations/linky.markdown @Quentame
source/_integrations/linux_battery.markdown @fabaff
source/_integrations/liveboxplaytv.markdown @pschmitt
source/_integrations/logger.markdown @home-assistant/core
source/_integrations/logi_circle.markdown @evanjd
source/_integrations/luci.markdown @fbradyirl @mzdrale
source/_integrations/luftdaten.markdown @fabaff
source/_integrations/lupusec.markdown @majuss
source/_integrations/lutron.markdown @JonGilmore
source/_integrations/mastodon.markdown @fabaff
source/_integrations/matrix.markdown @tinloaf
source/_integrations/mcp23017.markdown @jardiamj
source/_integrations/mediaroom.markdown @dgomes
source/_integrations/melissa.markdown @kennedyshead
source/_integrations/met.markdown @danielhiversen
source/_integrations/meteo_france.markdown @victorcerutti @oncleben31
source/_integrations/meteoalarm.markdown @rolfberkenbosch
source/_integrations/miflora.markdown @danielhiversen @ChristianKuehnel
source/_integrations/mill.markdown @danielhiversen
source/_integrations/min_max.markdown @fabaff
source/_integrations/minio.markdown @tkislan
source/_integrations/mobile_app.markdown @robbiet480
source/_integrations/modbus.markdown @adamchengtkc
source/_integrations/monoprice.markdown @etsinko
source/_integrations/moon.markdown @fabaff
source/_integrations/mpd.markdown @fabaff
source/_integrations/mqtt.markdown @home-assistant/core
source/_integrations/msteams.markdown @peroyvind
source/_integrations/mysensors.markdown @MartinHjelmare
source/_integrations/mystrom.markdown @fabaff
source/_integrations/neato.markdown @dshokouhi @Santobert
source/_integrations/nello.markdown @pschmitt
source/_integrations/ness_alarm.markdown @nickw444
source/_integrations/nest.markdown @awarecan
source/_integrations/netdata.markdown @fabaff
source/_integrations/nextbus.markdown @vividboarder
source/_integrations/nilu.markdown @hfurubotten
source/_integrations/nissan_leaf.markdown @filcole
source/_integrations/nmbs.markdown @thibmaek
source/_integrations/no_ip.markdown @fabaff
source/_integrations/notify.markdown @home-assistant/core
source/_integrations/notion.markdown @bachya
source/_integrations/nsw_fuel_station.markdown @nickw444
source/_integrations/nsw_rural_fire_service_feed.markdown @exxamalte
source/_integrations/nuki.markdown @pvizeli
source/_integrations/nws.markdown @MatthewFlamm
source/_integrations/nzbget.markdown @chriscla
source/_integrations/obihai.markdown @dshokouhi
source/_integrations/ohmconnect.markdown @robbiet480
source/_integrations/ombi.markdown @larssont
source/_integrations/onboarding.markdown @home-assistant/core
source/_integrations/opentherm_gw.markdown @mvn23
source/_integrations/openuv.markdown @bachya
source/_integrations/openweathermap.markdown @fabaff
source/_integrations/orangepi_gpio.markdown @pascallj
source/_integrations/oru.markdown @bvlaicu
source/_integrations/owlet.markdown @oblogic7
source/_integrations/panel_custom.markdown @home-assistant/frontend
source/_integrations/panel_iframe.markdown @home-assistant/frontend
source/_integrations/pcal9535a.markdown @Shulyaka
source/_integrations/persistent_notification.markdown @home-assistant/core
source/_integrations/philips_js.markdown @elupus
source/_integrations/pi_hole.markdown @fabaff @johnluetke
source/_integrations/plaato.markdown @JohNan
source/_integrations/plant.markdown @ChristianKuehnel
source/_integrations/plex.markdown @jjlawren
source/_integrations/plugwise.markdown @laetificat @CoMPaTech @bouwew
source/_integrations/point.markdown @fredrike
source/_integrations/proxmoxve.markdown @k4ds3
source/_integrations/ps4.markdown @ktnrg45
source/_integrations/ptvsd.markdown @swamp-ig
source/_integrations/push.markdown @dgomes
source/_integrations/pvoutput.markdown @fabaff
source/_integrations/qld_bushfire.markdown @exxamalte
source/_integrations/qnap.markdown @colinodell
source/_integrations/quantum_gateway.markdown @cisasteelersfan
source/_integrations/qwikswitch.markdown @kellerza
source/_integrations/rainbird.markdown @konikvranik
source/_integrations/raincloud.markdown @vanstinator
source/_integrations/rainforest_eagle.markdown @gtdiehl
source/_integrations/rainmachine.markdown @bachya
source/_integrations/random.markdown @fabaff
source/_integrations/repetier.markdown @MTrab
source/_integrations/rfxtrx.markdown @danielhiversen
source/_integrations/rmvtransport.markdown @cgtobi
source/_integrations/roomba.markdown @pschmitt
source/_integrations/saj.markdown @fredericvl
source/_integrations/samsungtv.markdown @escoand
source/_integrations/scene.markdown @home-assistant/core
source/_integrations/scrape.markdown @fabaff
source/_integrations/script.markdown @home-assistant/core
source/_integrations/sense.markdown @kbickar
source/_integrations/sensibo.markdown @andrey-git
source/_integrations/serial.markdown @fabaff
source/_integrations/seventeentrack.markdown @bachya
source/_integrations/shell_command.markdown @home-assistant/core
source/_integrations/shiftr.markdown @fabaff
source/_integrations/shodan.markdown @fabaff
source/_integrations/simplisafe.markdown @bachya
source/_integrations/sinch.markdown @bendikrb
source/_integrations/slide.markdown @ualex73
source/_integrations/sma.markdown @kellerza
source/_integrations/smarthab.markdown @outadoc
source/_integrations/smartthings.markdown @andrewsayre
source/_integrations/smarty.markdown @z0mbieprocess
source/_integrations/smtp.markdown @fabaff
source/_integrations/solaredge_local.markdown @drobtravels @scheric
source/_integrations/solarlog.markdown @Ernst79
source/_integrations/solax.markdown @squishykid
source/_integrations/soma.markdown @ratsept
source/_integrations/somfy.markdown @tetienne
source/_integrations/songpal.markdown @rytilahti
source/_integrations/spaceapi.markdown @fabaff
source/_integrations/speedtestdotnet.markdown @rohankapoorcom
source/_integrations/spider.markdown @peternijssen
source/_integrations/sql.markdown @dgomes
source/_integrations/starline.markdown @anonym-tsk
source/_integrations/statistics.markdown @fabaff
source/_integrations/stiebel_eltron.markdown @fucm
source/_integrations/stream.markdown @hunterjm
source/_integrations/stt.markdown @pvizeli
source/_integrations/suez_water.markdown @ooii
source/_integrations/sun.markdown @Swamp-Ig
source/_integrations/supla.markdown @mwegrzynek
source/_integrations/swiss_hydrological_data.markdown @fabaff
source/_integrations/swiss_public_transport.markdown @fabaff
source/_integrations/switchbot.markdown @danielhiversen
source/_integrations/switcher_kis.markdown @tomerfi
source/_integrations/switchmate.markdown @danielhiversen
source/_integrations/syncthru.markdown @nielstron
source/_integrations/synology_srm.markdown @aerialls
source/_integrations/syslog.markdown @fabaff
source/_integrations/tado.markdown @michaelarnauts
source/_integrations/tahoma.markdown @philklei
source/_integrations/tautulli.markdown @ludeeus
source/_integrations/tellduslive.markdown @fredrike
source/_integrations/template.markdown @PhracturedBlue
source/_integrations/tesla.markdown @zabuldon
source/_integrations/tfiac.markdown @fredrike @mellado
source/_integrations/thethingsnetwork.markdown @fabaff
source/_integrations/threshold.markdown @fabaff
source/_integrations/tibber.markdown @danielhiversen
source/_integrations/tile.markdown @bachya
source/_integrations/time_date.markdown @fabaff
source/_integrations/todoist.markdown @boralyl
source/_integrations/toon.markdown @frenck
source/_integrations/tplink.markdown @rytilahti
source/_integrations/traccar.markdown @ludeeus
source/_integrations/tradfri.markdown @ggravlingen
source/_integrations/trafikverket_train.markdown @endor-force
source/_integrations/transmission.markdown @engrbm87 @JPHutchins
source/_integrations/tts.markdown @robbiet480
source/_integrations/twentemilieu.markdown @frenck
source/_integrations/twilio_call.markdown @robbiet480
source/_integrations/twilio_sms.markdown @robbiet480
source/_integrations/unifi.markdown @kane610
source/_integrations/unifiled.markdown @florisvdk
source/_integrations/upc_connect.markdown @pvizeli
source/_integrations/upcloud.markdown @scop
source/_integrations/updater.markdown @home-assistant/core
source/_integrations/upnp.markdown @robbiet480
source/_integrations/uptimerobot.markdown @ludeeus
source/_integrations/usgs_earthquakes_feed.markdown @exxamalte
source/_integrations/utility_meter.markdown @dgomes
source/_integrations/velbus.markdown @cereal2nd
source/_integrations/velux.markdown @Julius2342
source/_integrations/versasense.markdown @flamm3blemuff1n
source/_integrations/version.markdown @fabaff
source/_integrations/vesync.markdown @markperdue @webdjoe
source/_integrations/vicare.markdown @oischinger
source/_integrations/vivotek.markdown @HarlemSquirrel
source/_integrations/vizio.markdown @raman325
source/_integrations/vlc_telnet.markdown @rodripf
source/_integrations/waqi.markdown @andrey-git
source/_integrations/watson_tts.markdown @rutkai
source/_integrations/weather.markdown @fabaff
source/_integrations/weblink.markdown @home-assistant/core
source/_integrations/websocket_api.markdown @home-assistant/core
source/_integrations/wemo.markdown @sqldiablo
source/_integrations/withings.markdown @vangorra
source/_integrations/wled.markdown @frenck
source/_integrations/worldclock.markdown @fabaff
source/_integrations/wwlln.markdown @bachya
source/_integrations/xbox_live.markdown @MartinHjelmare
source/_integrations/xfinity.markdown @cisasteelersfan
source/_integrations/xiaomi_aqara.markdown @danielhiversen @syssi
source/_integrations/xiaomi_miio.markdown @rytilahti @syssi
source/_integrations/xiaomi_tv.markdown @simse
source/_integrations/xmpp.markdown @fabaff @flowolf
source/_integrations/yamaha_musiccast.markdown @jalmeroth
source/_integrations/yandex_transport.markdown @rishatik92
source/_integrations/yeelight.markdown @rytilahti @zewelor
source/_integrations/yeelightsunflower.markdown @lindsaymarkward
source/_integrations/yessssms.markdown @flowolf
source/_integrations/yi.markdown @bachya
source/_integrations/yr.markdown @danielhiversen
source/_integrations/zeroconf.markdown @robbiet480 @Kane610
source/_integrations/zha.markdown @dmulcahey @adminiuga
source/_integrations/zone.markdown @home-assistant/core
source/_integrations/zoneminder.markdown @rohankapoorcom
source/_integrations/zwave.markdown @home-assistant/z-wave

View File

@ -18,8 +18,8 @@ group :jekyll_plugins do
gem 'jekyll-commonmark', '1.3.1'
end
gem 'sinatra', '2.0.7'
gem 'nokogiri', '1.10.6'
gem 'sinatra', '2.0.8.1'
gem 'nokogiri', '1.10.7'
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library

View File

@ -70,16 +70,17 @@ GEM
mercenary (0.3.6)
mini_portile2 (2.4.0)
multi_json (1.14.1)
mustermann (1.0.3)
nokogiri (1.10.6)
mustermann (1.1.0)
ruby2_keywords (~> 0.0.1)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
nokogiri (1.10.6-x64-mingw32)
nokogiri (1.10.7-x64-mingw32)
mini_portile2 (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.1)
rack (2.0.7)
rack-protection (2.0.7)
rack (2.0.8)
rack-protection (2.0.8.1)
rack
rake (13.0.1)
rb-fsevent (0.10.3)
@ -88,6 +89,7 @@ GEM
rouge (3.13.0)
ruby-enum (0.7.2)
i18n
ruby2_keywords (0.0.1)
safe_yaml (1.0.5)
sass (3.4.25)
sass-globbing (1.1.5)
@ -96,16 +98,16 @@ GEM
ffi (~> 1.9)
sassc (2.2.1-x64-mingw32)
ffi (~> 1.9)
sinatra (2.0.7)
sinatra (2.0.8.1)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.7)
rack-protection (= 2.0.8.1)
tilt (~> 2.0)
stringex (2.8.5)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tilt (2.0.10)
tzinfo (2.0.0)
tzinfo (2.0.1)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2019.3)
tzinfo (>= 1.0.0)
@ -123,10 +125,10 @@ DEPENDENCIES
jekyll-redirect-from (= 0.15.0)
jekyll-sitemap (= 1.4.0)
jekyll-time-to-read (= 0.1.2)
nokogiri (= 1.10.6)
nokogiri (= 1.10.7)
rake (= 13.0.1)
sass-globbing (= 1.1.5)
sinatra (= 2.0.7)
sinatra (= 2.0.8.1)
stringex (= 2.8.5)
tzinfo (~> 2.0)
tzinfo-data

241
Rakefile
View File

@ -2,28 +2,13 @@ require "rubygems"
require "bundler/setup"
require "stringex"
## -- Rsync Deploy config -- ##
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
ssh_user = "user@domain.com"
ssh_port = "22"
document_root = "~/website.com/"
rsync_delete = false
rsync_args = "" # Any extra arguments to pass to rsync
deploy_default = "push"
# This will be configured for you when you run config_deploy
deploy_branch = "master"
## -- Misc Configs -- ##
public_dir = "public/" # compiled site directory
source_dir = "source" # source file directory
blog_index_dir = 'source/blog' # directory for your blog's index page (if you put your index in source/blog/index.html, set this to 'source/blog')
deploy_dir = "_deploy" # deploy directory (for Github pages deployment)
stash_dir = "_stash" # directory to stash posts for speedy generation
components_dir = "_components" # directory for component files
posts_dir = "_posts" # directory for blog files
themes_dir = ".themes" # directory for blog files
new_post_ext = "markdown" # default new post file extension when using the new_post task
new_page_ext = "markdown" # default new page file extension when using the new_page task
server_port = "4000" # port for preview server eg. localhost:4000
@ -33,22 +18,6 @@ if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
`chcp 65001`
end
desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
task :install, :theme do |t, args|
if File.directory?(source_dir) || File.directory?("sass")
abort("rake aborted!") if ask("A theme is already installed, proceeding will overwrite existing files. Are you sure?", ['y', 'n']) == 'n'
end
# copy theme into working Jekyll directories
theme = args.theme || 'classic'
puts "## Copying "+theme+" theme into ./#{source_dir} and ./sass"
mkdir_p source_dir
cp_r "#{themes_dir}/#{theme}/source/.", source_dir
mkdir_p "sass"
cp_r "#{themes_dir}/#{theme}/sass/.", "sass"
mkdir_p "#{source_dir}/#{posts_dir}"
mkdir_p public_dir
end
#######################
# Working with Jekyll #
#######################
@ -198,216 +167,6 @@ task :clean do
rm_rf [Dir.glob(".pygments-cache/**"), Dir.glob(".gist-cache/**"), Dir.glob(".sass-cache/**"), "source/stylesheets/screen.css"]
end
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
task :update_style, :theme do |t, args|
theme = args.theme || 'classic'
if File.directory?("sass.old")
puts "removed existing sass.old directory"
rm_r "sass.old", :secure=>true
end
mv "sass", "sass.old"
puts "## Moved styles into sass.old/"
cp_r "#{themes_dir}/"+theme+"/sass/", "sass", :remove_destination=>true
cp_r "sass.old/custom/.", "sass/custom/", :remove_destination=>true
puts "## Updated Sass ##"
end
desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation"
task :update_source, :theme do |t, args|
theme = args.theme || 'classic'
if File.directory?("#{source_dir}.old")
puts "## Removed existing #{source_dir}.old directory"
rm_r "#{source_dir}.old", :secure=>true
end
mkdir "#{source_dir}.old"
cp_r "#{source_dir}/.", "#{source_dir}.old"
puts "## Copied #{source_dir} into #{source_dir}.old/"
cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true
cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true
cp "#{source_dir}.old/favicon.png", source_dir
mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html")
puts "## Updated #{source_dir} ##"
end
##############
# Deploying #
##############
desc "Default deploy task"
task :deploy do
# Check if preview posts exist, which should not be published
if File.exists?(".preview-mode")
puts "## Found posts in preview mode, regenerating files ..."
File.delete(".preview-mode")
Rake::Task[:generate].execute
end
Rake::Task[:copydot].invoke(source_dir, public_dir)
Rake::Task["#{deploy_default}"].execute
end
desc "Generate website and deploy"
task :gen_deploy => [:integrate, :generate, :deploy] do
end
desc "copy dot files for deployment"
task :copydot, :source, :dest do |t, args|
FileList["#{args.source}/**/.*"].exclude("**/.", "**/..", "**/.DS_Store", "**/._*").each do |file|
cp_r file, file.gsub(/#{args.source}/, "#{args.dest}") unless File.directory?(file)
end
end
desc "Deploy website via rsync"
task :rsync do
exclude = ""
if File.exists?('./rsync-exclude')
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
end
puts "## Deploying website via Rsync"
ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{rsync_args} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
end
desc "deploy public directory to github pages"
multitask :push do
puts "## Deploying branch to Github Pages "
puts "## Pulling any updates from Github Pages "
cd "#{deploy_dir}" do
system "git checkout #{deploy_branch}"
end
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
Rake::Task[:copydot].invoke(public_dir, deploy_dir)
puts "\n## Copying #{public_dir} to #{deploy_dir}"
cp_r "#{public_dir}/.", deploy_dir
cd "#{deploy_dir}" do
if ENV["TRAVIS"] == 'true'
system 'git config user.name "Travis CI"'
system 'git config user.email "balloob+bot@gmail.com"'
end
system "git add -A"
message = "Site updated at #{Time.now.utc}"
puts "\n## Committing: #{message}"
system "git commit -m \"#{message}\""
puts "\n## Pushing generated #{deploy_dir} website"
if ENV["GH_TOKEN"].nil?
Bundler.with_clean_env { system "git push origin #{deploy_branch}" }
else
puts "## Using GH_TOKEN"
new_origin = `git remote -v | grep origin | grep push | awk '{print $2}'`.chomp.sub('//', "//#{ENV['GH_TOKEN']}@")
system "git remote add origin-auth #{new_origin} > /dev/null 2>&1"
system "git push --quiet origin-auth #{deploy_branch} > /dev/null 2>&1"
end
puts "\n## Github Pages deploy complete"
end
end
desc "Update configurations to support publishing to root or sub directory"
task :set_root_dir, :dir do |t, args|
puts ">>> !! Please provide a directory, eg. rake config_dir[publishing/subdirectory]" unless args.dir
if args.dir
if args.dir == "/"
dir = ""
else
dir = "/" + args.dir.sub(/(\/*)(.+)/, "\\2").sub(/\/$/, '');
end
rakefile = IO.read(__FILE__)
rakefile.sub!(/public_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "public_dir\\1=\\2\\3public#{dir}\\3")
File.open(__FILE__, 'w') do |f|
f.write rakefile
end
compass_config = IO.read('config.rb')
compass_config.sub!(/http_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_path\\1=\\2\\3#{dir}/\\3")
compass_config.sub!(/http_images_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_images_path\\1=\\2\\3#{dir}/images\\3")
compass_config.sub!(/http_fonts_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_fonts_path\\1=\\2\\3#{dir}/fonts\\3")
compass_config.sub!(/css_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "css_dir\\1=\\2\\3public#{dir}/stylesheets\\3")
File.open('config.rb', 'w') do |f|
f.write compass_config
end
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^destination:.+$/, "destination: public#{dir}")
jekyll_config.sub!(/^subscribe_rss:\s*\/.+$/, "subscribe_rss: #{dir}/atom.xml")
jekyll_config.sub!(/^root:.*$/, "root: /#{dir.sub(/^\//, '')}")
File.open('_config.yml', 'w') do |f|
f.write jekyll_config
end
rm_rf public_dir
mkdir_p "#{public_dir}#{dir}"
puts "## Site's root directory is now '/#{dir.sub(/^\//, '')}' ##"
end
end
desc "Set up _deploy folder and deploy branch for Github Pages deployment"
task :setup_github_pages, :repo do |t, args|
if args.repo
repo_url = args.repo
else
puts "Enter the read/write url for your repository"
puts "(For example, 'git@github.com:your_username/your_username.github.io.git)"
puts " or 'https://github.com/your_username/your_username.github.io')"
repo_url = get_stdin("Repository url: ")
end
protocol = (repo_url.match(/(^git)@/).nil?) ? 'https' : 'git'
if protocol == 'git'
user = repo_url.match(/:([^\/]+)/)[1]
else
user = repo_url.match(/github\.com\/([^\/]+)/)[1]
end
branch = (repo_url.match(/\/[\w-]+\.github\.(?:io|com)/).nil?) ? 'gh-pages' : 'master'
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
unless (`git remote -v` =~ /origin.+?octopress(?:\.git)?/).nil?
# If octopress is still the origin remote (from cloning) rename it to octopress
system "git remote rename origin octopress"
if branch == 'master'
# If this is a user/organization pages repository, add the correct origin remote
# and checkout the source branch for committing changes to the blog source.
system "git remote add origin #{repo_url}"
puts "Added remote #{repo_url} as origin"
system "git config branch.master.remote origin"
puts "Set origin as default remote"
system "git branch -m master source"
puts "Master branch renamed to 'source' for committing your blog source files"
else
unless !public_dir.match("#{project}").nil?
system "rake set_root_dir[#{project}]"
end
end
end
url = blog_url(user, project)
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^url:.*$/, "url: #{url}")
File.open('_config.yml', 'w') do |f|
f.write jekyll_config
end
rm_rf deploy_dir
mkdir deploy_dir
cd "#{deploy_dir}" do
system "git init"
system 'echo "My Octopress Page is coming soon …" > index.html'
system "git add ."
system "git commit -m \"Octopress init\""
system "git branch -m gh-pages" unless branch == 'master'
system "git remote add origin #{repo_url}"
rakefile = IO.read(__FILE__)
rakefile.sub!(/deploy_branch(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_branch\\1=\\2\\3#{branch}\\3")
rakefile.sub!(/deploy_default(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_default\\1=\\2\\3push\\3")
File.open(__FILE__, 'w') do |f|
f.write rakefile
end
end
puts "\n---\n## Now you can deploy to #{repo_url} with `rake deploy` ##"
end
def ok_failed(condition)
if (condition)
puts "OK"
else
puts "FAILED"
end
end
def get_stdin(message)
print message
STDIN.gets.chomp

View File

@ -101,8 +101,8 @@ social:
# Home Assistant release details
current_major_version: 0
current_minor_version: 103
current_patch_version: 0
date_released: 2019-12-11
current_patch_version: 6
date_released: 2020-01-06
# Either # or the anchor link to latest release notes in the blog post.
# Must be prefixed with a # and have double quotes around it.

View File

@ -1,6 +1,6 @@
---
title: "CEC Scanner"
description: "Scan HDMI CEC devices."
description: "Scan HDMI-CEC devices."
---
Help you to discover the HDMI CEC address. Start the add-on and look into the log to see all connected device on HDMI.
Help you to discover the HDMI-CEC address. Start the add-on and look into the log to see all connected device on HDMI.

View File

@ -1,5 +1,5 @@
---
title: "HASS Configurator"
title: "Configurator"
description: "Browser-based configuration file editor for Home Assistant."
featured: true
og_image: /images/hassio/screenshots/addon-hass-configurator.png
@ -11,7 +11,7 @@ More information and a standalone version for regular Home Assistant installatio
<p class='img'>
<img src='/images/hassio/screenshots/addon-hass-configurator.png'>
Screenshot of the HASS Configurator.
Screenshot of the Configurator.
</p>
### Feature list

View File

@ -4,87 +4,70 @@ description: "Enhance your Hass.io installation with Google Assistant."
featured: true
---
<div class='note warning'>
These instructions are outdated - the add-on has been updated and these are no longer accurate or complete.
</div>
<div class='note'>
If you want to integrate your Google Home or mobile phone running Google Assistant, with Home Assistant, then you want the [Google Assistant component](/integrations/google_assistant/).
If you want to integrate your Google Home or mobile phone running Google Assistant, with Home Assistant, then you want the [Google Assistant component][AssistantIntergration].
</div>
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact via the [DialogFlow][comp] integration with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interacts via the [DialogFlow][comp] integration or the [Google Assistant component][AssistantIntergration] with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
To enable access to the Google Assistant API, do the following:
1. Go to the [Google Actions Console][GActionsConsole] and create a new project.
1. After you created the project on the bottom of the page click "Device registration". Keep this tab open for later use.
1. Enable the Google Assistant API on the new project through [this][enableAPI] link. Make sure you have the right project selected (shown in the middle of the screen in the top bar). If you can't select the right project, it may help to open the link in an incognito window.
1. Configure the [OAuth consent screen][OAuthConcent]. Also again check that you have the right project and don't forget to hit "Save" at the bottom of the page. You only have to fill in a project name and your e-mail.
1. You back to you device registration tab and click "Device registration". Or open you project in the [Google Actions Console][GActionsConsole] start the Quick setup, and in the left bar click "Device registration".
1. Give you project a name, think of a nice manufacturer and for device type select "speaker".
1. Edit you "model id", if you want to and copy it for later use.
1. Download the credentials.
1. Click "Next" and click "Skip".
1. Upload your credentials as "google_assistant.json" to the "hassio/share" folder, for example by using the [Samba] add-on.
1. In the Add-on configuration field fill-in you "project id" and your "model-id" and hit "Save". Your project id can be found in the Google Actions console by clicking on the top right menu button and selecting "Project settings". This id may differ from the project name that you choose!
1. Below the "Config" window select the microphone and speaker that you want to use. On a Raspberry Pi 3, ALSA device 0 is the built-in headset port and ALSA device 1 is the HDMI port. Also don't forget to click "Save".
1. Start the add-on. Check the log and click refresh till it says: "ENGINE Bus STARTED".
1. Now click "Open Web UI" and follow the authentication process. You will get an empty response after you have send your token.
1. In the [Cloud Platform Console][project], go to the Projects page. Select an existing project or create a new project
1. Open the project. In the top of the page search for Google Assistant API or use [this link][API] and enable it.
1. Create an [OAuth Client ID][oauthclient], pick type "Other", click "Create" and download the JSON file by clicking the Download JSON button on the right side.
Now install and activate the [Samba] add-on so you can upload your credential file. Connect to the "share" Samba share and copy your credentials over. Name the file `google_assistant.json`.
Now it's time to start Google Assistant for the first time. When the Google Assistant add-on starts, it will output your audio devices in the "Logs" card. You might have to hit "refresh" to get the latest logs:
```text
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Microphone [Yeti Stereo Microphone], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
```
You need to use this information to point the add-on at the right speakers and microphone. The information describes different cards and devices. On a Raspberry Pi 3, card 0 - device 0 is the built-in headset port, card 0 - device 1 is the HDMI port. In the example above, the USB microphone showed up as card 1 - device 0.
Find the microphone and speakers that you want to use and note down their device and card number. We will need that to configure the add-on options `mic` (microphone to use) and `speaker` (speaker to use). The format for these options is `<card #>,<device #>`. Change the configuration options and click save.
The next step is to authenticate your Google account with Google Assistant. Start the add-on and click on the "OPEN WEB UI" button to start authentication.
That's it. You should no be able to use the Google Voice assistant.
### Add-on configuration
Configuration example that uses the USB microphone and the built-in headset audio output on the Raspberry Pi. Note that card and device numbers can differ on your device.
```json
{
"mic": "1,0",
"speaker": "0,0",
"client_secrets": "google_assistant.json"
"client_secrets": "google_assistant.json",
"project_id": "you-project-id",
"model_id": "your-model-id"
}
```
{% configuration %}
mic:
description: This is the hardware address of your microphone. Look at the add-on output.
client_secrets:
description: The file downloaded from the [Google Actions Console](https://console.actions.google.com/), you can redownload them under the "Develop - Device registration" tab. By default the add-on look in the "hassio/share" folder.
required: true
type: float
speaker:
description: This is the hardware address of your speakers. Look at the add-on output.
type: string
project_id:
description: The project id can be found in your "google_assistant.json" file or under project settings in the [Google Actions Console](https://console.actions.google.com/).
required: true
type: string
model_id:
description: The model id can also be found under the "Develop - Device registration tab" in the [Google Actions Console](https://console.actions.google.com/).
required: true
type: string
{% endconfiguration %}
### Home Assistant configuration
Use the Home Assistant [DialogFlow component][comp] to integrate the add-on into Home Assistant.
Use the Home Assistant [DialogFlow component][comp] to integrate the add-on into Home Assistant or combine it with the [Google Assistant component][AssistantIntergration].
[AssistantIntergration]: /integrations/google_assistant/
[GoogleAssistant]: https://assistant.google.com/
[GoogleActions]: https://actions.google.com/
[GActionsConsole]: https://console.actions.google.com/
[enableAPI]: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
[OAuthConcent]: https://console.developers.google.com/apis/credentials/consent
[Samba]: /addons/samba/
[comp]: /integrations/dialogflow/
[project]: https://console.cloud.google.com/project
[API]: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
[oauthclient]: https://console.developers.google.com/apis/credentials/oauthclient
[cloudConsole]: https://console.cloud.google.com/cloud-resource-manager

View File

@ -1,9 +1,9 @@
---
title: "HomeMatic"
description: "HomeMatic hardware support to turn you Home-Assistant into a CCU."
description: "HomeMatic hardware support to turn Home Assistant into a CCU."
---
You can't import an existing configuration, you'll need re-learn it into Home Assistant. There is an experimental WebUI alias Regahss support since 9.0 - before it was required to use a 3party tool.
You can't import an existing configuration, you'll need re-learn it into Home Assistant. There is an experimental WebUI alias Regahss support since 9.0. Before it was required to use a third-party tool.
Follow devices will be supported and tested:
@ -71,11 +71,11 @@ wired:
required: true
type: string
key:
description: Encrypted key.
description: The encrypted key.
required: true
type: string
ip:
description: IP address of LAN gateway.
description: The IP address of LAN gateway.
required: true
type: string
hmip_enable:
@ -126,4 +126,8 @@ dtoverlay=pi3-miniuart-bt
## HmIP-RFUSB
HassOS > 1.11 support HmIP-RFUSB default and don't need any configuration. If you run a Linux, you need to follow the installation guide from documentation to set up the UART USB interface on your computer.
HassOS > 1.11 support HmIP-RFUSB by default and don't need any configuration. If you run a Linux installation, you need to follow the installation guide from the documentation to set up the UART USB interface on your computer.
## Web UI
To enable the experimental WebUI for built-in CCU specify a port number for "Regahss Webinterface" on the addon configuration page under the network section. After saving the changes, click on the "Open Web UI" button and proceed with the [Homematic WebUI](https://www.eq-3.de/downloads/download/handbuecher/WebUI_Handbuch_eQ-3.pdf) configuration.

View File

@ -77,7 +77,7 @@ There is an active [discord](https://discordapp.com/invite/3939Kqx) channel and
### Examples
So now you can turn lights on and off, let's check the weather. Log on to the [console](https://console.snips.ai/). If this is your first time, create a new assistant and add the Home Assistant skill, along with the Weather skill by snips. Download your assistant manually and copy it to the `/share` folder on your HassIO installation using the Samba add-on.
So now you can turn lights on and off, let's check the weather. Log on to the [console](https://console.snips.ai/). If this is your first time, create a new assistant and add the Home Assistant skill, along with the Weather skill by snips. Download your assistant manually and copy it to the `/share` folder on your Hass.io installation using the Samba add-on.
Next create a weather sensor, e.g., one for [Dark Sky](/integrations/darksky/), and put the `api_key` in your `secrets.yaml` file. For this example to work you will need to have a valid API key from [Dark Sky](https://darksky.net/dev).
@ -120,6 +120,6 @@ searchWeatherForecast:
{% endraw %}
Now just restart HassIO and ask it what the weather is like.
Now just restart Hass.io and ask it what the weather is like.
[their tutorial]: https://github.com/snipsco/snips-platform-documentation/wiki/2.-Create-an-assistant-using-an-existing-bundle

View File

@ -17,7 +17,7 @@ automation:
to: 'rain'
condition:
- condition: state
entity_id: group.all_devices
entity_id: all
state: 'home'
- condition: time
after: '14:00'

View File

@ -14,7 +14,7 @@ automation:
offset: "-00:45:00"
condition:
condition: state
entity_id: group.all_devices
entity_id: all
state: home
action:
service: light.turn_on

View File

@ -21,7 +21,7 @@ automation:
# if we leave the house during the day.
trigger:
- platform: state
entity_id: group.all_devices
entity_id: all
to: 'not_home'
condition:
- platform: state
@ -36,7 +36,7 @@ automation:
# when we get home unless it's nighttime.
trigger:
- platform: state
entity_id: group.all_devices
entity_id: all
to: 'home'
condition:
- condition: state
@ -59,9 +59,9 @@ For ManyThing support, you need to set up an `on` and `off` event.
You can use the developer tools to test your [Maker Service](https://ifttt.com/maker_webhooks) trigger. To do this, open the Home Assistant UI, open the sidebar, click on the first icon in the developer tools. This should get you to the 'Call Service' screen. Fill in the following values:
Field | Value
----- | -----
domain | `ifttt`
service | `trigger`
Service Data | `{"event": "manything_on"}`
| Field | Value |
| ------------ | --------------------------- |
| domain | `ifttt` |
| service | `trigger` |
| Service Data | `{"event": "manything_on"}` |

View File

@ -41,12 +41,20 @@ import voluptuous as vol
import homeassistant.components as core
import homeassistant.helpers.config_validation as cv
from homeassistant.components import device_tracker, light
from homeassistant.const import (ATTR_ENTITY_ID, SERVICE_TURN_OFF,
SERVICE_TURN_ON, STATE_HOME, STATE_NOT_HOME,
STATE_OFF, STATE_ON)
from homeassistant.const import (
ATTR_ENTITY_ID,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
STATE_HOME,
STATE_NOT_HOME,
STATE_OFF,
STATE_ON,
)
from homeassistant.core import split_entity_id
from homeassistant.helpers.event import (async_track_state_change,
async_track_time_change)
from homeassistant.helpers.event import (
async_track_state_change,
async_track_time_change,
)
# The domain of your component. Should be equal to the name of your component.
DOMAIN = "example"
@ -54,26 +62,26 @@ DOMAIN = "example"
# List of integration names (string) your integration depends upon.
# We depend on group because group will be loaded after all the integrations that
# initialize devices have been setup.
DEPENDENCIES = ['group', 'device_tracker', 'light']
DEPENDENCIES = ["group", "device_tracker", "light"]
# Configuration key for the entity id we are targeting.
CONF_TARGET = 'target'
CONF_TARGET = "target"
# Variable for storing configuration parameters.
TARGET_ID = None
# Name of the service that we expose.
SERVICE_FLASH = 'flash'
SERVICE_FLASH = "flash"
# Shortcut for the logger
_LOGGER = logging.getLogger(__name__)
# Validate that all required config options are given.
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Optional(CONF_TARGET): cv.entity_id
})
}, extra=vol.ALLOW_EXTRA)
CONFIG_SCHEMA = vol.Schema(
{DOMAIN: vol.Schema({vol.Optional(CONF_TARGET): cv.entity_id})},
extra=vol.ALLOW_EXTRA,
)
async def async_setup(hass, config):
"""Setup example component."""
@ -84,8 +92,7 @@ async def async_setup(hass, config):
# Validate that the target entity id exists.
if hass.states.get(TARGET_ID) is None:
_LOGGER.error("Target entity id %s does not exist",
TARGET_ID)
_LOGGER.error("Target entity id %s does not exist", TARGET_ID)
# Tell the bootstrapper that we failed to initialize and clear the
# stored target id so our functions don't run.
@ -120,7 +127,7 @@ async def async_setup(hass, config):
return
if device_tracker.is_on(hass) and not core.is_on(hass, TARGET_ID):
_LOGGER.info('People home at 7AM, turning target on')
_LOGGER.info("People home at 7AM, turning target on")
await hass.services.async_call(domain, SERVICE_TURN_ON, data)
async def async_flash_service(service):
@ -133,7 +140,9 @@ async def async_setup(hass, config):
if core.is_on(hass, TARGET_ID):
# We need this call to run blocking, as we want to wait 10s after it finished
await hass.services.async_call(domain, SERVICE_TURN_OFF, data, blocking=True)
await hass.services.async_call(
domain, SERVICE_TURN_OFF, data, blocking=True
)
time.sleep(10)
await hass.services.async_call(domain, SERVICE_TURN_ON, data)
else:
@ -146,15 +155,26 @@ async def async_setup(hass, config):
# If all lights turn off, turn off.
async_track_state_change(
hass, light.ENTITY_ID_ALL_LIGHTS, async_switch_off, STATE_ON, STATE_OFF)
hass, light.ENTITY_ID_ALL_LIGHTS, async_switch_off, STATE_ON, STATE_OFF
)
# If all people leave the house and the entity is on, turn it off.
async_track_state_change(
hass, device_tracker.ENTITY_ID_ALL_DEVICES, async_switch_off, STATE_HOME, STATE_NOT_HOME)
hass,
device_tracker.ENTITY_ID_ALL_DEVICES,
async_switch_off,
STATE_HOME,
STATE_NOT_HOME,
)
# If anyone comes home and the entity is not on, turn it on.
async_track_state_change(
hass, device_tracker.ENTITY_ID_ALL_DEVICES, async_switch_on, STATE_NOT_HOME, STATE_HOME)
hass,
device_tracker.ENTITY_ID_ALL_DEVICES,
async_switch_on,
STATE_NOT_HOME,
STATE_HOME,
)
# Call wakeup callback at 7 AM
async_track_time_change(hass, async_wake_up, hour=7, minute=00, second=00)

View File

@ -18,21 +18,21 @@ This example follows a topic on MQTT and updates the state of an entity to the l
import homeassistant.loader as loader
# The domain of your component. Should be equal to the name of your component.
DOMAIN = 'hello_mqtt'
DOMAIN = "hello_mqtt"
# List of integration names (string) your integration depends upon.
DEPENDENCIES = ['mqtt']
DEPENDENCIES = ["mqtt"]
CONF_TOPIC = 'topic'
DEFAULT_TOPIC = 'home-assistant/hello_mqtt'
CONF_TOPIC = "topic"
DEFAULT_TOPIC = "home-assistant/hello_mqtt"
def setup(hass, config):
"""Set up the Hello MQTT component."""
mqtt = hass.components.mqtt
topic = config[DOMAIN].get(CONF_TOPIC, DEFAULT_TOPIC)
entity_id = 'hello_mqtt.last_message'
entity_id = "hello_mqtt.last_message"
# Listener to be called when we receive a message.
# The msg parameter is a Message object with the following members:
@ -45,15 +45,15 @@ def setup(hass, config):
mqtt.subscribe(topic, message_received)
# Set the initial state.
hass.states.set(entity_id, 'No messages')
hass.states.set(entity_id, "No messages")
# Service to publish a message on MQTT.
def set_state_service(call):
"""Service to send a message."""
mqtt.publish(topic, call.data.get('new_state'))
mqtt.publish(topic, call.data.get("new_state"))
# Register our service with Home Assistant.
hass.services.register(DOMAIN, 'set_state', set_state_service)
hass.services.register(DOMAIN, "set_state", set_state_service)
# Return boolean to indicate that initialization was successfully.
return True

View File

@ -43,19 +43,19 @@ _LOGGER = logging.getLogger(__name__)
DOMAIN = 'simple_alarm"'
DEPENDENCIES = ['group', 'device_tracker', 'light']
DEPENDENCIES = ["group", "device_tracker", "light"]
# Attribute to tell which light has to flash when a known person comes home
# If omitted will flash all.
CONF_KNOWN_LIGHT = 'known_light'
CONF_KNOWN_LIGHT = "known_light"
# Attribute to tell which light has to flash when an unknown person comes home
# If omitted will flash all.
CONF_UNKNOWN_LIGHT = 'unknown_light'
CONF_UNKNOWN_LIGHT = "unknown_light"
# Services to test the alarms
SERVICE_TEST_KNOWN_ALARM = 'test_known'
SERVICE_TEST_UNKNOWN_ALARM = 'test_unknown'
SERVICE_TEST_KNOWN_ALARM = "test_known"
SERVICE_TEST_UNKNOWN_ALARM = "test_unknown"
def setup(hass, config):
@ -66,8 +66,7 @@ def setup(hass, config):
light_id = config[DOMAIN].get(conf_key, light.ENTITY_ID_ALL_LIGHTS)
if hass.states.get(light_id) is None:
_LOGGER.error(
"Light id %s could not be found in state machine", light_id)
_LOGGER.error("Light id %s could not be found in state machine", light_id)
return False
@ -88,18 +87,19 @@ def setup(hass, config):
def unknown_alarm():
""" Fire an alarm if the light turns on while no one is home. """
light.turn_on(
hass, unknown_light_id,
flash=light.FLASH_LONG, rgb_color=[255, 0, 0])
hass, unknown_light_id, flash=light.FLASH_LONG, rgb_color=[255, 0, 0]
)
# Send a message to the user
notify.send_message(
hass, "The lights just got turned on while no one was home.")
hass, "The lights just got turned on while no one was home."
)
# Setup services to test the effect
hass.services.register(DOMAIN, SERVICE_TEST_KNOWN_ALARM, lambda call: known_alarm())
hass.services.register(
DOMAIN, SERVICE_TEST_KNOWN_ALARM, lambda call: known_alarm())
hass.services.register(
DOMAIN, SERVICE_TEST_UNKNOWN_ALARM, lambda call: unknown_alarm())
DOMAIN, SERVICE_TEST_UNKNOWN_ALARM, lambda call: unknown_alarm()
)
def unknown_alarm_if_lights_on(entity_id, old_state, new_state):
"""Called when a light has been turned on."""
@ -107,8 +107,12 @@ def setup(hass, config):
unknown_alarm()
track_state_change(
hass, light.ENTITY_ID_ALL_LIGHTS,
unknown_alarm_if_lights_on, STATE_OFF, STATE_ON)
hass,
light.ENTITY_ID_ALL_LIGHTS,
unknown_alarm_if_lights_on,
STATE_OFF,
STATE_ON,
)
def ring_known_alarm(entity_id, old_state, new_state):
"""Called when a known person comes home."""
@ -117,8 +121,12 @@ def setup(hass, config):
# Track home coming of each device
track_state_change(
hass, hass.states.entity_ids(device_tracker.DOMAIN),
ring_known_alarm, STATE_NOT_HOME, STATE_HOME)
hass,
hass.states.entity_ids(device_tracker.DOMAIN),
ring_known_alarm,
STATE_NOT_HOME,
STATE_HOME,
)
return True
```

View File

@ -1,5 +1,7 @@
- topic: Action
description: "[Actions](/docs/automation/action/) are events that fires once all triggers and conditions have been met."
description: "An [Action](/docs/automation/action/) is an event that can be fired as a response to a trigger, once all conditions have been met."
- topic: Add-on
description: "Hass.io add-ons provide additional, standalone, applications that can run beside Home Assistant on a Hass.io installation. Most of these, add-on provided, applications can be integrated into Home Assistant using integrations. Examples of add-ons are: an MQTT broker, database service or a file server."
- topic: Automation
description: "[Automations](/docs/automation/) offer the capability to call a service based on a simple or complex trigger. Automation allows a condition such as a sunset to cause an event, such as a light turning on."
- topic: Binary sensor
@ -7,7 +9,7 @@
- topic: Component
description: "Integrations (see below) used to be known as components."
- topic: Condition
description: "[Conditions](/docs/scripts/conditions/) are an optional part of an automation that will prevent an action from firing if they are not met."
description: "[Conditions](/docs/scripts/conditions/) are an optional part of an automation that will prevent an action from firing if they are not met."
- topic: Cookbook
description: "The [Cookbook](/cookbook/) contains a set of configuration examples of Home Assistant from the community."
- topic: Cover
@ -31,7 +33,11 @@
- topic: hass
description: "HASS or [hass](/docs/tools/hass/) is often used as an abbreviation for Home Assistant. It is also the command-line tool."
- topic: Hass.io
description: "[Hass.io](/hassio/) is an operating system that will take care of installing and updating Home Assistant, is managed from the Home Assistant UI, allows creating/restoring snapshots of your configuration, and can easily be extended."
description: "[Hass.io](/hassio/) is a full UI managed home automation ecosystem that runs Home Assistant, the Hass.io Supervisor and add-ons. It comes pre-installed on HassOS, but can be installed on any Linux system. It leverages Docker, which is managed by the Hass.io Supervisor."
- topic: Hass.io Supervisor
description: "The Hass.io Supervisor is a program that manages a Hass.io installation, taking care of installing and updating Home Assistant, add-ons, itself and, if used, updating the HassOS operating system."
- topic: HassOS
description: "HassOS, the Home Assistant Operating System, is an embedded, minimalistic, operating system designed to run the Hass.io ecosystem on single board computers (like the Raspberry Pi) or Virtual Machines. The Hass.io Supervisor can keep it up to date, removing the need for you to manage an operating system."
- topic: Integration
description: "[Integrations](/integrations/) provide the core logic for the functionality in Home Assistant. Like `notify` provides sending notifications."
- topic: Lovelace
@ -45,7 +51,7 @@
- topic: Platform
description: "[Platforms](/docs/configuration/platform_options/) make the connection to a specific software or hardware platform. For example, the `pushbullet` platform works with the service pushbullet.com to send notifications."
- topic: Scene
description: "[Scenes](/integrations/scene/) capture the states you want certain entities to be. For example, a scene can specify that light A should be turned on and light B should be bright red."
description: "[Scenes](/integrations/scene/) capture the states you want certain entities to be. For example, a scene can specify that light A should be turned on and light B should be bright red."
- topic: Script
description: "[Scripts](/docs/scripts/) are components that allow users to specify a sequence of actions to be executed by Home Assistant when turned on."
- topic: Sensor

View File

@ -81,7 +81,7 @@ While you should hopefully be storing your passwords in a password manager, if y
* `auth`
* `auth_provider.homeassistant`
* `onboarding`
* `hassio` (for hassio users)
* `hassio` (for Hass.io users)
* `cloud` (for nabucasa users)
When you start Home Assistant next, you'll be required to set up authentication again.

View File

@ -20,13 +20,13 @@ automation:
event: sunset
offset: '-01:00:00'
- platform: state
entity_id: group.all_devices
entity_id: all
to: 'home'
condition:
# Prefix the first line of each condition configuration
# with a '-'' to enter multiple
- condition: state
entity_id: group.all_devices
entity_id: all
state: 'home'
- condition: time
after: '16:00:00'
@ -40,7 +40,7 @@ automation:
- alias: 'Rule 2 - Away Mode'
trigger:
platform: state
entity_id: group.all_devices
entity_id: all
to: 'not_home'
action:
service: light.turn_off

View File

@ -216,7 +216,7 @@ automation:
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: "{{ state.attributes.elevation }}"
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
# Can be a positive or negative number
below: -4.0
action:

View File

@ -66,4 +66,4 @@ whitelist_external_dirs:
### Reload Core Service
Home Assistant offers a service to reload the core configuration while Home Assistant is running called `homeassistant.reload_core_config`. This allows you to change any of the above sections and see it being applied without having to restart Home Assistant. To call this service, go to the "Service" tab under Developer Tools, select the `homeassistant.reload_core_config` service and click the "CALL SERVICE" button. Alternatively, you can press the "Reload Core" button under Configuration > Server Control.
Home Assistant offers a service to reload the core configuration while Home Assistant is running called `homeassistant.reload_core_config`. This allows you to change any of the above sections and see it being applied without having to restart Home Assistant. To call this service, go to the "Service" tab under Developer Tools, select the `homeassistant.reload_core_config` service and click the "CALL SERVICE" button. Alternatively, you can press the "Reload Location & Customizations" button under Configuration > Server Control.

View File

@ -89,6 +89,7 @@ Device class is currently supported by the following components:
* [Binary Sensor](/integrations/binary_sensor/)
* [Sensor](/integrations/sensor/)
* [Cover](/integrations/cover/)
* [Media Player](integrations/media_player/)
### Manual customization
@ -137,7 +138,7 @@ homeassistant:
### Reloading customize
Home Assistant offers a service to reload the core configuration while Home Assistant is running called `homeassistant.reload_core_config`. This allows you to change your customize section and see it being applied without having to restart Home Assistant. To call this service, go to the "Service" tab under Developer Tools, select the `homeassistant.reload_core_config` service and click the "CALL SERVICE" button. Alternatively, you can press the "Reload Core" button under Configuration > Server Control.
Home Assistant offers a service to reload the core configuration while Home Assistant is running called `homeassistant.reload_core_config`. This allows you to change your customize section and see it being applied without having to restart Home Assistant. To call this service, go to the "Service" tab under Developer Tools, select the `homeassistant.reload_core_config` service and click the "CALL SERVICE" button. Alternatively, you can press the "Reload Location & Customizations" button under Configuration > Server Control.
<div class='note warning'>
New customize information will be applied the next time the state of the entity gets updated.

View File

@ -6,7 +6,7 @@ redirect_from: /getting-started/devices/
Home Assistant will be able to automatically discover many devices and services available on your network if you have [the discovery component](/integrations/discovery/) enabled (the default setting).
See the [components overview page](/integrations/) to find installation instructions for your devices and services. If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/).
See the [integrations overview page](/integrations/) to find installation instructions for your devices and services. If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/).
Classification for the available integrations:

View File

@ -59,33 +59,39 @@ One of the most common uses cases are to show groups during certain times of day
from datetime import time, datetime
def mk_occasion(name, start, end, days=None):
s = start.split(':')
e = end.split(':')
return {'name' : name,
'start': time(int(s[0]), int(s[1]), int(s[2])),
'end' : time(int(e[0]), int(e[1]), int(e[2])),
'days' : days}
s = start.split(":")
e = end.split(":")
return {
"name": name,
"start": time(int(s[0]), int(s[1]), int(s[2])),
"end": time(int(e[0]), int(e[1]), int(e[2])),
"days": days,
}
# Matching is done from top to bottom
OCCASIONS = [
# More specific occasions
mk_occasion('work_morning', '06:00:00', '07:10:00', range(5)),
mk_occasion("work_morning", "06:00:00", "07:10:00", range(5)),
# General matching
mk_occasion('weekday', '00:00:00', '23:59:59', range(5)),
mk_occasion('weekend', '00:00:00', '23:59:59', [5, 6])
mk_occasion("weekday", "00:00:00", "23:59:59", range(5)),
mk_occasion("weekend", "00:00:00", "23:59:59", [5, 6]),
]
def get_current_occasion(occasion_list, default_occasion='normal'):
def get_current_occasion(occasion_list, default_occasion="normal"):
now = datetime.now()
for occasion in OCCASIONS:
if occasion['start'] <= now.time() <= occasion['end'] and \
(occasion['days'] is None or now.weekday() in occasion['days']):
return occasion['name']
if occasion["start"] <= now.time() <= occasion["end"] and (
occasion["days"] is None or now.weekday() in occasion["days"]
):
return occasion["name"]
return default_occasion
if __name__ == '__main__':
if __name__ == "__main__":
print(get_current_occasion(OCCASIONS))
```

View File

@ -292,7 +292,7 @@ Closest to some entity:
{{ closest(states.zone.school, ['group.children', states.device_tracker]) }}
```
It will also work as a filter over a iterable group of entities or groups:
It will also work as a filter over an iterable group of entities or groups:
```text
Closest out of given entities:

View File

@ -4,15 +4,15 @@ description: "Common problems with tweaking your configuration and their solutio
redirect_from: /getting-started/troubleshooting-configuration/
---
It can happen that you run into trouble while configuring Home Assistant. Perhaps a integration is not showing up or is acting strangely. This page will discuss a few of the most common problems.
It can happen that you run into trouble while configuring Home Assistant. Perhaps an integration is not showing up or is acting strangely. This page will discuss a few of the most common problems.
Before we dive into common issues, make sure you know where your configuration directory is. Home Assistant will print out the configuration directory it is using when starting up.
Whenever a integration or configuration option results in a warning, it will be stored in `home-assistant.log` in the configuration directory. This file is reset on start of Home Assistant.
Whenever an integration or configuration option results in a warning, it will be stored in `home-assistant.log` in the configuration directory. This file is reset on start of Home Assistant.
### My integration does not show up
When a integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
If you have incorrect entries in your configuration files you can use the [`check_config`](/docs/tools/check_config/) script to assist in identifying them: `hass --script check_config`. If you need to provide the path for your configuration you can do this using the `-c` argument like this: `hass --script check_config -c /path/to/your/config/dir`.

77
source/_docs/ecosystem/appdaemon.markdown Executable file → Normal file
View File

@ -31,18 +31,17 @@ Let's start with a simple App to turn a light on every night at sunset and off e
```python
import appdaemon.plugins.hass.hassapi as hass
class OutsideLights(hass.Hass):
def initialize(self):
self.run_at_sunrise(self.sunrise_cb)
self.run_at_sunset(self.sunset_cb)
def initialize(self):
self.run_at_sunrise(self.sunrise_cb)
self.run_at_sunset(self.sunset_cb)
def sunrise_cb(self, kwargs):
self.turn_on(self.args["off_scene"])
def sunset_cb(self, kwargs):
self.turn_on(self.args["on_scene"])
def sunrise_cb(self, kwargs):
self.turn_on(self.args["off_scene"])
def sunset_cb(self, kwargs):
self.turn_on(self.args["on_scene"])
```
This is also fairly easy to achieve with Home Assistant automations, but we are just getting started.
@ -54,18 +53,18 @@ Our next example is to turn on a light when motion is detected and it is dark, a
```python
import appdaemon.plugins.hass.hassapi as hass
class FlashyMotionLights(hass.Hass):
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new="on")
def motion(self, entity, attribute, old, new, kwargs):
if self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
def light_off(self, kwargs):
self.turn_off("light.drive")
class FlashyMotionLights(hass.Hass):
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new="on")
def motion(self, entity, attribute, old, new, kwargs):
if self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
def light_off(self, kwargs):
self.turn_off("light.drive")
```
This is starting to get a little more complex in Home Assistant automations, requiring an automation rule and two separate scripts.
@ -75,26 +74,26 @@ Now let's extend this with a somewhat artificial example to show something that
```python
import appdaemon.plugins.hass.hassapi as hass
class MotionLights(hass.Hass):
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new="on")
def motion(self, entity, attribute, old, new, kwargs):
if self.self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
self.flashcount = 0
self.run_in(self.flash_warning, 1)
def light_off(self, kwargs):
self.turn_off("light.drive")
def flash_warning(self, kwargs):
self.toggle("light.living_room")
self.flashcount += 1
if self.flashcount < 10:
self.run_in(self.flash_warning, 1)
class MotionLights(hass.Hass):
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new="on")
def motion(self, entity, attribute, old, new, kwargs):
if self.self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
self.flashcount = 0
self.run_in(self.flash_warning, 1)
def light_off(self, kwargs):
self.turn_off("light.drive")
def flash_warning(self, kwargs):
self.toggle("light.living_room")
self.flashcount += 1
if self.flashcount < 10:
self.run_in(self.flash_warning, 1)
```
Of course, if I wanted to make this App or its predecessor reusable, I would have provide parameters for the sensor, the light to activate on motion, the warning light, and even the number of flashes and delay between flashes.

177
source/_docs/ecosystem/appdaemon/api.markdown Executable file → Normal file
View File

@ -13,13 +13,16 @@ The first step is to create a unique file within the apps directory (as defined
```python
import homeassistant.appapi as appapi
class MotionLights(appapi.AppDaemon):
"""Motion lights implementation."""
```
When configured as an app in the config file (more on that later) the lifecycle of the App begins. It will be instantiated as an object by AppDaemon, and immediately, it will have a call made to its `initialize()` function - this function must appear as part of every app:
```python
def initialize(self):
"""Perform initialization."""
```
The initialize function allows the app to register any callbacks it might need for responding to state changes, and also any setup activities. When the `initialize()` function returns, the App will be dormant until any of its callbacks are activated.
@ -50,17 +53,17 @@ import datetime
# Declare Class
class NightLight(appapi.AppDaemon):
#initialize() function which will be called at startup and reload
def initialize(self):
# Create a time object for 7pm
time = datetime.time(19, 00, 0)
# Schedule a daily callback that will call run_daily() at 7pm every night
self.run_daily(self.run_daily_callback, time)
# initialize() function which will be called at startup and reload
def initialize(self):
# Create a time object for 7pm
time = datetime.time(19, 00, 0)
# Schedule a daily callback that will call run_daily() at 7pm every night
self.run_daily(self.run_daily_callback, time)
# Our callback function will be called by the scheduler every day at 7pm
def run_daily_callback(self, kwargs):
# Call to Home Assistant to turn the porch light on
self.turn_on("light.porch")
# Our callback function will be called by the scheduler every day at 7pm
def run_daily_callback(self, kwargs):
# Call to Home Assistant to turn the porch light on
self.turn_on("light.porch")
```
To summarize - an App's lifecycle consists of being initialized, which allows it to set one or more state and/or schedule callbacks. When those callbacks are activated, the App will typically use one of the Service Calling calls to effect some change to the devices of the system and then wait for the next relevant state change. That's all there is to it!
@ -273,7 +276,7 @@ In most cases, the attribute `state` has the most important value in it, e.g., f
#### Synopsis
```python
get_state(entity = None, attribute = None)
get_state(entity=None, attribute=None)
```
`get_state()` is used to query the state of any integration within Home Assistant. State updates are continuously tracked so this call runs locally and does not require AppDaemon to call back to Home Assistant and as such is very efficient.
@ -311,10 +314,10 @@ state = self.get_state("switch")
state = self.get_state("light.office_1")
# Return the brightness attribute for light.office_1
state = self.get_state("light.office_1", attribute = "brightness")
state = self.get_state("light.office_1", attribute="brightness")
# Return the entire state for light.office_1
state = self.get_state("light.office_1", attribute = "all")
state = self.get_state("light.office_1", attribute="all")
```
### set_state()
@ -348,7 +351,7 @@ A list of keyword values to be changed or added to the entities state. e.g., `st
#### Examples
```python
status = self.set_state("light.office_1", state = "on", attributes = {"color_name": "red"})
status = self.set_state("light.office_1", state="on", attributes={"color_name": "red"})
```
### About Callbacks
@ -409,8 +412,9 @@ AppDaemons's state callbacks allow an App to listen to a wide variety of events,
When calling back into the App, the App must provide a class function with a known signature for AppDaemon to call. The callback will provide various information to the function to enable the function to respond appropriately. For state callbacks, a class defined callback function should look like this:
```python
def my_callback(self, entity, attribute, old, new, **kwargs):
<do some useful work here>
def my_callback(self, entity, attribute, old, new, **kwargs):
"""Handle state callback."""
# do some useful work here
```
You can call the function whatever you like - you will reference it in the `listen_state()` call, and you can create as many callback functions as you need.
@ -450,7 +454,7 @@ A dictionary containing any constraints and/or additional user specific keyword
#### Synopsis
```python
handle = listen_state(callback, entity = None, **kwargs)
handle = listen_state(callback, entity=None, **kwargs)
```
#### Returns
@ -492,8 +496,9 @@ Note: `old` and `new` can be used singly or together.
If duration is supplied as a parameter, the callback will not fire unless the state listened for is maintained for that number of seconds. This makes the most sense if a specific attribute is specified (or the default os `state` is used), an in conjunction with the `old` or `new` parameters, or both. When the callback is called, it is supplied with the values of `entity`, `attr`, `old` and `new` that were current at the time the actual event occurred, since the assumption is that none of them have changed in the intervening period.
```python
def my_callback(self, **kwargs):
<do some useful work here>
def my_callback(self, **kwargs):
"""Handle state change."""
# do some useful work here
```
(Scheduler callbacks are documented in detail later in this document)
@ -515,20 +520,25 @@ self.handle = self.listen_state(self.my_callback, "light")
self.handle = self.listen_state(self.my_callback, "light.office_1")
# Listen for a state change involving light.office1 and return the entire state as a dict
self.handle = self.listen_state(self.my_callback, "light.office_1", attribute = "all")
self.handle = self.listen_state(self.my_callback, "light.office_1", attribute="all")
# Listen for a state change involving the brightness attribute of light.office1
self.handle = self.listen_state(self.my_callback, "light.office_1", attribute = "brightness")
self.handle = self.listen_state(
self.my_callback, "light.office_1", attribute="brightness"
)
# Listen for a state change involving light.office1 turning on and return the state attribute
self.handle = self.listen_state(self.my_callback, "light.office_1", new = "on")
self.handle = self.listen_state(self.my_callback, "light.office_1", new="on")
# Listen for a state change involving light.office1 changing from brightness 100 to 200 and return the state attribute
self.handle = self.listen_state(self.my_callback, "light.office_1", old = "100", new = "200")
self.handle = self.listen_state(
self.my_callback, "light.office_1", old="100", new="200"
)
# Listen for a state change involving light.office1 changing to state on and remaining on for a minute
self.handle = self.listen_state(self.my_callback, "light.office_1", new = "on", duration = 60)
self.handle = self.listen_state(
self.my_callback, "light.office_1", new="on", duration=60
)
```
### cancel_listen_state()
@ -592,8 +602,9 @@ AppDaemon contains a powerful scheduler that is able to run with 1 second resolu
As with State Change callbacks, Scheduler Callbacks expect to call into functions with a known and specific signature and a class defined Scheduler callback function should look like this:
```python
def my_callback(self, **kwargs):
<do some useful work here>
def my_callback(self, **kwargs):
"""Handle scheduler callback."""
# do some useful work here
```
You can call the function whatever you like; you will reference it in the Scheduler call, and you can create as many callback functions as you need.
@ -643,7 +654,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
self.handle = self.run_in(self.run_in_c)
self.handle = self.run_in(self.run_in_c, title = "run_in5")
self.handle = self.run_in(self.run_in_c, title="run_in5")
```
#### run_once()
@ -678,6 +689,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Run at 4pm today, or 4pm tomorrow if it is already after 4pm
import datetime
...
runtime = datetime.time(16, 0, 0)
handle = self.run_once(self.run_once_c, runtime)
@ -716,6 +728,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Run at 4pm today
import datetime
...
runtime = datetime.time(16, 0, 0)
today = datetime.date.today()
@ -755,6 +768,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Run daily at 7pm
import datetime
...
time = datetime.time(19, 0, 0)
self.run_daily(self.run_daily_c, runtime)
@ -767,7 +781,7 @@ Execute a callback at the same time every hour. If the time has already passed,
#### Synopsis
```python
self.handle = self.run_hourly(callback, time = None, **kwargs)
self.handle = self.run_hourly(callback, time=None, **kwargs)
```
#### Returns
@ -793,6 +807,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Run every hour, on the hour
import datetime
...
time = datetime.time(0, 0, 0)
self.run_daily(self.run_daily_c, runtime)
@ -804,7 +819,7 @@ Execute a callback at the same time every minute. If the time has already passed
#### Synopsis
```python
self.handle = self.run_minutely(callback, time = None, **kwargs)
self.handle = self.run_minutely(callback, time=None, **kwargs)
```
#### Returns
@ -830,6 +845,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Run Every Minute on the minute
import datetime
...
time = datetime.time(0, 0, 0)
self.run_minutely(self.run_minutely_c, time)
@ -872,6 +888,7 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Run every 17 minutes starting in 2 hours time
import datetime
...
self.run_every(self.run_every_c, time, 17 * 60)
```
@ -944,11 +961,11 @@ For example:
```python
# Run a callback in 2 minutes minus a random number of seconds between 0 and 60, e.g., run between 60 and 120 seconds from now
self.handle = self.run_in(callback, 120, random_start = -60, **kwargs)
self.handle = self.run_in(callback, 120, random_start=-60, **kwargs)
# Run a callback in 2 minutes plus a random number of seconds between 0 and 60, e.g., run between 120 and 180 seconds from now
self.handle = self.run_in(callback, 120, random_end = 60, **kwargs)
self.handle = self.run_in(callback, 120, random_end=60, **kwargs)
# Run a callback in 2 minutes plus or minus a random number of seconds between 0 and 60, e.g., run between 60 and 180 seconds from now
self.handle = self.run_in(callback, 120, random_start = -60, random_end = 60, **kwargs)
self.handle = self.run_in(callback, 120, random_start=-60, random_end=60, **kwargs)
```
## Sunrise and Sunset
@ -987,15 +1004,17 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
import datetime
...
# ...
# Run 45 minutes before sunset
self.run_at_sunrise(self.sun, offset = datetime.timedelta(minutes = -45).total_seconds(), "Sunrise -45 mins")
self.run_at_sunrise(self.sun, offset=datetime.timedelta(minutes=-45).total_seconds())
# or you can just do the math yourself
self.run_at_sunrise(self.sun, offset = 30 * 60, "Sunrise +30 mins")
self.run_at_sunrise(self.sun, offset=30 * 60) # Sunrise +30 mins
# Run at a random time +/- 60 minutes from sunrise
self.run_at_sunrise(self.sun, random_start = -60*60, random_end = 60*60, "Sunrise, random +/- 60 mins")
self.run_at_sunrise(self.sun, random_start=-60 * 60, random_end=60 * 60)
# Run at a random time between 30 and 60 minutes before sunrise
self.run_at_sunrise(self.sun, random_start = -60*60, random_end = 30*60, "Sunrise, random - 30 - 60 mins")
self.run_at_sunrise(self.sun, random_start=-60 * 60, random_end=30 * 60)
```
### run_at_sunset()
@ -1031,14 +1050,18 @@ Arbitrary keyword parameters to be provided to the callback function when it is
```python
# Example using timedelta
import datetime
...
self.run_at_sunset(self.sun, datetime.timedelta(minutes = -45).total_seconds(), "Sunset -45 mins")
# ...
self.run_at_sunset(
self.sun, datetime.timedelta(minutes=-45).total_seconds()
) # Sunset -45 mins
# or you can just do the math yourself
self.run_at_sunset(self.sun, 30 * 60, "Sunset +30 mins")
self.run_at_sunset(self.sun, 30 * 60) # Sunset +30 mins
# Run at a random time +/- 60 minutes from sunset
self.run_at_sunset(self.sun, random_start = -60*60, random_end = 60*60, "Sunset, random +/- 60 mins")
self.run_at_sunset(self.sun, random_start=-60 * 60, random_end=60 * 60)
# Run at a random time between 30 and 60 minutes before sunset
self.run_at_sunset(self.sun, random_start = -60*60, random_end = 30*60, "Sunset, random - 30 - 60 mins")
self.run_at_sunset(self.sun, random_start=-60 * 60, random_end=30 * 60)
```
### sunrise()
@ -1096,7 +1119,7 @@ result = self.sun_up()
```python
if self.sun_up():
do something
do_something()
```
### sun_down()
@ -1117,7 +1140,7 @@ result = self.sun_down()
```python
if self.sun_down():
do something
do_something()
```
## Calling Services
@ -1153,8 +1176,8 @@ Each service has different parameter requirements. This argument allows you to s
#### Examples
```python
self.call_service("light/turn_on", entity_id = "light.office_lamp", color_name = "red")
self.call_service("notify/notify", title = "Hello", message = "Hello World")
self.call_service("light/turn_on", entity_id="light.office_lamp", color_name="red")
self.call_service("notify/notify", title="Hello", message="Hello World")
```
### turn_on()
@ -1192,7 +1215,7 @@ A comma separated list of key value pairs to allow specification of parameters o
```python
self.turn_on("switch.patio_lights")
self.turn_on("scene.bedroom_on")
self.turn_on("light.office_1", color_name = "green")
self.turn_on("light.office_1", color_name="green")
```
### turn_off()
@ -1246,7 +1269,7 @@ Fully qualified entity_id of the thing to be toggled, e.g., `light.office_lamp`
```python
self.toggle("switch.patio_lights")
self.toggle("light.office_1", color_name = "green")
self.toggle("light.office_1", color_name="green")
```
### select_value()
@ -1365,8 +1388,9 @@ In addition to the Home Assistant supplied events, AppDaemon adds 2 more events.
As with State Change and Scheduler callbacks, Event Callbacks expect to call into functions with a known and specific signature and a class defined Scheduler callback function should look like this:
```python
def my_callback(self, event_name, data, kwargs):
<do some useful work here>
def my_callback(self, event_name, data, kwargs):
"""Handle event callback."""
# do some useful work here
```
You can call the function whatever you like - you will reference it in the Scheduler call, and you can create as many callback functions as you need.
@ -1396,7 +1420,7 @@ Listen event sets up a callback for a specific event, or any event.
#### Synopsis
```python
handle = listen_event(function, event = None, **kwargs):
handle = listen_event(function, event=None, **kwargs)
```
#### Returns
@ -1425,9 +1449,11 @@ Filtering will work with any event type, but it will be necessary to figure out
```python
self.listen_event(self.mode_event, "MODE_CHANGE")
# Listen for a minimote event activating scene 3:
self.listen_event(self.generic_event, "zwave.scene_activated", scene_id = 3)
self.listen_event(self.generic_event, "zwave.scene_activated", scene_id=3)
# Listen for a minimote event activating scene 3 from a specific minimote:
self.listen_event(self.generic_event, "zwave.scene_activated", entity_id = "minimote_31", scene_id = 3)
self.listen_event(
self.generic_event, "zwave.scene_activated", entity_id="minimote_31", scene_id=3
)
```
### cancel_listen_event()
@ -1518,6 +1544,7 @@ Functions called as an event callback will be supplied with 2 arguments:
```python
def service(self, event_name, data):
"""Handle event."""
```
#### event_name
@ -1560,7 +1587,7 @@ automation:
This can be triggered with a call to AppDaemon's fire_event() as follows:
```python
self.fire_event("MODE_CHANGE", mode = "Day")
self.fire_event("MODE_CHANGE", mode="Day")
```
## Presence
@ -1585,7 +1612,7 @@ An iterable list of all device trackers.
```python
trackers = self.get_trackers()
for tracker in trackers:
do something
do_something(tracker)
```
### get_tracker_state()
@ -1618,12 +1645,12 @@ Fully qualified entity_id of the device tracker to query, e.g., `device_tracker.
```python
trackers = self.get_trackers()
for tracker in trackers:
self.log("{} is {}".format(tracker, self.get_tracker_state(tracker)))
self.log("{} is {}".format(tracker, self.get_tracker_state(tracker)))
```
### everyone_home()
A convenience function to determine if everyone is home. Use this in preference to getting the state of `group.all_devices()` as it avoids a race condition when using state change callbacks for device trackers.
A convenience function to determine if everyone is home.
#### Synopsis
@ -1638,11 +1665,11 @@ Returns `True` if everyone is at home, `False` otherwise.
```python
if self.everyone_home():
do something
do_something()
```
### anyone_home()
A convenience function to determine if one or more person is home. Use this in preference to getting the state of `group.all_devices()` as it avoids a race condition when using state change callbacks for device trackers.
A convenience function to determine if one or more person is home.
#### Synopsis
@ -1658,11 +1685,11 @@ Returns `True` if anyone is at home, `False` otherwise.
```python
if self.anyone_home():
do something
do_something()
```
### noone_home()
A convenience function to determine if no people are at home. Use this in preference to getting the state of group.all_devices() as it avoids a race condition when using state change callbacks for device trackers.
A convenience function to determine if no people are at home.
#### Synopsis
@ -1678,7 +1705,7 @@ Returns `True` if no one is home, `False` otherwise.
```python
if self.noone_home():
do something
do_something()
```
## Miscellaneous Helper Functions
@ -1837,9 +1864,9 @@ A representation of the start and end time respectively in a string format with
```python
if self.now_is_between("17:30:00", "08:00:00"):
do something
do_something()
if self.now_is_between("sunset - 00:45:00", "sunrise + 00:45:00"):
do something
do_something_else()
```
### friendly_name()
@ -1860,7 +1887,11 @@ The friendly name of the entity if it exists or the entity id if not.
```python
tracker = "device_tracker.andrew"
self.log("{} ({}) is {}".format(tracker, self.friendly_name(tracker), self.get_tracker_state(tracker)))
self.log(
"{} ({}) is {}".format(
tracker, self.friendly_name(tracker), self.get_tracker_state(tracker)
)
)
```
### split_entity()
@ -1888,7 +1919,7 @@ A list with 2 entries, the device and entity respectively.
```python
device, entity = self.split_entity(entity_id)
if device == "scene":
do something specific to scenes
do_something_specific_to_scenes()
```
@ -1935,7 +1966,7 @@ A list of split devices with 1 or more entries.
```python
for sensor in self.split_device_list(self.args["sensors"]):
do something for each sensor, e.g., make a state subscription
do_something(sensor) # e.g. make a state subscription
```
@ -1948,7 +1979,7 @@ AppDaemon uses 2 separate logs - the general log and the error log. An AppDaemon
#### Synopsis
```python
log(message, level = "INFO")
log(message, level="INFO")
```
#### Returns
@ -1969,7 +2000,7 @@ The log level of the message - takes a string representing the standard logger l
```python
self.log("Log Test: Parameter is {}".format(some_variable))
self.log("Log Test: Parameter is {}".format(some_variable), level = "ERROR")
self.log("Log Test: Parameter is {}".format(some_variable), level="ERROR")
```
### error()
@ -1977,7 +2008,7 @@ self.log("Log Test: Parameter is {}".format(some_variable), level = "ERROR")
#### Synopsis
```python
error(message, level = "WARNING")
error(message, level="WARNING")
```
#### Returns
@ -1997,7 +2028,7 @@ The log level of the message - takes a string representing the standard logger l
```python
self.error("Some Warning string")
self.error("Some Critical string", level = "CRITICAL")
self.error("Some Critical string", level="CRITICAL")
```
## Sharing information between Apps
@ -2007,7 +2038,7 @@ Sharing information between different Apps is very simple if required. Each app
In addition, Apps have access to the entire configuration if required, meaning they can access AppDaemon configuration items as well as parameters from other Apps. To use this, there is a class attribute called `self.config`. It contains a `ConfigParser` object, which is similar in operation to a `Dictionary`. To access any apps parameters, simply reference the ConfigParser object using the Apps name (form the config file) as the first key, and the parameter required as the second, for instance:
```python
other_apps_arg = self.config["some_app"]["some_parameter"].
other_apps_arg = self.config["some_app"]["some_parameter"]
```
To get AppDaemon's config parameters, use the key "AppDaemon", e.g.:

0
source/_docs/ecosystem/appdaemon/running.markdown Executable file → Normal file
View File

67
source/_docs/ecosystem/appdaemon/tutorial.markdown Executable file → Normal file
View File

@ -58,18 +58,17 @@ different scenes in a different version of the App.
```python
import appdaemon.plugins.hass.hassapi as hass
class OutsideLights(hass.Hass):
def initialize(self):
self.run_at_sunrise(self.sunrise_cb)
self.run_at_sunset(self.before_sunset_cb, offset=-900)
def initialize(self):
self.run_at_sunrise(self.sunrise_cb)
self.run_at_sunset(self.before_sunset_cb, offset=-900)
def sunrise_cb(self, kwargs):
self.turn_on(self.args["off_scene"])
def before_sunset_cb(self, kwargs):
self.turn_on(self.args["on_scene"])
def sunrise_cb(self, kwargs):
self.turn_on(self.args["off_scene"])
def before_sunset_cb(self, kwargs):
self.turn_on(self.args["on_scene"])
```
This is also fairly easy to achieve with Home Assistant automations, but we are just getting started.
@ -81,18 +80,18 @@ Our next example is to turn on a light when motion is detected and it is dark, a
```python
import appdaemon.appapi as appapi
class FlashyMotionLights(appapi.AppDaemon):
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new="on")
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new = "on")
def motion(self, entity, attribute, old, new, kwargs):
if self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
def motion(self, entity, attribute, old, new, kwargs):
if self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
def light_off(self, kwargs):
self.turn_off("light.drive")
def light_off(self, kwargs):
self.turn_off("light.drive")
```
This is starting to get a little more complex in Home Assistant automations requiring an Automation rule and two separate scripts.
@ -102,26 +101,26 @@ Now lets extend this with a somewhat artificial example to show something that i
```python
import homeassistant.appapi as appapi
class MotionLights(appapi.AppDaemon):
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new="on")
def initialize(self):
self.listen_state(self.motion, "binary_sensor.drive", new = "on")
def motion(self, entity, attribute, old, new, kwargs):
if self.self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
self.flashcount = 0
self.run_in(self.flash_warning, 1)
def motion(self, entity, attribute, old, new, kwargs):
if self.self.sun_down():
self.turn_on("light.drive")
self.run_in(self.light_off, 60)
self.flashcount = 0
self.run_in(self.flash_warning, 1)
def light_off(self, kwargs):
self.turn_off("light.drive")
def light_off(self, kwargs):
self.turn_off("light.drive")
def flash_warning(self, kwargs):
self.toggle("light.living_room")
self.flashcount += 1
if self.flashcount < 10:
self.run_in(self.flash_warning, 1)
def flash_warning(self, kwargs):
self.toggle("light.living_room")
self.flashcount += 1
if self.flashcount < 10:
self.run_in(self.flash_warning, 1)
```
Of course if I wanted to make this App or its predecessor reusable I would have provide parameters for the sensor, the light to activate on motion, the warning light and even the number of flashes and delay between flashes.

0
source/_docs/ecosystem/appdaemon/windows.markdown Executable file → Normal file
View File

View File

@ -4,7 +4,7 @@ description: "Instructions on how backup your Home Assistant configuration to Dr
redirect_from: /cookbook/dropboxbackup/
---
Backing up and regularly syncing your Home Assistant configuration to [Dropbox](http://dropbox.com) similar to [Github Backup](/docs/ecosystem/backup/backup_github/)
Backing up and regularly syncing your Home Assistant configuration to [Dropbox](http://dropbox.com) is similar to [Github Backup](/docs/ecosystem/backup/backup_github/)
### Requirements

View File

@ -58,7 +58,7 @@ Here is an example that will ignore everything but your YAML configuration.
```bash
# Example .gitignore file for your config dir.
# A * ensures that everything will be ignored.
# An * ensures that everything will be ignored.
*
# You can whitelist files/folders with !, these will not be ignored.

View File

@ -330,7 +330,6 @@ Now edit your configuration.yaml file to reflect the SSL entries and your base U
```yaml
http:
api_password: YOUR_PASSWORD
ssl_certificate: /etc/letsencrypt/live/examplehome.duckdns.org/fullchain.pem
ssl_key: /etc/letsencrypt/live/examplehome.duckdns.org/privkey.pem
base_url: examplehome.duckdns.org

View File

@ -4,16 +4,21 @@ description: "Configure a Certificate Authority and self-signed certificate to u
redirect_from: /cookbook/tls_self_signed_certificate/
---
If your Home Assistant instance is only accessible from your local network you can still protect the communication between your browsers and the frontend with SSL/TLS.
[Let's encrypt]({{site_root}}/blog/2017/09/27/effortless-encryption-with-lets-encrypt-and-duckdns/) will only work if you have a DNS entry and remote access is allowed.
If your Home Assistant instance is only accessible from your local network, you can still protect the communication between your browsers and the frontend with SSL/TLS.
[Let's Encrypt](/blog/2017/09/27/effortless-encryption-with-lets-encrypt-and-duckdns/) will only work if you have a DNS entry and remote access is allowed.
The solution is to use a self-signed certificate. As you most likely don't have a certification authority (CA) your browser will complain about the security. If you have a CA then this will not be an issue.
The solution is to use a self-signed certificate. Please note, however, that after you have completed these steps, your browser will complain about the security of the certificate as it was not issued by a trusted authority.
* This is due to self-signed certificates having not been issued by a certification authority ([`CA`](https://cheapsslsecurity.com/blog/what-is-a-certificate-authority-ca/)). If you have your own CA, then this will not be an issue.
* A fantastic workaround for this, while keeping your instance isolated securely off the Internet, is to use a [`Certificate for SSL/TLS via domain ownership`](/docs/ecosystem/certificates/tls_domain_certificate/).
If you don't mind the browser warnings and simply want SSL/TLS encryption and therefore have decided to use a self-signed certificate permanently or temporarily, read on!
If you use Chrome browser version 58 or above and/or **don't want to have issues regarding a non-trusted CA or CN (Common Name)**, follow this full tutorial: [Create Root Certificate Authority and self-signed certificate for your Home Assistant. Compatible with Chrome browser > version 58](https://gist.github.com/tiagofreire-pt/4920be8d03a3dfa8201c6afedd00305e). Otherwise, follow this:
To create a certificate locally, you need the [OpenSSL](https://www.openssl.org/) command-line tool.
Change to your Home Assistant [configuration directory](/getting-started/configuration/) like `~/.homeassistant`. This will make it easier to backup your certificate and the key. Run the command shown below.
Change to your Home Assistant [configuration directory](/getting-started/configuration/) like `~/.homeassistant`. This will make it easier to backup your certificate and the key. Run the command shown below.
The certificate **must** be `.pem` extension.
@ -35,7 +40,7 @@ http:
ssl_key: /ssl/privkey.pem
```
Non-hass.io:
Non-Hass.io:
```yaml
http:
@ -63,16 +68,17 @@ sudo chmod 600 fullchain.pem privkey.pem
A tutorial "[Working with SSL Certificates, Private Keys and CSRs](https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs)" could give you some insight about special cases.
### iOS and macOS Specific Requirements
## iOS and macOS Specific Requirements
### iOS
#### iOS
If you are going to use this certificate with the iOS app, you need to ensure you complete **all** fields during the certificate creation process, then:
* Send **only** the `fullchain.pem` file to the iOS device, using airdrop or other transfer method.
* Open the `.pem` file on the iOS device, follow the prompts to trust and install it.
* If you are using iOS 10.3 or newer then [additional steps](https://support.apple.com/en-us/HT204477) are needed.
#### iOS 13 and macOS 10.15
### iOS 13 and macOS 10.15
There are [new security requirements](https://support.apple.com/en-us/HT210176) for TLS server certificates in iOS 13 and macOS 10.15. To summarize:

0
source/_docs/ecosystem/hadashboard.markdown Executable file → Normal file
View File

View File

@ -1,6 +1,6 @@
---
title: "HASS Configurator"
description: "Instructions on how to install and use the HASS Configurator"
title: "Configurator"
description: "Instructions on how to install and use the Configurator"
redirect_from: /ecosystem/hass-configurator/
---
@ -11,7 +11,7 @@ This is essentially a browser-based alternative to modifying your configuration
<p class='img'>
<img src='/images/hassio/screenshots/addon-hass-configurator.png'>
Screenshot of the HASS Configurator.
Screenshot of the Configurator.
</p>
### Feature list

View File

@ -130,9 +130,9 @@ server {
# These shouldn't need to be changed
listen [::]:443 default_server ipv6only=off; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
listen [::]:443 ssl default_server ipv6only=off; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl on;
# ssl on; # Uncomment if you are using nginx < 1.15.0
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_prefer_server_ciphers on;

View File

@ -4,9 +4,9 @@ description: "Android/iOS instructions to add Home Assistant to your homescreen.
redirect_from: /getting-started/mobile/
---
Home Assistant has [a companion apps for Android and iOS](/docs/ecosystem/ios/).
Home Assistant has [a companion app for both Android and iOS](/docs/ecosystem/ios/).
On both Android and iOS, you can add the Home Assistant "web app" to your homescreen as if it was native (Home Assistant leverages the W3C [manifest.json](https://w3c.github.io/manifest/) support).
As an alternative to the iOS and Android companion apps, you can add the Home Assistant "web app" to your homescreen as if it was native (Home Assistant leverages the W3C [manifest.json](https://w3c.github.io/manifest/) support).
### Android

View File

@ -43,7 +43,7 @@ NUC i7/i9 | Pure power, you should not have *any* performance issues
## Recommended
These install options are fully supported by Home Assistant's documentation. For example, if a integration requires that you install something to make it work on one of these methods then the integration page will document the steps required.
These install options are fully supported by Home Assistant's documentation. For example, if an integration requires that you install something to make it work on one of these methods then the integration page will document the steps required.
<div class='note'>

View File

@ -13,22 +13,19 @@ Enter the Home Assistant jail. If you don't know which name you have given the j
iocage exec HomeAssistant
```
Create the user and group that Home Assistant will run as. The user/group ID of `8123` can be replaced if this is already in use in your environment.
```bash
pw groupadd -n homeassistant -g 8123
echo 'homeassistant:8123:8123::::::/bin/csh:' | adduser -f -
```
Install the necessary Python packages and virtualenv:
Install the suggested packages:
```bash
pkg update
pkg upgrade
pkg install -y python37 py37-sqlite3 ca_root_nss
python3.7 -m ensurepip
pip3 install --upgrade pip
pip3 install --upgrade virtualenv
pkg install -y autoconf bash ca_root_nss gmake pkgconf python37 py37-sqlite3
```
Create the user and group that Home Assistant will run as. The user/group ID of `8123` can be replaced if this is already in use in your environment.
```bash
pw groupadd -n homeassistant -g 8123
echo 'homeassistant:8123:8123::::::/usr/local/bin/bash:' | adduser -f -
```
Create the installation directory:
@ -38,13 +35,14 @@ mkdir -p /usr/local/share/homeassistant
chown -R homeassistant:homeassistant /usr/local/share/homeassistant
```
Install Home Assistant itself:
Create the virtualenv and install Home Assistant itself:
```bash
su homeassistant
cd /usr/local/share/homeassistant
virtualenv -p python3.7 .
source ./bin/activate.csh
python3.7 -m venv .
source ./bin/activate
pip3 install --upgrade pip
pip3 install homeassistant
```
@ -82,29 +80,37 @@ vi /usr/local/etc/rc.d/homeassistant
```bash
#!/bin/sh
#
# Based upon work by tprelog at https://www.ixsystems.com/community/resources/fn-11-2-iocage-home-assistant-jail-plugins-for-node-red-mosquitto-amazon-dash-tasmoadmin.102/
# Based upon work by tprelog at https://github.com/tprelog/iocage-homeassistant/blob/11.3-RELEASE/overlay/usr/local/etc/rc.d/homeassistant
#
# PROVIDE: homeassistant
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# homeassistant_enable: Set to YES to enable the homeassistant service.
# Default: NO
# homeassistant_user: The user account used to run the homeassistant daemon.
# This is optional, however do not specifically set this to an
# empty string as this will cause the daemon to run as root.
# Default: homeassistant
# homeassistant_group: The group account used to run the homeassistant daemon.
# This is optional, however do not specifically set this to an
# empty string as this will cause the daemon to run with group wheel.
# Default: homeassistant
# homeassistant_config_dir: Directory where config files are located.
# Default: /home/homeassistant/.homeassistant
# homeassistant_install_dir: Directory where Home Assistant is installed.
# Default: /usr/local/share/homeassistant
# homeassistant_user: The user account used to run the homeassistant daemon.
# This is optional, however do not specifically set this to an
# empty string as this will cause the daemon to run as root.
# Default: homeassistant
# homeassistant_group: The group account used to run the homeassistant daemon.
# This is optional, however do not specifically set this to an
# empty string as this will cause the daemon to run with group wheel.
# Default: homeassistant
#
# sysrc homeassistant_enable=yes
# service homeassistant start
# homeassistant_venv: Directory where homeassistant virtualenv is installed.
# Default: "/usr/local/share/homeassistant"
# Change: `sysrc homeassistant_venv="/srv/homeassistant"`
# UnChange: `sysrc -x homeassistant_venv`
#
# homeassistant_config_dir: Directory where homeassistant config is located.
# Default: "/home/homeassistant/.homeassistant"
# Change: `sysrc homeassistant_config_dir="/home/hass/homeassistant"`
# UnChange: `sysrc -x homeassistant_config_dir`
# -------------------------------------------------------
# Copy this file to '/usr/local/etc/rc.d/homeassistant'
# `chmod +x /usr/local/etc/rc.d/homeassistant`
# `sysrc homeassistant_enable=yes`
# `service homeassistant start`
# -------------------------------------------------------
. /etc/rc.subr
name=homeassistant
@ -112,43 +118,85 @@ rcvar=${name}_enable
pidfile_child="/var/run/${name}.pid"
pidfile="/var/run/${name}_daemon.pid"
logfile="/var/log/${name}.log"
load_rc_config ${name}
: ${homeassistant_enable:="NO"}
: ${homeassistant_user:="homeassistant"}
: ${homeassistant_group:="homeassistant"}
: ${homeassistant_config_dir:="/home/homeassistant/.homeassistant"}
: ${homeassistant_install_dir:="/usr/local/share/homeassistant"}
: ${homeassistant_venv:="/usr/local/share/homeassistant"}
command="/usr/sbin/daemon"
extra_commands="check_config restart test upgrade"
start_precmd=${name}_precmd
homeassistant_precmd()
{
rc_flags="-f -P ${pidfile} -p ${pidfile_child} ${homeassistant_install_dir}/bin/hass --config ${homeassistant_config_dir} ${rc_flags}"
if [ ! -e "${pidfile_child}" ]; then
install -g ${homeassistant_group} -o ${homeassistant_user} -- /dev/null "${pidfile_child}";
fi
if [ ! -e "${pidfile}" ]; then
install -g ${homeassistant_group} -o ${homeassistant_user} -- /dev/null "${pidfile}";
fi
homeassistant_precmd() {
rc_flags="-f -o ${logfile} -P ${pidfile} -p ${pidfile_child} ${homeassistant_venv}/bin/hass --config ${homeassistant_config_dir} ${rc_flags}"
[ ! -e "${pidfile_child}" ] && install -g ${homeassistant_group} -o ${homeassistant_user} -- /dev/null "${pidfile_child}"
[ ! -e "${pidfile}" ] && install -g ${homeassistant_group} -o ${homeassistant_user} -- /dev/null "${pidfile}"
[ -e "${logfile}" ] && rm -f -- "${logfile}"
install -g ${homeassistant_group} -o ${homeassistant_user} -- /dev/null "${logfile}"
if [ ! -d "${homeassistant_config_dir}" ]; then
install -d -g ${homeassistant_group} -o ${homeassistant_user} -- "${homeassistant_config_dir}";
install -d -g ${homeassistant_group} -o ${homeassistant_user} -m 775 -- "${homeassistant_config_dir}"
fi
echo "Performing check on Home Assistant configuration:"
eval "${homeassistant_install_dir}/bin/hass" --config "${homeassistant_config_dir}" --script check_config
}
stop_postcmd=${name}_postcmd
homeassistant_postcmd()
{
homeassistant_postcmd() {
rm -f -- "${pidfile}"
rm -f -- "${pidfile_child}"
}
upgrade_cmd="${name}_upgrade"
homeassistant_upgrade() {
service ${name} stop
su ${homeassistant_user} -c '
source ${@}/bin/activate || exit 1
pip3 install --upgrade homeassistant
deactivate
' _ ${homeassistant_venv} || exit 1
[ $? == 0 ] && homeassistant_check_config && service ${name} start
}
check_config_cmd="${name}_check_config"
homeassistant_check_config() {
[ ! -e "${homeassistant_config_dir}/configuration.yaml" ] && return 0
echo "Performing check on Home Assistant configuration:"
#eval "${homeassistant_venv}/bin/hass --config ${homeassistant_config_dir} --script check_config"
su ${homeassistant_user} -c '
source ${1}/bin/activate || exit 2
hass --config ${2} --script check_config || exit 3
deactivate
' _ ${homeassistant_venv} ${homeassistant_config_dir}
}
restart_cmd="${name}_restart"
homeassistant_restart() {
homeassistant_check_config || exit 1
echo "Restarting Home Assistant"
service ${name} stop
service ${name} start
}
test_cmd="${name}_test"
homeassistant_test() {
echo -e "\nTesting virtualenv...\n"
[ ! -d "${homeassistant_venv}" ] && echo -e " NO DIRECTORY: ${homeassistant_venv}\n" && exit
[ ! -f "${homeassistant_venv}/bin/activate" ] && echo -e " NO FILE: ${homeassistant_venv}/bin/activate\n" && exit
## switch users / activate virtualenv / get version
su "${homeassistant_user}" -c '
source ${1}/bin/activate || exit 2
echo " $(python --version)" || exit 3
echo " Home Assistant $(pip3 show homeassistant | grep Version | cut -d" " -f2)" || exit 4
deactivate
' _ ${homeassistant_venv}
[ $? != 0 ] && echo "exit $?"
}
load_rc_config ${name}
run_rc_command "$1"
```
@ -184,12 +232,17 @@ pkg install libudev-devd
Then you can install the zwave package
```bash
pip3 install homeassistant-pyozw==0.1.4
su homeassistant
cd /usr/local/share/homeassistant
source ./bin/activate.csh
pip3 install homeassistant-pyozw==0.1.7
deactivate
exit
```
Stop the hass Jail
```bash
sudo iocage stop hass
sudo iocage stop HomeAssistant
```
Edit the devfs rules on the Freenas Host
@ -199,8 +252,8 @@ vi /etc/devfs.rules
Add the following lines
```bash
[devfsrules_jail_allow_usb=7]
add path 'cu\*' mode 0660 group 8123 unhide
[devfsrules_jail_allow_usb=7]
add path 'cu\*' mode 0660 group 8123 unhide
```
Reload devfs
@ -213,18 +266,18 @@ Set it to 7
Start the hass jail
```bash
sudo iocage start hass
sudo iocage start HomeAssistant
```
Connect to the hass jail and verify that you see the modem devices
```bash
sudo iocage console hass
sudo iocage console HomeAssistant
```
```bash
ls /dev/cu*
```
This should ouput the following
This should output the following
```bash
/dev/cuau0 /dev/cuaU0
```
@ -256,7 +309,7 @@ Then, enter the `venv`:
```bash
su homeassistant
cd /usr/local/share/homeassistant
source ./bin/activate.csh
source ./bin/activate
```
Upgrade Home Assistant:

View File

@ -67,22 +67,22 @@ cd /srv/homeassistant
python3 -m venv .
source bin/activate
```
Once you have activated the virtual environment (notice the prompt change) you will need to run the following command to install a required python package.
Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required python package.
```bash
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ python3 -m pip install wheel
python3 -m pip install wheel
```
Once you have installed the required python package it is now time to install Home Assistant!
```bash
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install homeassistant
pip3 install homeassistant
```
Start Home Assistant for the first time. This will complete the installation for you, automatically creating the `.homeassistant` configuration directory in the `/home/homeassistant` directory, and installing any basic dependencies.
```bash
(homeassistant) $ hass
hass
```
You can now reach your installation on your Raspberry Pi over the web interface on `http://ipaddress:8123`.

View File

@ -12,6 +12,8 @@ It's recommended when installing Python packages that you use a [virtual environ
This is a generic guide for running Home Assistant under Python. We recommend to use [our recommended installation guides](/docs/installation/#recommended). The steps below may be shorter but some users find difficulty when applying updates and may run into issues.
Before you begin the guide below, ensure that you have a *so-called standard* build environment that includes things like `make`, `gcc`, `python3`, including Python 3 `setuptools` and `pip` modules. Less obvious is the need to install `openssl-dev` (for opensslv.h) and `libffi-dev` (for cffi.h) for things to build later on.
</div>
{% comment %}

View File

@ -9,7 +9,7 @@ The MQTT integration needs you to run an MQTT broker for Home Assistant to conne
### Run your own
This is the most private option, but it requires a little bit of work to setup. There are multiple free and open-source brokers to pick from: e.g., [Mosquitto](http://mosquitto.org/), [EMQ](https://github.com/emqx/emqx) or [Mosca](http://www.mosca.io/).
For hass.io users, the recommended setup method is to use the [Mosquitto MQTT broker addon](/addons/mosquitto).
For Hass.io users, the recommended setup method is to use the [Mosquitto MQTT broker addon](/addons/mosquitto).
```yaml
# Example configuration.yaml entry

View File

@ -16,7 +16,7 @@ mqtt:
{% configuration %}
certificate:
description: "'auto' or the certificate authority certificate file that is to be treated as trusted by this client. To enable a secure (TLS) connection to your server you must define the 'certitificate' configuration parameter. 'auto' uses the certifite CAs bundled certificates. If a file is specified the file should contain the root certificate of the certificate authority that signed your broker's certificate, but may contain multiple certificates. Example: `/home/user/identrust-root.pem`."
description: "'auto' or the certificate authority certificate file that is to be treated as trusted by this client. To enable a secure (TLS) connection to your server you must define the 'certificate' configuration parameter. 'auto' uses the certifite CAs bundled certificates. If a file is specified the file should contain the root certificate of the certificate authority that signed your broker's certificate, but may contain multiple certificates. Example: `/home/user/identrust-root.pem`."
required: false
type: string
client_key:

View File

@ -236,6 +236,8 @@ The following software has built-in support for MQTT discovery:
### Examples
#### Motion detection (binary sensor)
A motion detection device which can be represented by a [binary sensor](/integrations/binary_sensor.mqtt/) for your garden would send its configuration as JSON payload to the Configuration topic. After the first message to `config`, then the MQTT messages sent to the state topic will update the state in Home Assistant.
- Configuration topic: `homeassistant/binary_sensor/garden/config`
@ -259,6 +261,18 @@ Delete the sensor by sending an empty message.
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m ''
```
#### Sensors with multiple values
Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions.
- Configuration topic no1: `homeassistant/sensor/sensorBedroomT/config`
- Configuration payload no1: `{"device_class": "temperature", "name": "Temperature", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "°C", "value_template": "{% raw %}{{ value_json.temperature}}{% endraw %}" }`
- Configuration topic no2: `homeassistant/sensor/sensorBedroomH/config`
- Configuration payload no2: `{"device_class": "humidity", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{% raw %}{{ value_json.humidity}}{% endraw %}" }`
- Common state payload: `{ "temperature": 23.20, "humidity": 43.70 }`
#### Switches
Setting up a switch is similar but requires a `command_topic` as mentioned in the [MQTT switch documentation](/integrations/switch.mqtt/).
- Configuration topic: `homeassistant/switch/irrigation/config`
@ -276,27 +290,45 @@ Set the state.
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/set" -m ON
```
Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions.
- Configuration topic no1: `homeassistant/sensor/sensorBedroomT/config`
- Configuration payload no1: `{"device_class": "temperature", "name": "Temperature", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "°C", "value_template": "{% raw %}{{ value_json.temperature}}{% endraw %}" }`
- Configuration topic no2: `homeassistant/sensor/sensorBedroomH/config`
- Configuration payload no2: `{"device_class": "humidity", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{% raw %}{{ value_json.humidity}}{% endraw %}" }`
- Common state payload: `{ "temperature": 23.20, "humidity": 43.70 }`
#### Abbreviating topic names
Setting up a switch using topic prefix and abbreviated configuration variable names to reduce payload length.
- Configuration topic: `homeassistant/switch/irrigation/config`
- Command topic: `homeassistant/switch/irrigation/set`
- State topic: `homeassistant/switch/irrigation/state`
- Payload: `{"~": "homeassistant/switch/irrigation", "name": "garden", "cmd_t": "~/set", "stat_t": "~/state"}`
- Configuration payload: `{"~": "homeassistant/switch/irrigation", "name": "garden", "cmd_t": "~/set", "stat_t": "~/state"}`
Setting up a climate integration (heat only) with abbreviated configuration variable names to reduce payload length.
#### Lighting
Setting up a [light that takes JSON payloads](/integrations/light.mqtt/#json-schema), with abbreviated configuration variable names:
- Configuration topic: `homeassistant/light/kitchen/config`
- Command topic: `homeassistant/light/kitchen/set`
- State topic: `homeassistant/light/kitchen/state`
- Example state payload: `{"state": "ON", "brightness": 255}`
- Configuration payload:
```json
{
"~": "homeassistant/light/kitchen",
"name": "Kitchen",
"unique_id": "kitchen_light",
"cmd_t": "~/set",
"stat_t": "~/state",
"schema": "json",
"brightness": true
}
```
#### Climate control
Setting up a climate integration (heat only):
- Configuration topic: `homeassistant/climate/livingroom/config`
- Configuration payload:
```yaml
```json
{
"name":"Livingroom",
"mode_cmd_t":"homeassistant/climate/livingroom/thermostatModeCmd",
@ -320,7 +352,7 @@ Setting up a climate integration (heat only) with abbreviated configuration vari
- State topic: `homeassistant/climate/livingroom/state`
- State payload:
```yaml
```json
{
"mode":"off",
"target_temp":"21.50",

View File

@ -4,13 +4,13 @@ description: "Documentation about all available conditions."
redirect_from: /getting-started/scripts-conditions/
---
Conditions can be used within a script or automation to prevent further execution. When a condition does not return true, the script or automation will stop executing. A condition will look at the system right now. For example a condition can test if a switch is currently turned on or off.
Conditions can be used within a script or automation to prevent further execution. When a condition does not return true, the script or automation stops executing. A condition will look at the system at that moment. For example, a condition can test if a switch is currently turned on or off.
Unlike a trigger, which is always `or`, conditions are `and` by default - all conditions have to be true.
### AND condition
Test multiple conditions in 1 condition statement. Passes if all embedded conditions are valid.
Test multiple conditions in one condition statement. Passes if all embedded conditions are valid.
```yaml
condition:
@ -24,7 +24,7 @@ condition:
below: 20
```
If you do not want to combine AND and OR conditions, you can also just list them sequentially.
If you do not want to combine AND and OR conditions, you can list them sequentially.
The following configuration works the same as the one listed above:
@ -42,7 +42,7 @@ Currently you need to format your conditions like this to be able to edit them u
### OR condition
Test multiple conditions in 1 condition statement. Passes if any embedded condition is valid.
Test multiple conditions in one condition statement. Passes if any embedded condition is valid.
```yaml
condition:
@ -58,7 +58,7 @@ condition:
### MIXED AND and OR conditions
Test multiple AND and OR conditions in 1 condition statement. Passes if any embedded conditions is valid.
Test multiple AND and OR conditions in one condition statement. Passes if any embedded condition is valid.
This allows you to mix several AND and OR conditions together.
```yaml
@ -80,7 +80,7 @@ condition:
### Numeric state condition
This type of condition attempts to parse the state of specified entity as a number and triggers if the value matches the thresholds.
This type of condition attempts to parse the state of the specified entity as a number, and triggers if the value matches the thresholds.
If both `below` and `above` are specified, both tests have to pass.
@ -93,7 +93,7 @@ condition:
above: 17
below: 25
# If your sensor value needs to be adjusted
value_template: {% raw %}{{ float(state.state) + 2 }}{% endraw %}
value_template: {% raw %}'{{ float(state.state) + 2 }}'{% endraw %}
```
### State condition
@ -134,8 +134,8 @@ condition:
#### Sun elevation condition
The sun elevation can be used to test if the sun has set or risen, it is dusk, it is night etc. when a trigger occurs.
For an in depth explanation of sun elevation see [sun elevation trigger][sun_elevation_trigger].
The sun elevation can be used to test if the sun has set or risen, it is dusk, it is night, etc. when a trigger occurs.
For an in-depth explanation of sun elevation, see [sun elevation trigger][sun_elevation_trigger].
[sun_elevation_trigger]: /docs/automation/trigger/#sun-elevation-trigger
@ -162,9 +162,9 @@ The sun condition can also test if the sun has already set or risen when a trigg
[sun_trigger]: /docs/automation/trigger/#sun-trigger
<div class='note warning'>
The sunset/sunrise conditions do not work in locations inside the polar circles, and also not in locations with highly skewed local time zone.
The sunset/sunrise conditions do not work in locations inside the polar circles, and also not in locations with a highly skewed local time zone.
It is advised to use conditions evaluating the solar elevation instead of the before/after sunset/sunrise conditions.
In those cases it is advised to use conditions evaluating the solar elevation instead of the before/after sunset/sunrise conditions.
</div>
```yaml
@ -195,13 +195,13 @@ condition:
after: sunrise
```
A visual timeline is provided below showing an example of when these conditions will be true. In this chart, sunrise is at 6:00, and sunset is at 18:00 (6:00 PM). The green areas of the chart indicate when the specified conditions will be true.
A visual timeline is provided below showing an example of when these conditions are true. In this chart, sunrise is at 6:00, and sunset is at 18:00 (6:00 PM). The green areas of the chart indicate when the specified conditions are true.
<img src='/images/docs/scripts/sun-conditions.svg' alt='Graphic showing an example of sun conditions' />
### Template condition
The template condition will test if the [given template][template] renders a value equal to true. This is achieved by having the template result in a true boolean expression or by having the template render 'true'.
The template condition tests if the [given template][template] renders a value equal to true. This is achieved by having the template result in a true boolean expression or by having the template render 'true'.
```yaml
condition:
@ -216,7 +216,7 @@ Within an automation, template conditions also have access to the `trigger` vari
### Time condition
The time condition can test if it is after a specified time, before a specified time or if it is a certain day of the week
The time condition can test if it is after a specified time, before a specified time or if it is a certain day of the week.
```yaml
condition:
@ -241,7 +241,7 @@ A better weekday condition could be by using the [Workday Binary Sensor](/integr
### Zone condition
Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the [OwnTracks platform](/integrations/owntracks/) and the [iCloud platform](/integrations/icloud/).
Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have set up a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the [OwnTracks platform](/integrations/owntracks/) and the [iCloud platform](/integrations/icloud/).
```yaml
condition:

View File

@ -96,7 +96,10 @@ There are four `homeassistant` services that aren't tied to any single domain, t
* `homeassistant.toggle` - Turns off an entity that is on, or turns on an entity that is off (that supports being turned on and off)
* `homeassistant.update_entity` - Request the update of an entity, rather than waiting for the next scheduled update, for example [google travel time] sensor, a [template sensor], or a [light]
Complete service details and examples can be found on the [Home Assistant integration][homeassistant-integration-services] page.
[templating]: /topics/templating/
[google travel time]: /integrations/google_travel_time/
[template sensor]: /integrations/template/
[light]: /integrations/light/
[homeassistant-integration-services]: /integrations/homeassistant#services

View File

@ -78,11 +78,11 @@ Battery powered devices need to be awake before you can use the Z-Wave control p
This is a dropdown where you can select all the entities of this node. Once selected you can then use:
* **Refresh Entity** to refresh just that entity's values
* **Entity Attributes** to display the attributes of that entity (e.g., its friendly name, the ID of the node, etc)
* **Entity Information** to display the attributes of that entity (e.g., its friendly name, the ID of the node, etc)
Here you can mark a device as requiring polling so the controller is aware of changes because the device doesn't send updates itself. Do see the information on [polling here](/docs/z-wave/devices/#polling), since excessive polling can break your Z-Wave network.
The **Polling intensity** says how many poll intervals does is this device polled on. For example, if you set 2 then it's polled on every second interval.
The **Polling intensity** says how many poll intervals this device is polled on. For example, if you set 2 then it's polled on every second interval.
You can also exclude a Z-Wave devices from Home Assistant. You can do that if you have a device that you need to have on the Z-Wave network, but you don't want it to appear in Home Assistant, or if you've got a device that's failed and you're unable to exclude it.
@ -154,7 +154,7 @@ for x in range(0, 10):
translations["%s" % x] = "\\x3%s" % x
for c in sys.argv[1]:
print(translations[c], end='')
print(translations[c], end="")
```
## OZW Log

View File

@ -5,7 +5,7 @@ description: "Extended instructions how to setup Z-Wave."
## Supported Z-Wave USB Sticks & Hardware Modules
You need to have a compatible Z-Wave stick or module installed. This needs to be a *static controller*, which most Z-Wave sticks and modules will be. If yours is a *bridge* device then it won't work with [OpenZWave](http://openzwave.com/), which is what provides Home Assistant's Z-Wave capabilities. The following devices have been confirmed to work:
You need to have a compatible Z-Wave stick or module installed. This needs to be a *static controller*, which most Z-Wave sticks and modules will be. If yours is a *bridge* device then it won't work with [OpenZWave](http://openzwave.com/), which is what provides Home Assistant's Z-Wave capabilities. USB sticks using the new 700 series Z-Wave platform are not compatible. The following devices have been confirmed to work:
<div class='note'>
@ -24,7 +24,7 @@ There have [been reports](https://www.raspberrypi.org/forums/viewtopic.php?f=28&
We recommend that you purchase a [Z-Wave Plus](https://z-wavealliance.org/z-wave_plus_certification/) controller, to take advantage of the improvements this provides. As OpenZWave doesn't support S2 or Smart Start, there's no need to buy one just for support of these features.
<div class='note'>
If you're using Hass.io or running HASS in a Docker container, it's recommended to use a USB stick, not a module. Passing a module through Docker is more complicated than passing a USB stick through.
If you're using Hass.io or running Home Assistant in a Docker container, it's recommended to use a USB stick, not a module. Passing a module through Docker is more complicated than passing a USB stick through.
</div>
## Stick Alternatives

View File

@ -122,7 +122,7 @@ You can also check what hardware has been found using the [hassio command](/hass
$ hassio hardware info
```
If you did an alternative install on Linux then the `modemmanager` package will interfere with any Z-Wave (or Zigbee) stick and should be removed or disabled. Failure to do so will result in random failures of those components. For example you can disable with `sudo systemctl disable ModemManager` and remove with `sudo apt-get purge modemmanager`.
If you did an alternative install of Hass.io on Linux (e.g. installing Ubuntu, then Docker, then Hass.io) then the `modemmanager` package will interfere with any Z-Wave (or Zigbee) stick and should be removed or disabled in the host OS. Failure to do so will result in random failures of those components, e.g. dead or unreachable Z-Wave nodes, most notably right after Home Assistant restarts. Connect to your host OS via SSH, then you can disable with `sudo systemctl disable ModemManager` and remove with `sudo apt-get purge modemmanager` (commands are for Debian/Ubuntu).
### Docker
@ -153,7 +153,7 @@ On the Raspberry Pi you will need to enable the serial interface in the `raspi-c
On Debian Linux platforms there are dependencies you will need to have installed ahead of time (included in `systemd-devel` on Fedora/RHEL systems):
```bash
$ sudo apt-get install libudev-dev
$ sudo apt-get install libudev-dev build-essential
```
You may also have to install the Python development libraries for your version of Python. For example `libpython3.6-dev`, and possibly `python3.6-dev` if you're using Python 3.6.
@ -215,13 +215,16 @@ ls /dev/cu.usbmodem*
If your device path changes when you restart, see [this guide](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/) on fixing it.
## Ubuntu and Debian based host system
## Random unreachable Z-Wave nodes: ModemManager interference
If your instance is running on a Debian based system, e.g., Ubuntu, the ModemManager may cause unexpected issues.
If this applies to your situation:
- Some or all Z-Wave nodes are unreachable after restarting Home Assistant; not necessarily after every restart but seemingly random.
- The Z-Wave stick stops responding, needs to be re-plugged or Home Assistant needs a restart to get Z-Wave back.
- Your host OS is Debian-based/Ubuntu (for example: you installed Ubuntu, then Docker, then Hass.io).
The ModemManager might be claiming or interfering with a USB Z-Wave stick, like the much used Aeotec ones. If you experience issues where the stick stops responding, needs to be re-plugged or Home Assistant needs a restart to get Z-Wave back, chances are high that the ModemManager is causing the issue.
Then chances are high that the ModemManager in the host OS is causing the issue, claiming or interfering with the USB Z-Wave stick like the much used Aeotec ones. In this case you need to disable ModemManager.
Execute the following command on your host system to disable the ModemManager:
Connect to your host OS (e.g. Ubuntu) through SSH, then execute the following command on your host system to disable the ModemManager:
```bash
systemctl disable ModemManager.service

View File

@ -4,6 +4,6 @@ description: "My integration does not show up"
ha_category: Configuration
---
When a integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
If you have incorrect entries in your configuration files you can use the `check_config` script to assist in identifying them: `hass --script check_config`.

View File

@ -4,7 +4,7 @@ description: "Home Assistant vs. Hass.io"
ha_category: Installation
---
Home Assistant is a Python program, in simple words. It can be run various operating system and provide the ability to track, control and automate your devices. When people talking about Home Assistant they usually refer to a standalone [installation method](/docs/installation/).
Home Assistant is a Python program, in simple words. It can be run on various operating systems and provide the ability to track, control and automate your devices. When people talking about Home Assistant they usually refer to a standalone [installation method](/docs/installation/).
[Hass.io](/hassio/) is a combination of Home Assistant and tools which allows one to run it easily on a Raspberry Pi and other platforms without setting up an operating system first. Hass.io is an all-in one-solution and has a management user interface that can be used from the Home Assistant frontend. This interface is not present in a standalone setup of Home Assistant.

View File

@ -22,16 +22,16 @@
</div>
{%- endif -%}
{%- if page.ha_qa_scale -%}
{%- if page.ha_quality_scale -%}
<div class='section'>
Quality Scale: <a href='/docs/quality_scale/'>
{%- if page.ha_qa_scale == 'platinum' -%}
{%- if page.ha_quality_scale == 'platinum' -%}
🏆 (platinum)
{%- elsif page.ha_qa_scale == 'gold' -%}
{%- elsif page.ha_quality_scale == 'gold' -%}
🥇 (gold)
{%- elsif page.ha_qa_scale == 'silver' -%}
{%- elsif page.ha_quality_scale == 'silver' -%}
🥈 (silver)
{%- elsif page.ha_qa_scale == 'internal' -%}
{%- elsif page.ha_quality_scale == 'internal' -%}
🏠 (internal)
{%- endif -%}
</a>

View File

@ -349,7 +349,7 @@
</li>
<li>{% active_link /docs/ecosystem/synology/ Synology %}</li>
<li>
{% active_link /docs/ecosystem/hass-configurator/ HASS Configurator
{% active_link /docs/ecosystem/hass-configurator/ Configurator
%}
</li>
</ul>

View File

@ -1,6 +1,6 @@
---
title: "Abode Home Security"
description: "Instructions on integrating Abode home security with Home Assistant."
title: Abode
description: Instructions on integrating Abode home security with Home Assistant.
logo: abode.jpg
ha_category:
- Hub
@ -15,6 +15,8 @@ ha_category:
ha_release: 0.52
ha_iot_class: Cloud Push
ha_config_flow: true
ha_codeowners:
- '@shred86'
---
The `abode` integration will allow users to integrate their Abode Home Security systems into Home Assistant and use its alarm system and sensors to automate their homes.

View File

@ -1,6 +1,6 @@
---
title: "Acer Projector Switch"
description: "Instructions on how to integrate Acer Projector switches into Home Assistant."
title: Acer Projector
description: Instructions on how to integrate Acer Projector switches into Home Assistant.
logo: acer.png
ha_category:
- Multimedia

View File

@ -1,6 +1,6 @@
---
title: "Actiontec"
description: "Instructions on how to integrate Actiontec routers into Home Assistant."
title: Actiontec
description: Instructions on how to integrate Actiontec routers into Home Assistant.
logo: actiontec.png
ha_category:
- Presence Detection

View File

@ -1,6 +1,6 @@
---
title: "AdGuard Home"
description: "Instructions on how to integrate AdGuard Home with Home Assistant."
title: AdGuard Home
description: Instructions on how to integrate AdGuard Home with Home Assistant.
logo: adguard.png
ha_category:
- Network
@ -8,6 +8,9 @@ ha_category:
- Switch
ha_release: 0.95
ha_iot_class: Local Polling
ha_config_flow: true
ha_codeowners:
- '@frenck'
---
AdGuard Home is a network-wide ad- and tracker-blocking DNS server with parental

View File

@ -1,5 +1,5 @@
---
title: "ADS"
title: ADS
description: Connect Home Assistant to TwinCAT devices via the ADS interface
logo: beckhoff.png
ha_category:
@ -9,7 +9,7 @@ ha_category:
- Sensor
- Switch
- Cover
ha_release: "0.60"
ha_release: '0.60'
ha_iot_class: Local Push
---

View File

@ -1,6 +1,6 @@
---
title: AfterShip Sensor
description: "Instructions on how to set up AfterShip sensors within Home Assistant."
title: AfterShip
description: Instructions on how to set up AfterShip sensors within Home Assistant.
logo: aftership.png
ha_category:
- Postal Service

View File

@ -1,6 +1,6 @@
---
title: "Air Quality"
description: "Instructions on how to add air quality sensors with Home Assistant"
title: Air Quality
description: Instructions on how to add air quality sensors with Home Assistant
ha_release: 0.85
---
@ -19,4 +19,3 @@ The platforms cover the following levels (if they are available):
- The N2O (nitrogen oxide) level.
- The NO (nitrogen monoxide) level.
- The NO2 (nitrogen dioxide) level.

View File

@ -1,11 +1,14 @@
---
title: "Airly"
description: "Instructions on how to integrate Airly within Home Assistant."
title: Airly
description: Instructions on how to integrate Airly within Home Assistant.
logo: airly.png
ha_category:
- Health
ha_release: 0.101
ha_iot_class: Cloud Polling
ha_config_flow: true
ha_codeowners:
- '@bieniu'
---
The `airly` integration uses the [Airly](https://airly.eu/) web service as a source for air quality data for your location.

View File

@ -1,11 +1,13 @@
---
title: "AirVisual"
description: "Instructions on how to use AirVisual data within Home Assistant"
title: AirVisual
description: Instructions on how to use AirVisual data within Home Assistant
logo: airvisual.jpg
ha_category:
- Health
ha_release: 0.53
ha_iot_class: Cloud Polling
ha_codeowners:
- '@bachya'
---
The `airvisual` sensor platform queries the [AirVisual](https://airvisual.com/) API for air quality data. Data can be collected via latitude/longitude or by city/state/country. The resulting information creates sensors for the Air Quality Index (AQI), the human-friendly air quality level, and the main pollutant of that area. Sensors that conform to either/both the [U.S. and Chinese air quality standards](https://www.clm.com/publication.cfm?ID=366) can be created.
@ -163,4 +165,3 @@ Particulate (<= 10 μm) | PM10 | [EPA: Particulate Matter (PM) Pollution ](https
Ozone | O | [EPA: Ozone Pollution](https://www.epa.gov/ozone-pollution)
Sulpher Dioxide | SO2 | [EPA: Sulfur Dioxide (SO2) Pollution](https://www.epa.gov/so2-pollution)
Carbon Monoxide | CO | [EPA: Carbon Monoxide (CO) Pollution in Outdoor Air](https://www.epa.gov/co-pollution)

View File

@ -1,6 +1,6 @@
---
title: "Genie Aladdin Connect Cover"
description: "Instructions how to integrate Genie Aladdin Connect garage door covers into Home Assistant."
title: Aladdin Connect
description: Instructions how to integrate Genie Aladdin Connect garage door covers into Home Assistant.
logo: aladdin_connect.png
ha_category:
- Cover

View File

@ -1,11 +1,11 @@
---
title: "Alarm Control Panels"
description: "Instructions on how to integrate Alarm Control Panels into Home Assistant."
title: Alarm Control Panel
description: Instructions on how to integrate Alarm Control Panels into Home Assistant.
logo: home-assistant.png
ha_category:
- Alarm
ha_qa_scale: internal
ha_release: 0.7.3
ha_quality_scale: internal
---
Home Assistant can give you an interface with is similar to a classic alarm system.

View File

@ -1,6 +1,6 @@
---
title: "AlarmDecoder Alarm"
description: "Instructions on how to integrate a DSC/Honeywell alarm panel with Home Assistant using an AlarmDecoder device."
title: AlarmDecoder
description: Instructions on how to integrate a DSC/Honeywell alarm panel with Home Assistant using an AlarmDecoder device.
logo: alarmdecoder.png
ha_category:
- Alarm
@ -80,6 +80,11 @@ panel_display:
required: false
default: false
type: boolean
autobypass:
description: "If this is set to `true`, then when arming (home or away), it will automatically bypass all open zones (sending '6#')."
required: false
default: false
type: boolean
zones:
description: "AlarmDecoder has no way to tell us which zones are actually in use, so each zone must be configured in Home Assistant. For each zone, at least a name must be given. For more information on the available zone types, take a look at the [Binary Sensor](/integrations/alarmdecoder) docs. *Note: If no zones are specified, Home Assistant will not load any binary_sensor integrations.*"
required: false

View File

@ -1,6 +1,6 @@
---
title: "Alarm.com Alarm Control Panel"
description: "Instructions on how to integrate Alarm.com into Home Assistant."
title: Alarm.com
description: Instructions on how to integrate Alarm.com into Home Assistant.
logo: alarmdotcom.png
ha_category:
- Alarm

View File

@ -1,11 +1,11 @@
---
title: "Alert"
description: "Instructions on how to setup automatic alerts within Home Assistant."
title: Alert
description: Instructions on how to setup automatic alerts within Home Assistant.
logo: home-assistant.png
ha_category:
- Automation
ha_release: 0.38
ha_qa_scale: internal
ha_quality_scale: internal
---
The `alert` integration is designed to notify you when problematic issues arise.
@ -51,7 +51,7 @@ entity_id:
title:
description: >
A title to be used for the notification if the notifier supports it
with [template][template] support.
with [template](/docs/configuration/templating/) support.
required: false
type: template
state:
@ -80,13 +80,13 @@ skip_first:
message:
description: >
A message to be sent after an alert transitions from `off` to `on`
with [template][template] support.
with [template](/docs/configuration/templating/) support.
required: false
type: template
done_message:
description: >
A message sent after an alert transitions from `on` to `off` with
[template][template] support. Is only sent if an alert notification
A message sent after an alert transitions from `on` to `off` with
[template](/docs/configuration/templating/) support. Is only sent if an alert notification
was sent for transitioning from `off` to `on`.
required: false
type: template
@ -205,7 +205,7 @@ sent at 2:15, 2:45, 3:45, 4:45, etc., continuing every 60 minutes.
### Message Templates
It may be desirable to have the alert notifications include information
about the state of the entity. [Templates](/docs/configuration/templating/)
about the state of the entity. [Templates][template]
can be used in the message or name of the alert to make it more relevant.
The following will show for a plant how to include the problem `attribute`
of the entity.

View File

@ -19,7 +19,7 @@ The built-in Alexa integration allows you to integrate Home Assistant into Alexa
- Amazon Developer Account. You can sign on [here](https://developer.amazon.com).
- An [AWS account](https://aws.amazon.com/free/) is need if you want to use Alexa Custom Skill API. Part of your Alexa Custom Skill will be hosted on [AWS Lambda](https://aws.amazon.com/lambda/pricing/). However you don't need worry the cost, AWS Lambda allow free to use up to 1 millions requests and 1GB outbound data transfer per month.
- The Alexa Custom Skill API also needs your Home Assistant instance can be accessed from Internet. We strongly suggest you host HTTPS server and use validation certificate. Read more on [our blog](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) about how to set up encryption for Home Assistant. When running Hass.io using the [Duck DNS](/addons/duckdns/) add-on is the easiest method.
- The Alexa Custom Skill API also needs your Home Assistant instance to be accessible from the internet via HTTPS on port 443 using a certificate signed by [an Amazon approved certificate authority](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReport), this is so account linking can take place. Read more on [our blog](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) about how to set up encryption for Home Assistant. When running Hass.io using the [Duck DNS](/addons/duckdns/) add-on is the easiest method.
### Create Your Amazon Alexa Custom Skill
@ -94,8 +94,9 @@ Alexa can link your Amazon account to your Home Assistant account. Therefore Hom
- Find the skill you just created and click `Edit` in the `Actions` column.
- Click `ACCOUNT LINKING` in the left navigation bar of build page
- Input all information required. Assuming your Home Assistant can be accessed by https://[YOUR HOME ASSISTANT URL:PORT]
* `Authorization URI`: https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize
* `Access Token URI`: https://[YOUR HOME ASSISTANT URL:PORT]/auth/token
* `Authorization URI`: https://[YOUR HOME ASSISTANT URL]/auth/authorize
* `Access Token URI`: https://[YOUR HOME ASSISTANT URL]/auth/token
- Note: you must use a valid/trusted SSL Certificate and port 443 for account linking to work
* `Client ID`:
- https://pitangui.amazon.com/ if you are in US
- https://layla.amazon.com/ if you are in EU

View File

@ -1,11 +1,14 @@
---
title: "Amazon Alexa"
description: "Instructions on how to connect Alexa/Amazon Echo to Home Assistant."
title: Amazon Alexa
description: Instructions on how to connect Alexa/Amazon Echo to Home Assistant.
logo: amazon-alexa.png
ha_category:
- Voice
featured: true
ha_release: "0.10"
ha_release: '0.10'
ha_codeowners:
- '@home-assistant/cloud'
- '@ochlocracy'
---
## Automatic setup via Home Assistant Cloud

View File

@ -37,7 +37,7 @@ For Home Assistant Cloud Users, documentation can be found [here](https://www.na
- Amazon Developer Account. You can sign on [here](https://developer.amazon.com).
- An [AWS account](https://aws.amazon.com/free/) is need if you want to use Smart Home Skill API. Part of your Smart Home Skill will be hosted on [AWS Lambda](https://aws.amazon.com/lambda/pricing/). However you don't need worry the cost, AWS Lambda allow free to use up to 1 millions requests and 1GB outbound data transfer per month.
- Smart Home API also needs your Home Assistant instance can be accessed from Internet. We strongly suggest you host HTTPS server and use validation certificate. Read more on [our blog](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) about how to set up encryption for Home Assistant. When running Hass.io using the [Duck DNS](/addons/duckdns/) add-on is the easiest method.
- The Smart Home API also needs your Home Assistant instance to be accessible from the internet via HTTPS on port 443 using a certificate signed by [an Amazon approved certificate authority](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReport), this is so account linking can take place. Read more on [our blog](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) about how to set up encryption for Home Assistant. When running Hass.io using the [Duck DNS](/addons/duckdns/) add-on is the easiest method.
### Create Your Amazon Alexa Smart Home Skill
@ -171,8 +171,9 @@ Alexa can link your Amazon account to your Home Assistant account. Therefore Hom
- Find the skill you just created, click `Edit` link in the `Actions` column.
- Click `ACCOUNT LINKING` in the left navigation bar of build page
- Input all information required. Assuming your Home Assistant can be accessed by https://[YOUR HOME ASSISTANT URL:PORT]
* `Authorization URI`: https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize
* `Access Token URI`: https://[YOUR HOME ASSISTANT URL:PORT]/auth/token
* `Authorization URI`: https://[YOUR HOME ASSISTANT URL]/auth/authorize
* `Access Token URI`: https://[YOUR HOME ASSISTANT URL]/auth/token
- Note: you must use a valid/trusted SSL Certificate and port 443 for account linking to work
* `Client ID`:
- https://pitangui.amazon.com/ if you are in US
- https://layla.amazon.com/ if you are in EU
@ -206,6 +207,7 @@ Example configuration:
```yaml
alexa:
smart_home:
locale: en-US
endpoint: https://api.amazonalexa.com/v3/events
client_id: !secret alexa_client_id
client_secret: !secret alexa_client_secret
@ -225,6 +227,8 @@ alexa:
display_categories: LIGHT
```
Set the `locale` to the locale of your Alexa devices. Supported locales are: `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-MX`, `fr-CA`, `fr-FR`, `it-IT`, `ja-JP`. Default is `en-US`.
The `endpoint`, `client_id` and `client_secret` are optional, and are only required if you want to enable Alexa's proactive mode (i.e. "Send Alexa Events" enabled). Please note the following if you want to enable proactive mode:
- There are different endpoint URLs, depending on the region of your skill. Please check the available endpoints at <https://developer.amazon.com/docs/smarthome/send-events-to-the-alexa-event-gateway.html#endpoints>

View File

@ -1,11 +1,15 @@
---
title: "Almond"
description: "Instructions on how to setup Almond within Home Assistant."
title: Almond
description: Instructions on how to setup Almond within Home Assistant.
logo: almond.png
ha_category:
- Voice
ha_iot_class: Local Polling
ha_release: "0.102"
ha_release: '0.102'
ha_config_flow: true
ha_codeowners:
- '@gcampax'
- '@balloob'
---
[Almond](https://almond.stanford.edu/) is an open, privacy-preserving virtual assistant by [Stanford Open Virtual Assistant Lab](https://oval.cs.stanford.edu/). It allows you, among other things, to control Home Assistant using natural language. Once installed, it will be available on Lovelace via the microphone icon in the top right.

View File

@ -1,11 +1,13 @@
---
title: "Alpha Vantage"
description: "Instructions on how to setup Alpha Vantage within Home Assistant."
title: Alpha Vantage
description: Instructions on how to setup Alpha Vantage within Home Assistant.
logo: alpha_vantage.png
ha_category:
- Finance
ha_iot_class: Cloud Polling
ha_release: "0.60"
ha_release: '0.60'
ha_codeowners:
- '@fabaff'
---
The `alpha_vantage` sensor platform uses [Alpha Vantage](https://www.alphavantage.co) to monitor the stock market. This platform also provides detail about exchange rates.
@ -89,4 +91,3 @@ sensor:
to: USD
name: Bitcoin
```

View File

@ -1,10 +1,12 @@
---
title: "Amazon Polly"
description: "Instructions on how to setup Amazon Polly with Home Assistant."
title: Amazon Polly
description: Instructions on how to setup Amazon Polly with Home Assistant.
logo: polly.png
ha_category:
- Text-to-speech
ha_release: 0.37
ha_codeowners:
- '@robbiet480'
---
The `amazon_polly` text-to-speech platform that works with [Amazon Polly](https://aws.amazon.com/polly/) to create the spoken output.

View File

@ -1,10 +1,13 @@
---
title: "Ambiclimate A/C controller"
description: "Instructions on how to integrate Ambiclimate A/C controller into Home Assistant."
title: Ambiclimate
description: Instructions on how to integrate Ambiclimate A/C controller into Home Assistant.
logo: ambiclimate.png
ha_category: Climate
ha_release: 0.93
ha_iot_class: Cloud Polling
ha_config_flow: true
ha_codeowners:
- '@danielhiversen'
---
Integrates [Ambiclimate](https://ambiclimate.com/) Air Conditioning controller into Home Assistant.

View File

@ -1,11 +1,14 @@
---
title: "Ambient Weather Station Sensor"
description: "How to integrate Ambient Weather station within Home Assistant."
title: Ambient Weather Station
description: How to integrate Ambient Weather station within Home Assistant.
logo: ambient_weather.png
ha_category:
- Weather
ha_release: 0.85
ha_iot_class: Cloud Push
ha_config_flow: true
ha_codeowners:
- '@bachya'
---
The `Ambient Weather Station` integration retrieves local weather information

View File

@ -1,13 +1,12 @@
---
title: "Amcrest IP Camera"
description: "Instructions on how to integrate Amcrest IP cameras within Home Assistant."
title: Amcrest
description: Instructions on how to integrate Amcrest IP cameras within Home Assistant.
logo: amcrest.png
ha_category:
- Hub
- Binary Sensor
- Camera
- Sensor
- Switch
ha_iot_class: Local Polling
ha_release: 0.49
---
@ -19,7 +18,6 @@ There is currently support for the following device types within Home Assistant:
- Binary Sensor
- Camera
- Sensor
- Switch (deprecated)
## Configuration
@ -117,34 +115,12 @@ sensors:
type: list
default: None
keys:
motion_detector:
description: >
Return `true`/`false` when motion is detected.
**Note:** The motion_detector sensor is deprecated and will be removed in a future release.
Use **binary_sensors** option **motion_detected** instead.
sdcard:
description: Return the SD card usage by reporting the total and used space.
ptz_preset:
description: >
Return the number of PTZ preset positions
configured for the given camera.
switches:
description: >
Switches to display in the frontend.
**Note:** Switches are deprecated and will be removed in a future release.
Use services and attributes instead.
The following switches can be monitored:
required: false
type: list
default: None
keys:
motion_detection:
description: Enable/disable motion detection setting.
motion_recording:
description: Enable/disable recording on motion detection setting.
control_light:
description: >
Automatically control the camera's indicator light, turning it on if the audio or video streams are enabled, and turning it off if both streams are disabled.
@ -254,7 +230,3 @@ amcrest:
```
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.
<div class='note warning'>
In previous versions, switch devices in setups with multiple cameras, would not have specific entity ID causing them to change randomly after each Home Assistant restart. The current version adds the name of the camera at the end of the switch entity ID, making it more specific and consistent and causes the name option to be required in a multi-camera system. This behavior matches the sensor behavior of the Amcrest component. Because of this, older automations may require updates to the entity ID.
</div>

View File

@ -1,12 +1,12 @@
---
title: "Ampio Smog"
description: "Instructions on how to setup Ampio Smog sensors in Home Assistant."
title: Ampio Smart Smog System
description: Instructions on how to setup Ampio Smog sensors in Home Assistant.
logo: ampio_smog.png
ha_category:
- Health
- Sensor
ha_release: 0.92
ha_iot_class: "Cloud Polling"
ha_iot_class: Cloud Polling
---
The `ampio` air quality platform will query the open data API of [ampio.pl](http://smog1.ampio.pl:3050/) to monitor air quality sensor station.
@ -37,4 +37,3 @@ name:
default: Station name
type: string
{% endconfiguration %}

View File

@ -1,6 +1,6 @@
---
title: "Android IP Webcam"
description: "Connect Android devices as an IP webcam to Home Assistant"
title: Android IP Webcam
description: Connect Android devices as an IP webcam to Home Assistant
logo: android_ip_webcam.png
ha_category:
- Hub
@ -8,7 +8,7 @@ ha_category:
- Camera
- Sensor
- Switch
ha_release: "0.40"
ha_release: '0.40'
ha_iot_class: Local Polling
---

View File

@ -1,11 +1,13 @@
---
title: "Android TV"
description: "Instructions on how to integrate Android TV and Fire TV devices into Home Assistant."
title: Android TV
description: Instructions on how to integrate Android TV and Fire TV devices into Home Assistant.
logo: androidtv.png
ha_category:
- Media Player
ha_release: 0.7.6
ha_iot_class: Local Polling
ha_codeowners:
- '@JeffLIrion'
---
The `androidtv` platform allows you to control an Android TV device or [Amazon Fire TV](https://www.amazon.com/b/?node=8521791011) device.
@ -61,7 +63,7 @@ adbkey:
required: false
type: string
adb_server_ip:
description: The IP address of the ADB server. If this is provided, the integration will utilize an [ADB server](#1-adb-server) to communicate with the device.
description: The IP address of the ADB server. If this is provided, the integration will utilize an [ADB server](#2-adb-server) to communicate with the device.
required: false
type: string
adb_server_port:
@ -70,7 +72,7 @@ adb_server_port:
default: 5037
type: integer
get_sources:
description: Whether or not to retrieve the running apps as the list of sources for Fire TV devices; not used for Android TV devices.
description: Whether or not to retrieve the running apps as the list of sources.
required: false
default: true
type: boolean
@ -159,18 +161,18 @@ This integration works by sending ADB commands to your Android TV / Fire TV devi
When connecting to your device for the first time, a dialog will appear on your Android TV / Fire TV asking you to approve the connection. Check the box that says "always allow connections from this device" and hit OK.
</div>
### 1. ADB Server
### 1. Python ADB Implementation
You can use an ADB server to connect to your Android TV and Fire TV devices.
For Hass.io users, you can install the [Android Debug Bridge](https://github.com/hassio-addons/addon-adb/blob/master/README.md) addon. Using this approach, Home Assistant will send the ADB commands to the server, which will then send them to the Android TV / Fire TV device and report back to Home Assistant. To use this option, add the `adb_server_ip` option to your configuration. If you are running the server on the same machine as Home Assistant, you can use `127.0.0.1` for this value.
### 2. Python ADB Implementation
The second option is to connect to your device using the `adb-shell` Python package. As of Home Assistant 0.101, if a key is needed for authentication and it is not provided by the `adbkey` configuration option, then Home Assistant will generate a key for you.
The default approach is to connect to your device using the `adb-shell` Python package. As of Home Assistant 0.101, if a key is needed for authentication and it is not provided by the `adbkey` configuration option, then Home Assistant will generate a key for you.
Prior to Home Assistant 0.101, this approach did not work well for newer devices. Efforts have been made to resolve these issues, but if you experience problems then you should use the ADB server option.
### 2. ADB Server
The second option is to use an ADB server to connect to your Android TV and Fire TV devices.
For Hass.io users, you can install the [Android Debug Bridge](https://github.com/hassio-addons/addon-adb/blob/master/README.md) addon. Using this approach, Home Assistant will send the ADB commands to the server, which will then send them to the Android TV / Fire TV device and report back to Home Assistant. To use this option, add the `adb_server_ip` option to your configuration. If you are running the server on the same machine as Home Assistant, you can use `127.0.0.1` for this value.
## ADB Troubleshooting
If the setup for your Android TV or Fire TV device fails, then there is probably an issue with your ADB connection. Here are some possible causes.
@ -185,13 +187,15 @@ If the setup for your Android TV or Fire TV device fails, then there is probably
5. Some Android TV devices (e.g., Philips TVs running Android TV) only accept the initial ADB connection request over their Wi-Fi interface. If you have the TV wired, you need to connect it to WiFi and try the initial connection again. Once the authentication has been granted via Wi-Fi, you can connect to the TV over the wired interface as well.
6. If you are using the [Python ADB implementation](#2-python-adb-implementation) approach, as mentioned above, there may be some issues with newer devices. In this case, you should use the [ADB server](#1-adb-server) approach instead.
6. If your device drops off WiFi, breaking the ADB connection and causing the entity to become unavailable in Home Assistant, you could install a wake lock utility (such as [Wakelock](https://github.com/d4rken/wakelock-revamp)) to prevent this from happening. Some users have reported this problem with Xiaomi Mi Box devices.
7. If you are using the [Python ADB implementation](#1-python-adb-implementation) approach, as mentioned above, there may be some issues with newer devices. In this case, you should use the [ADB server](#2-adb-server) approach instead.
## Services
### (Fire TV devices only) `media_player.select_source`
### `media_player.select_source`
For Fire TV devices, you can launch an app using the `media_player.select_source` command. Simply provide the app ID as the `source`. You can also stop an app by prefixing the app ID with a `!`. For example, you could define [scripts](/docs/scripts) to start and stop Netflix as follows:
You can launch an app on your device using the `media_player.select_source` command. Simply provide the app ID as the `source`. You can also stop an app by prefixing the app ID with a `!`. For example, you could define [scripts](/docs/scripts) to start and stop Netflix as follows:
```yaml
start_netflix:
@ -247,6 +251,24 @@ You can also use the command `GET_PROPERTIES` to retrieve the properties used by
A list of various intents can be found [here](https://gist.github.com/mcfrojd/9e6875e1db5c089b1e3ddeb7dba0f304).
### `androidtv.download` and `androidtv.upload`
You can use the `androidtv.download` service to download a file from your Android TV / Fire TV device to your Home Assistant instance.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name of Android TV / Fire TV entity.
| `device_path` | no | The filepath on the Android TV / Fire TV device.
| `local_path` | no | The filepath on your Home Assistant instance.
Similarly, you can use the `androidtv.upload` service to upload a file from Home Assistant instance to Android TV / Fire TV devices.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name(s) of Android TV / Fire TV entities.
| `device_path` | no | The filepath on the Android TV / Fire TV device.
| `local_path` | no | The filepath on your Home Assistant instance.
## Custom State Detection
The Android TV integration works by polling the Android TV / Fire TV device at a regular interval and collecting a handful of properties. Unfortunately, there is no standard API for determining the state of the device to which all apps adhere. Instead, the backend `androidtv` package uses three of the properties that it collects to determine the state: `audio_state`, `media_session_state`, and `wake_lock_size`. The correct logic for determining the state differs depending on the current app, and the backend `androidtv` package implements app-specific state detection logic for a handful of apps. Of course, it is not feasible to implement custom logic for each and every app in the `androidtv` package. Moreover, the correct state detection logic may differ across devices and device configurations.

View File

@ -1,11 +1,11 @@
---
title: "ANEL PwrCtrl Switch"
description: "Instructions on how to integrate ANEL PwrCtrl switches within Home Assistant."
title: Anel NET-PwrCtrl
description: Instructions on how to integrate ANEL PwrCtrl switches within Home Assistant.
logo: anel.png
ha_category:
- Switch
ha_iot_class: Local Polling
ha_release: "0.30"
ha_release: '0.30'
---
The `anel_pwrctrl` switch platform allows you to control [ANEL PwrCtrl](https://anel-elektronik.de/SITE/produkte/produkte.htm) devices.

View File

@ -1,6 +1,6 @@
---
title: "Anthem A/V Receivers"
description: "Instructions on how to integrate Anthem A/V Receivers into Home Assistant."
title: Anthem A/V Receivers
description: Instructions on how to integrate Anthem A/V Receivers into Home Assistant.
logo: anthemav.png
ha_category:
- Media Player

View File

@ -1,10 +1,12 @@
---
title: "Apache Kafka"
description: "Send data and events to Apache Kafka."
title: Apache Kafka
description: Send data and events to Apache Kafka.
logo: apache_kafka.png
ha_category:
- History
ha_release: 0.97
ha_codeowners:
- '@bachya'
---
The `apache_kafka` integration sends all state changes to a

View File

@ -1,6 +1,6 @@
---
title: "APCUPSd"
description: "Instructions on how to integrate APCUPSd status with Home Assistant."
title: APCUPSd
description: Instructions on how to integrate APCUPSd status with Home Assistant.
logo: apcupsd.png
ha_category:
- System Monitor
@ -47,7 +47,7 @@ port:
<div class='note'>
If you get `ConnectionRefusedError: Connection refused` errors in the Home assistant logs, ensure the [APCUPSd](http://www.apcupsd.org/) configuration directives used by its Network Information Server is set to permit connections from all addresses [NISIP 0.0.0.0](http://www.apcupsd.org/manual/manual.html#configuration-directives-used-by-the-network-information-server), else non-local addesses will not connect. This includes Hass.io running in Docker, even when hosted on the same machine or a virtual machine.
If you get `ConnectionRefusedError: Connection refused` errors in the Home Assistant logs, ensure the [APCUPSd](http://www.apcupsd.org/) configuration directives used by its Network Information Server is set to permit connections from all addresses [NISIP 0.0.0.0](http://www.apcupsd.org/manual/manual.html#configuration-directives-used-by-the-network-information-server), else non-local addesses will not connect. This includes Hass.io running in Docker, even when hosted on the same machine or a virtual machine.
</div>

View File

@ -1,11 +1,13 @@
---
title: "API"
description: "Instructions on how to setup the RESTful API within Home Assistant."
title: Home Assistant API
description: Instructions on how to setup the RESTful API within Home Assistant.
logo: home-assistant.png
ha_category:
- Other
ha_qa_scale: internal
ha_release: 0.7
ha_quality_scale: internal
ha_codeowners:
- '@home-assistant/core'
---
The `api` integration exposes a RESTful API and allows one to interact with a Home Assistant instance that is running headless. This integration depends on the [`http` integration](/integrations/http/).

View File

@ -1,6 +1,6 @@
---
title: "APNS"
description: "Instructions on how to add APNS notifications to Home Assistant."
title: Apple Push Notification Service (APNS)
description: Instructions on how to add APNS notifications to Home Assistant.
logo: apple.png
ha_category:
- Notifications
@ -48,7 +48,7 @@ sandbox:
The APNS platform will register two services, `notify.NOTIFIER_NAME` and `apns.apns_NOTIFIER_NAME`.
### notify.apns_NOTIFIER_NAME
### apns.apns_NOTIFIER_NAME
This service will register device IDs with Home Assistant. In order to receive a notification a device must be registered. The app on the device can use this service to send an ID to Home Assistant during startup, the ID will be stored in `[NOTIFIER_NAME]_apns.yaml`.

View File

@ -1,6 +1,6 @@
---
title: "Apple TV"
description: "Instructions on how to integrate Apple TV devices into Home Assistant."
title: Apple TV
description: Instructions on how to integrate Apple TV devices into Home Assistant.
logo: apple.png
ha_category:
- Multimedia
@ -134,12 +134,12 @@ Restart Home Assistant, and you should now be able to use `play_url` as before.
### My Apple TV turns on when I restart Home Assistant
The Apple TV will automatically turn on if a request is sent to it, e.g., if a button is pressed, something is streamed to it via AirPlay or if current state (currently playing) is accessed. This is how Apple has designed it, and it will cause problems if you are using HDMI CEC. Every time Home Assistant is started, a new request is sent to the device to figure out what is currently playing. When using CEC, this will wake up your TV and other devices you have configured.
The Apple TV will automatically turn on if a request is sent to it, e.g., if a button is pressed, something is streamed to it via AirPlay or if current state (currently playing) is accessed. This is how Apple has designed it, and it will cause problems if you are using HDMI-CEC. Every time Home Assistant is started, a new request is sent to the device to figure out what is currently playing. When using CEC, this will wake up your TV and other devices you have configured.
So, if your TV is randomly turning on, this is probably the reason. As stated, this is by design, and there is no real fix for it. There's also no known way to turn off the Apple TV via the protocol used for communication. You have the following options:
- Do not use this platform
- Disable HDMI CEC on your Apple TV
- Disable HDMI-CEC on your Apple TV
- Use "fake standby"
The first two points are quite obvious. Fake standby is a concept implemented in this platform that disables all requests to the device and makes it appear as being "off" in the web interface. This will make sure that the device is not woken up, but it will of course not show any information or allow you to control it. It is however easy to turn it on (or off) in the web interface or to use an automation with `turn_on`. To make it more useful, you can write automations that turn it on or off depending on some other device, like the input source on your receiver.
@ -156,9 +156,9 @@ Turning the device on/off in the user interface will *not* turn the physical dev
To play media on an Apple TV with device authentication enabled (e.g., ATV4 with tvOS 10.2+), Home Assistant must be properly authenticated. This method starts the process and presents the credentials needed for playback as a persistent notification. Please see guide above for usage.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | yes | String or list of strings that point at `entity_id`s of Apple TVs.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ------------------------------------------------------------------ |
| `entity_id` | yes | String or list of strings that point at `entity_id`s of Apple TVs. |
### Service `apple_tv_scan`

View File

@ -1,10 +1,12 @@
---
title: "Apprise"
description: "Instructions on how to add Apprise notifications to Home Assistant."
title: Apprise
description: Instructions on how to add Apprise notifications to Home Assistant.
logo: apprise.png
ha_category:
- Notifications
ha_release: 0.101
ha_codeowners:
- '@caronc'
---
The [Apprise service](https://github.com/caronc/apprise/) is an all-in-one solution to open up Home Assistant to _just about_ every Notification platform (such as Amazon SNS, Discord, Telegram, Slack, MSTeams, Twilio, etc.)

View File

@ -1,10 +1,12 @@
---
title: "APRS"
description: "Instructions on how to use APRS to track devices in Home Assistant."
title: APRS
description: Instructions on how to use APRS to track devices in Home Assistant.
logo: aprs.png
ha_release: 0.95
ha_category: Presence Detection
ha_iot_class: Cloud Push
ha_codeowners:
- '@PhilRW'
---
The `aprs` [(Automatic Packet Reporting System)](https://en.wikipedia.org/wiki/Automatic_Packet_Reporting_System) device tracker integration connects to the [APRS-IS](http://aprs-is.net/) network for tracking amateur radio devices.

View File

@ -1,12 +1,12 @@
---
title: "AquaLogic"
description: "Instructions on how to integrate an AquaLogic controller within Home Assistant."
title: AquaLogic
description: Instructions on how to integrate an AquaLogic controller within Home Assistant.
logo: hayward.png
ha_category:
- Hub
- Sensor
- Switch
ha_release: "0.80"
ha_release: '0.80'
ha_iot_class: Local Push
---

View File

@ -1,6 +1,6 @@
---
title: "Sharp Aquos TV"
description: "Instructions on how to integrate a Sharp Aquos TV into Home Assistant."
title: Sharp Aquos TV
description: Instructions on how to integrate a Sharp Aquos TV into Home Assistant.
logo: sharp_aquos.png
ha_category:
- Media Player

View File

@ -1,10 +1,12 @@
---
title: "Arcam FMJ Receivers"
description: "Instructions on how to integrate Arcam FMJ Receivers into Home Assistant."
title: Arcam FMJ Receivers
description: Instructions on how to integrate Arcam FMJ Receivers into Home Assistant.
logo: arcam.svg
ha_category: Media Player
ha_release: 0.96
ha_iot_class: Local Polling
ha_codeowners:
- '@elupus'
---
The `arcam_fmj` integration allows you to control [Arcam FMJ Receveivers](https://www.arcam.co.uk/range/fmj.htm) from Home Assistant.

View File

@ -1,6 +1,6 @@
---
title: "Arduino"
description: "Instructions on how to setup an Arduino boards within Home Assistant."
title: Arduino
description: Instructions on how to setup an Arduino boards within Home Assistant.
logo: arduino.png
ha_category:
- DIY
@ -8,6 +8,8 @@ ha_category:
- Switch
ha_release: pre 0.7
ha_iot_class: Local Polling
ha_codeowners:
- '@fabaff'
---
The [Arduino](https://www.arduino.cc/) device family are microcontroller boards that are often based on the ATmega328 chip. They come with digital input/output pins (some can be used as PWM outputs), analog inputs, and a USB connection.

View File

@ -1,6 +1,6 @@
---
title: "aREST"
description: "Instructions on how to integrate aREST within Home Assistant."
title: aREST
description: Instructions on how to integrate aREST within Home Assistant.
logo: arest.png
ha_category:
- DIY
@ -9,6 +9,8 @@ ha_category:
- Switch
ha_iot_class: Local Polling
ha_release: 0.9
ha_codeowners:
- '@fabaff'
---
There is currently support for the following device types within Home Assistant:

View File

@ -1,6 +1,6 @@
---
title: "Arlo"
description: "Instructions on how to integrate your Netgear Arlo cameras within Home Assistant."
title: Arlo
description: Instructions on how to integrate your Netgear Arlo cameras within Home Assistant.
logo: arlo.png
ha_category:
- Hub

View File

@ -1,13 +1,12 @@
---
title: "Aruba"
description: "Instructions on how to integrate Aruba routers into Home Assistant."
title: Aruba
description: Instructions on how to integrate Aruba routers into Home Assistant.
logo: aruba.png
ha_category:
- Presence Detection
ha_release: 0.7
---
This platform allows you to detect presence by looking at connected devices to an [Aruba Instant](https://www.arubanetworks.com/products/networking/aruba-instant/) device.
Supported devices (tested):

View File

@ -1,6 +1,6 @@
---
title: "ARWN Sensor"
description: "Instructions on how to integrate ARWN within Home Assistant."
title: Ambient Radio Weather Network
description: Instructions on how to integrate ARWN within Home Assistant.
ha_category:
- Sensor
ha_release: 0.31

View File

@ -1,6 +1,6 @@
---
title: "Asterisk Call Data Recorder"
description: "Instructions on how to integrate an Asterisk CDR within Home Assistant."
title: Asterisk Call Detail Records
description: Instructions on how to integrate an Asterisk CDR within Home Assistant.
logo: asterisk.png
ha_category:
- Mailbox

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