Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2021-02-09 12:27:50 +01:00
commit 3feb54c3c7
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
192 changed files with 1351 additions and 922 deletions

View File

@ -1,36 +0,0 @@
FROM ruby:2.6
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Use Bash as the default shell
ENV SHELL=/bin/bash
# Set an environment variable to be able to detect we are in dev container
ENV DEVCONTAINER=true
# Locale env vars
ENV \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# Install git, process tools
RUN apt update \
&& apt-get install -y --no-install-recommends \
ack \
git \
locales \
procps \
&& echo "en_US UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& echo 'export PS1="\\w\$ "' > /root/.bashrc \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Install the specific version of bundler we need
RUN gem install bundler -v 2.0.1
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog

View File

@ -1,8 +1,10 @@
{ {
"name": "home-assistant.io", "name": "home-assistant.io",
"dockerFile": "Dockerfile", "context": "..",
"dockerFile": "../Dockerfile",
"appPort": [4000], "appPort": [4000],
"postCreateCommand": "bundle install", "postCreateCommand": "bundle install && npm install",
"containerEnv": {"DEVCONTAINER": "true"},
"extensions": [ "extensions": [
"davidanson.vscode-markdownlint", "davidanson.vscode-markdownlint",
"editorconfig.editorconfig", "editorconfig.editorconfig",
@ -17,6 +19,6 @@
"errorLens.gutterIconsEnabled": true, "errorLens.gutterIconsEnabled": true,
"errorLens.addAnnotationTextPrefixes": false, "errorLens.addAnnotationTextPrefixes": false,
"errorLens.enabledDiagnosticLevels": ["error", "warning"], "errorLens.enabledDiagnosticLevels": ["error", "warning"],
"terminal.integrated.shell.linux": "/bin/bash" "terminal.integrated.shell.linux": "/usr/bin/zsh",
} }
} }

View File

@ -8,7 +8,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v3.0.15 - uses: actions/stale@v3.0.16
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60 days-before-stale: 60

View File

@ -14,7 +14,7 @@ jobs:
with: with:
node-version: 12.x node-version: 12.x
- name: Setup NPM cache - name: Setup NPM cache
uses: actions/cache@v2 uses: actions/cache@v2.1.4
with: with:
path: ~/.npm path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }} key: npm-${{ hashFiles('**/package-lock.json') }}
@ -37,7 +37,7 @@ jobs:
with: with:
node-version: 12.x node-version: 12.x
- name: Setup NPM cache - name: Setup NPM cache
uses: actions/cache@v2 uses: actions/cache@v2.1.4
with: with:
path: ~/.npm path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }} key: npm-${{ hashFiles('**/package-lock.json') }}
@ -61,7 +61,7 @@ jobs:
with: with:
ruby-version: 2.6 ruby-version: 2.6
- name: Setup Ruby Gems cache - name: Setup Ruby Gems cache
uses: actions/cache@v2 uses: actions/cache@v2.1.4
with: with:
path: vendor/bundle path: vendor/bundle
key: gems-${{ hashFiles('**/Gemfile.lock') }} key: gems-${{ hashFiles('**/Gemfile.lock') }}
@ -73,7 +73,7 @@ jobs:
bundle config path vendor/bundle bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 bundle install --jobs 4 --retry 3
- name: Setting up Jekyll cache - name: Setting up Jekyll cache
uses: actions/cache@v2 uses: actions/cache@v2.1.4
with: with:
path: source/.jekyll-cache path: source/.jekyll-cache
key: jekyll-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/_config.yml') }} key: jekyll-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/_config.yml') }}

29
Dockerfile Normal file
View File

@ -0,0 +1,29 @@
ARG VARIANT=2.6
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
# Install node
COPY .nvmrc /tmp/.nvmrc
RUN \
su vscode -c \
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"
# Locale env vars
ENV \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# Install tools
RUN \
apt update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ack \
&& echo "en_US UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Install the specific version of bundler we need
COPY Gemfile.lock ./
RUN gem install bundler -v `awk 'c&&c--;/BUNDLED WITH/{c=1}' Gemfile.lock`

View File

@ -8,6 +8,8 @@ group :development do
gem 'compass', '1.0.3' gem 'compass', '1.0.3'
gem 'sass-globbing', '1.1.5' gem 'sass-globbing', '1.1.5'
gem 'stringex', '2.8.5' gem 'stringex', '2.8.5'
# > 2.1.0 causes slowdowns https://github.com/sass/sassc-ruby/issues/189
gem 'sassc', '2.1.0'
end end
group :jekyll_plugins do group :jekyll_plugins do

View File

@ -99,9 +99,9 @@ GEM
sass (3.4.25) sass (3.4.25)
sass-globbing (1.1.5) sass-globbing (1.1.5)
sass (>= 3.1) sass (>= 3.1)
sassc (2.4.0) sassc (2.1.0)
ffi (~> 1.9) ffi (~> 1.9)
sassc (2.4.0-x64-mingw32) sassc (2.1.0-x64-mingw32)
ffi (~> 1.9) ffi (~> 1.9)
sinatra (2.1.0) sinatra (2.1.0)
mustermann (~> 1.0) mustermann (~> 1.0)
@ -133,6 +133,7 @@ DEPENDENCIES
nokogiri (= 1.11.1) nokogiri (= 1.11.1)
rake (= 13.0.3) rake (= 13.0.3)
sass-globbing (= 1.1.5) sass-globbing (= 1.1.5)
sassc (= 2.1.0)
sinatra (= 2.1.0) sinatra (= 2.1.0)
stringex (= 2.8.5) stringex (= 2.8.5)
tzinfo (~> 2.0) tzinfo (~> 2.0)

View File

@ -60,7 +60,8 @@ task :preview, :listen do |t, args|
listen_addr = args[:listen] || '127.0.0.1' listen_addr = args[:listen] || '127.0.0.1'
listen_addr = '0.0.0.0' unless ENV['DEVCONTAINER'].nil? listen_addr = '0.0.0.0' unless ENV['DEVCONTAINER'].nil?
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}" puts "Starting to watch source with Jekyll and Compass."
puts "Now listening on http://localhost:#{server_port}"
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental") jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental")
compassPid = Process.spawn("compass watch") compassPid = Process.spawn("compass watch")

View File

@ -102,8 +102,8 @@ social:
# Home Assistant release details # Home Assistant release details
current_major_version: 2021 current_major_version: 2021
current_minor_version: 2 current_minor_version: 2
current_patch_version: 0 current_patch_version: 2
date_released: 2021-02-03 date_released: 2021-02-09
# Either # or the anchor link to latest release notes in the blog post. # Either # or the anchor link to latest release notes in the blog post.
# Must be prefixed with a # and have double quotes around it. # Must be prefixed with a # and have double quotes around it.

179
package-lock.json generated
View File

@ -104,9 +104,9 @@
"dev": true "dev": true
}, },
"@textlint/ast-tester": { "@textlint/ast-tester": {
"version": "2.3.1", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/@textlint/ast-tester/-/ast-tester-2.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/ast-tester/-/ast-tester-2.3.2.tgz",
"integrity": "sha512-L9M2VNTYJ5sVdkPs9jH7s01Gg900Nuk7m9zQmCz9WFa3YyzJFEd7GCSmAvLMgX31jw5bbvvmj7DngymlP+PahQ==", "integrity": "sha512-4e1kyqsHks5POcQmuh7ITVrU/dbYyRUfQarQbeVRPP271n2HnlgnoYyZ10yV2Sb/Ksw+lQf7DPSnwNewXdCWww==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -121,9 +121,9 @@
} }
}, },
"@textlint/ast-traverse": { "@textlint/ast-traverse": {
"version": "2.3.1", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/@textlint/ast-traverse/-/ast-traverse-2.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/ast-traverse/-/ast-traverse-2.3.2.tgz",
"integrity": "sha512-uOFKqm3M9by55Zl2ryZ7jOSiLdLhDmVgX0IG/MJfGKY1a/MSyt5qwy9cvZNcob6hNCPeRMW8boAH2uRJOwRcoQ==", "integrity": "sha512-Dt1s/6x0XWhUNFH2rAa9gL6ODtq232BZuBHuHiOg+SrVwzl+VjOfa3fMQ0LoYixGSyDtwqAlksWcC0KyLz0eSw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -138,22 +138,22 @@
} }
}, },
"@textlint/feature-flag": { "@textlint/feature-flag": {
"version": "3.3.1", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/@textlint/feature-flag/-/feature-flag-3.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/feature-flag/-/feature-flag-3.3.2.tgz",
"integrity": "sha512-0a1UopFf30UrmEDKFNATXlotMqwbLGjJa1GTuljL/AKn2Adz7rPawclW4pHf/b//K7Da5GOtuzbIfVAZSFQRxA==", "integrity": "sha512-7ErQ/UF0IBAd+PkQNBD7yYCDqL2o6leErMDENSWAgUHWLy5TcHr3Orn7qswtBMW5gIyXW9lh+EpllwLJ5qv35w==",
"dev": true, "dev": true,
"requires": { "requires": {
"map-like": "^2.0.0" "map-like": "^2.0.0"
} }
}, },
"@textlint/fixer-formatter": { "@textlint/fixer-formatter": {
"version": "3.3.1", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/@textlint/fixer-formatter/-/fixer-formatter-3.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/fixer-formatter/-/fixer-formatter-3.3.2.tgz",
"integrity": "sha512-ZPK66J61lv8UMdqJeG4YUPfKPlCom/jiv8kZkz5ELnLA587HLOlEIYLaNjKop0viW5z3Fz9cZd5glIHrPymiqQ==", "integrity": "sha512-aTEyH/rHSzxRLrluSjNhDnMSgIYK60J5AAgprKJCkb9h3dDRuNoiJ+BXh5FXVSSm1tGF0d8pu+Ph8OFBgQOchQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/module-interop": "^1.2.1", "@textlint/module-interop": "^1.2.2",
"@textlint/types": "^1.5.1", "@textlint/types": "^1.5.2",
"chalk": "^1.1.3", "chalk": "^1.1.3",
"debug": "^4.3.1", "debug": "^4.3.1",
"diff": "^4.0.2", "diff": "^4.0.2",
@ -171,9 +171,9 @@
"dev": true "dev": true
}, },
"@textlint/types": { "@textlint/types": {
"version": "1.5.1", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.2.tgz",
"integrity": "sha512-YgPmxEeFUXuCjWOFx4p0afxFCHJbTf9Muw/6SJDLd/txQ6YrStst3Kvw+6QGefdJe44/UdiUYtI8sYa5T1ejaQ==", "integrity": "sha512-IdS0h2MCzdY+wjM0+qvl8IW/IxhmVFAVrGu5TmIBpJkihIV7WMa3ITFXIVb0oqwnePUmyLBRIVsCtC66E3QbfQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -264,18 +264,18 @@
} }
}, },
"@textlint/kernel": { "@textlint/kernel": {
"version": "3.4.1", "version": "3.4.2",
"resolved": "https://registry.npmjs.org/@textlint/kernel/-/kernel-3.4.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/kernel/-/kernel-3.4.2.tgz",
"integrity": "sha512-8ZpiLy5KgmIMjda7RNgbNzoHpDnF51OC0rmMBTUl5xFMrpOcmnKZ6qcnmP7hlyR1MQJxQVzG0PvWnLHFUZL53w==", "integrity": "sha512-PpxAtvLGI9ewn+Dbt4j0KMfmMM39/AY3cikmZffu59nyTdIymXMeVMEVkpVZTEUk5OlL27RAON9FF+2u+0fshg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1", "@textlint/ast-node-types": "^4.4.1",
"@textlint/ast-tester": "^2.3.1", "@textlint/ast-tester": "^2.3.2",
"@textlint/ast-traverse": "^2.3.1", "@textlint/ast-traverse": "^2.3.2",
"@textlint/feature-flag": "^3.3.1", "@textlint/feature-flag": "^3.3.2",
"@textlint/source-code-fixer": "^3.4.1", "@textlint/source-code-fixer": "^3.4.2",
"@textlint/types": "^1.5.1", "@textlint/types": "^1.5.2",
"@textlint/utils": "^1.2.1", "@textlint/utils": "^1.2.2",
"debug": "^4.3.1", "debug": "^4.3.1",
"deep-equal": "^1.1.1", "deep-equal": "^1.1.1",
"map-like": "^2.0.0", "map-like": "^2.0.0",
@ -289,9 +289,9 @@
"dev": true "dev": true
}, },
"@textlint/types": { "@textlint/types": {
"version": "1.5.1", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.2.tgz",
"integrity": "sha512-YgPmxEeFUXuCjWOFx4p0afxFCHJbTf9Muw/6SJDLd/txQ6YrStst3Kvw+6QGefdJe44/UdiUYtI8sYa5T1ejaQ==", "integrity": "sha512-IdS0h2MCzdY+wjM0+qvl8IW/IxhmVFAVrGu5TmIBpJkihIV7WMa3ITFXIVb0oqwnePUmyLBRIVsCtC66E3QbfQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -309,15 +309,15 @@
} }
}, },
"@textlint/linter-formatter": { "@textlint/linter-formatter": {
"version": "3.3.1", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/@textlint/linter-formatter/-/linter-formatter-3.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/linter-formatter/-/linter-formatter-3.3.2.tgz",
"integrity": "sha512-tBtOSfpZWr3AwIJ1vbBSD+fwB4JSEtCQIE+AgfFqO8eDMOssjxKgVtIPX9dwh3/+6vlc6KozBJjIfXoxLuaWlg==", "integrity": "sha512-MRa8D1/x6pWycKTwb1QLjtY7GyjgcsYRfV0Gu0Aze5szCa3UDwZSewHycpcAGlIqr8AkqPRfyXi653M47eJ0rA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@azu/format-text": "^1.0.1", "@azu/format-text": "^1.0.1",
"@azu/style-format": "^1.0.0", "@azu/style-format": "^1.0.0",
"@textlint/module-interop": "^1.2.1", "@textlint/module-interop": "^1.2.2",
"@textlint/types": "^1.5.1", "@textlint/types": "^1.5.2",
"chalk": "^1.1.3", "chalk": "^1.1.3",
"concat-stream": "^1.6.2", "concat-stream": "^1.6.2",
"debug": "^4.3.1", "debug": "^4.3.1",
@ -340,9 +340,9 @@
"dev": true "dev": true
}, },
"@textlint/types": { "@textlint/types": {
"version": "1.5.1", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.2.tgz",
"integrity": "sha512-YgPmxEeFUXuCjWOFx4p0afxFCHJbTf9Muw/6SJDLd/txQ6YrStst3Kvw+6QGefdJe44/UdiUYtI8sYa5T1ejaQ==", "integrity": "sha512-IdS0h2MCzdY+wjM0+qvl8IW/IxhmVFAVrGu5TmIBpJkihIV7WMa3ITFXIVb0oqwnePUmyLBRIVsCtC66E3QbfQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -479,9 +479,9 @@
} }
}, },
"@textlint/markdown-to-ast": { "@textlint/markdown-to-ast": {
"version": "6.3.1", "version": "6.3.2",
"resolved": "https://registry.npmjs.org/@textlint/markdown-to-ast/-/markdown-to-ast-6.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/markdown-to-ast/-/markdown-to-ast-6.3.2.tgz",
"integrity": "sha512-piqeTN6dzMr7ljlo7GbRBILMcZ8zW2H9raN48qH+HYhfrGZfEOmL5HAMMeF8h0sDz9CzTvZixEwGWLMdlwsb+A==", "integrity": "sha512-uwndF3PRJ48wTVAEDSy0IAEVJg/scxpdZ1r+QKeGuFfdtaGSrtcgROI6qiVU1g/WNyNfQw+DAA7F8HfM+pmleg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1", "@textlint/ast-node-types": "^4.4.1",
@ -597,18 +597,18 @@
} }
}, },
"@textlint/module-interop": { "@textlint/module-interop": {
"version": "1.2.1", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/@textlint/module-interop/-/module-interop-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/module-interop/-/module-interop-1.2.2.tgz",
"integrity": "sha512-ZvxTTvEm7nmkRctWKREfvNvnVtRxRbdUms8cqkiYbP2K0fRIMacrWpL8z8cdkkdNZbaYciaUnyE3be7UD4J8EA==", "integrity": "sha512-B8HPS129lOqzEpRcafYl/OJ2TDxfBw1jGfEhebzwt3kGoMd5pQVih+hUIOl+SfAmLWqCDEniaKn0gw1s+hjSXA==",
"dev": true "dev": true
}, },
"@textlint/source-code-fixer": { "@textlint/source-code-fixer": {
"version": "3.4.1", "version": "3.4.2",
"resolved": "https://registry.npmjs.org/@textlint/source-code-fixer/-/source-code-fixer-3.4.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/source-code-fixer/-/source-code-fixer-3.4.2.tgz",
"integrity": "sha512-FqL+xdjIU2hswS4Cmhf/bL7SWTpXkKoK/wb8Lmo9sNmEE481fc5Ey/s8JgxAaOHRpwOcmErGd16c3gXcG6Y2ow==", "integrity": "sha512-mSGQNO8is21KcHgDh4S8Cx88r7uU+7xpzHLuEuzhgEZfgwz3+tnpk22TrEjNYe1V1+aseU9iCQegVQQr1wroKQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/types": "^1.5.1", "@textlint/types": "^1.5.2",
"debug": "^4.3.1" "debug": "^4.3.1"
}, },
"dependencies": { "dependencies": {
@ -619,9 +619,9 @@
"dev": true "dev": true
}, },
"@textlint/types": { "@textlint/types": {
"version": "1.5.1", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.2.tgz",
"integrity": "sha512-YgPmxEeFUXuCjWOFx4p0afxFCHJbTf9Muw/6SJDLd/txQ6YrStst3Kvw+6QGefdJe44/UdiUYtI8sYa5T1ejaQ==", "integrity": "sha512-IdS0h2MCzdY+wjM0+qvl8IW/IxhmVFAVrGu5TmIBpJkihIV7WMa3ITFXIVb0oqwnePUmyLBRIVsCtC66E3QbfQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -639,9 +639,9 @@
} }
}, },
"@textlint/text-to-ast": { "@textlint/text-to-ast": {
"version": "3.3.1", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/@textlint/text-to-ast/-/text-to-ast-3.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/text-to-ast/-/text-to-ast-3.3.2.tgz",
"integrity": "sha512-aN1IY3u98Wig2PTF/eEJdb7XfCH5VEwZagGdG1vajx6sdc7Sc3265UVv9uEB/ypJDteYnURRICfTd6NCGwkVGA==", "integrity": "sha512-+DKAP62ho21KID8IcKy1kP6K+kUZk+Z0MwvS9u2l39J0cK+vX523KI+sA6AXxEhOMDA8zhdIsBf3onGvrAtyhA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"
@ -656,21 +656,21 @@
} }
}, },
"@textlint/textlint-plugin-markdown": { "@textlint/textlint-plugin-markdown": {
"version": "5.3.1", "version": "5.3.2",
"resolved": "https://registry.npmjs.org/@textlint/textlint-plugin-markdown/-/textlint-plugin-markdown-5.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/textlint-plugin-markdown/-/textlint-plugin-markdown-5.3.2.tgz",
"integrity": "sha512-IhQVGW9YqylkuZ4AjOfLFtOWHPXtLMhWTVfvIFzMQ2TIpquIaybws8KiFN2yZzLBNNduF+PFvm+H2NRhR0w/lQ==", "integrity": "sha512-6Ph7ESKR48tEz5Pnog3PpvF84LU3jkADvr4iBkkVz9vLQt3KbqGnmk8EV94Y0hLEX+UrZKWmH3cJfh6O1Zy/eA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/markdown-to-ast": "^6.3.1" "@textlint/markdown-to-ast": "^6.3.2"
} }
}, },
"@textlint/textlint-plugin-text": { "@textlint/textlint-plugin-text": {
"version": "4.3.1", "version": "4.3.2",
"resolved": "https://registry.npmjs.org/@textlint/textlint-plugin-text/-/textlint-plugin-text-4.3.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/textlint-plugin-text/-/textlint-plugin-text-4.3.2.tgz",
"integrity": "sha512-IqtO6TWOfVaw8sXMdVVwsvEYuqYk13ApKXBVjjJoLux0g+6G1rCEhFSZtopkrpC1Srr/OZCfb4nk8/zx+5M6Ng==", "integrity": "sha512-xnjad0bXaM6ZtgffuFKogHYkzXymUK3VTLP5MGA00kLitADlNUtwXQk82TebkXFcSPRhePU9+2XFipXNQDsg7g==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/text-to-ast": "^3.3.1" "@textlint/text-to-ast": "^3.3.2"
} }
}, },
"@textlint/types": { "@textlint/types": {
@ -683,9 +683,9 @@
} }
}, },
"@textlint/utils": { "@textlint/utils": {
"version": "1.2.1", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/@textlint/utils/-/utils-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/utils/-/utils-1.2.2.tgz",
"integrity": "sha512-X/rLpqskTLWDPO5cvQO5CcA7zNnDimeBokwehiDwTg6aP9LYqFeOw5mKZ5lb4purY9zN9tLRxJGLle4Py1QobQ==", "integrity": "sha512-7Mqcl9G9YYrPBv5d/tZ2NlWC66hTUpQEQxZEHDMTdF3gPmQUSNRNGjqUR9mhw00Wy8Wo6i3LUWuxwMT6heHNBQ==",
"dev": true "dev": true
}, },
"@types/mdast": { "@types/mdast": {
@ -1116,9 +1116,9 @@
"dev": true "dev": true
}, },
"get-intrinsic": { "get-intrinsic": {
"version": "1.0.2", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"function-bind": "^1.1.1", "function-bind": "^1.1.1",
@ -1156,9 +1156,9 @@
} }
}, },
"graceful-fs": { "graceful-fs": {
"version": "4.2.4", "version": "4.2.5",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.5.tgz",
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "integrity": "sha512-kBBSQbz2K0Nyn+31j/w36fUfxkBW9/gfwRWdUY1ULReH3iokVJgddZAFcD1D0xlgTmFxJCbUkUclAlc6/IDJkw==",
"dev": true "dev": true
}, },
"has": { "has": {
@ -1352,11 +1352,12 @@
"dev": true "dev": true
}, },
"is-regex": { "is-regex": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
"integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
"dev": true, "dev": true,
"requires": { "requires": {
"call-bind": "^1.0.2",
"has-symbols": "^1.0.1" "has-symbols": "^1.0.1"
} }
}, },
@ -2533,22 +2534,22 @@
"dev": true "dev": true
}, },
"textlint": { "textlint": {
"version": "11.8.1", "version": "11.8.2",
"resolved": "https://registry.npmjs.org/textlint/-/textlint-11.8.1.tgz", "resolved": "https://registry.npmjs.org/textlint/-/textlint-11.8.2.tgz",
"integrity": "sha512-FlXzJrR008O/H/ynCTVQnsaW2kX2I1zb/rIxkn0HIAoNxU/A4au+P4QJkeDg7FRE6h8qdlZjrXHx79MfSTWzDw==", "integrity": "sha512-YrTGagGzWKXYw6VjW4uhJ1y7LoW8zqWZIr8sWgeQVIFE84+G/cHPoZ8RhFlia+RZ4YryZPNOqevuF4vG+dbKNQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1", "@textlint/ast-node-types": "^4.4.1",
"@textlint/ast-traverse": "^2.3.1", "@textlint/ast-traverse": "^2.3.2",
"@textlint/feature-flag": "^3.3.1", "@textlint/feature-flag": "^3.3.2",
"@textlint/fixer-formatter": "^3.3.1", "@textlint/fixer-formatter": "^3.3.2",
"@textlint/kernel": "^3.4.1", "@textlint/kernel": "^3.4.2",
"@textlint/linter-formatter": "^3.3.1", "@textlint/linter-formatter": "^3.3.2",
"@textlint/module-interop": "^1.2.1", "@textlint/module-interop": "^1.2.2",
"@textlint/textlint-plugin-markdown": "^5.3.1", "@textlint/textlint-plugin-markdown": "^5.3.2",
"@textlint/textlint-plugin-text": "^4.3.1", "@textlint/textlint-plugin-text": "^4.3.2",
"@textlint/types": "^1.5.1", "@textlint/types": "^1.5.2",
"@textlint/utils": "^1.2.1", "@textlint/utils": "^1.2.2",
"debug": "^4.3.1", "debug": "^4.3.1",
"deep-equal": "^1.1.1", "deep-equal": "^1.1.1",
"file-entry-cache": "^5.0.1", "file-entry-cache": "^5.0.1",
@ -2576,9 +2577,9 @@
"dev": true "dev": true
}, },
"@textlint/types": { "@textlint/types": {
"version": "1.5.1", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@textlint/types/-/types-1.5.2.tgz",
"integrity": "sha512-YgPmxEeFUXuCjWOFx4p0afxFCHJbTf9Muw/6SJDLd/txQ6YrStst3Kvw+6QGefdJe44/UdiUYtI8sYa5T1ejaQ==", "integrity": "sha512-IdS0h2MCzdY+wjM0+qvl8IW/IxhmVFAVrGu5TmIBpJkihIV7WMa3ITFXIVb0oqwnePUmyLBRIVsCtC66E3QbfQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@textlint/ast-node-types": "^4.4.1" "@textlint/ast-node-types": "^4.4.1"

View File

@ -10,7 +10,7 @@
"remark-lint-fenced-code-flag": "^2.0.1", "remark-lint-fenced-code-flag": "^2.0.1",
"remark-lint-no-shell-dollars": "^2.0.2", "remark-lint-no-shell-dollars": "^2.0.2",
"remark-stringify": "^9.0.1", "remark-stringify": "^9.0.1",
"textlint": "^11.8.1", "textlint": "^11.8.2",
"textlint-rule-common-misspellings": "^1.0.1", "textlint-rule-common-misspellings": "^1.0.1",
"textlint-rule-terminology": "^2.1.5" "textlint-rule-terminology": "^2.1.5"
}, },

View File

@ -5,54 +5,54 @@
{ {
"appID": "UTQFCBPQRF.io.robbie.HomeAssistant.dev", "appID": "UTQFCBPQRF.io.robbie.HomeAssistant.dev",
"paths": [ "paths": [
"/ios/*",
"NOT /ios/beta", "NOT /ios/beta",
"NOT /ios/beta/*", "NOT /ios/beta/*",
"/ios/*",
"/tag/*" "/tag/*"
] ]
}, },
{ {
"appID": "UTQFCBPQRF.io.robbie.HomeAssistant.beta", "appID": "UTQFCBPQRF.io.robbie.HomeAssistant.beta",
"paths": [ "paths": [
"/ios/*",
"NOT /ios/beta", "NOT /ios/beta",
"NOT /ios/beta/*", "NOT /ios/beta/*",
"/ios/*",
"/tag/*" "/tag/*"
] ]
}, },
{ {
"appID": "UTQFCBPQRF.io.robbie.HomeAssistant", "appID": "UTQFCBPQRF.io.robbie.HomeAssistant",
"paths": [ "paths": [
"/ios/*",
"NOT /ios/beta", "NOT /ios/beta",
"NOT /ios/beta/*", "NOT /ios/beta/*",
"/ios/*",
"/tag/*" "/tag/*"
] ]
}, },
{ {
"appID": "QMQYCKL255.io.robbie.HomeAssistant.dev", "appID": "QMQYCKL255.io.robbie.HomeAssistant.dev",
"paths": [ "paths": [
"/ios/*",
"NOT /ios/beta", "NOT /ios/beta",
"NOT /ios/beta/*", "NOT /ios/beta/*",
"/ios/*",
"/tag/*" "/tag/*"
] ]
}, },
{ {
"appID": "QMQYCKL255.io.robbie.HomeAssistant.beta", "appID": "QMQYCKL255.io.robbie.HomeAssistant.beta",
"paths": [ "paths": [
"/ios/*",
"NOT /ios/beta", "NOT /ios/beta",
"NOT /ios/beta/*", "NOT /ios/beta/*",
"/ios/*",
"/tag/*" "/tag/*"
] ]
}, },
{ {
"appID": "QMQYCKL255.io.robbie.HomeAssistant", "appID": "QMQYCKL255.io.robbie.HomeAssistant",
"paths": [ "paths": [
"/ios/*",
"NOT /ios/beta", "NOT /ios/beta",
"NOT /ios/beta/*", "NOT /ios/beta/*",
"/ios/*",
"/tag/*" "/tag/*"
] ]
} }

View File

@ -3,75 +3,11 @@ title: "Automation Templating"
description: "Advanced automation documentation using templating." description: "Advanced automation documentation using templating."
--- ---
In Home Assistant 0.19 we introduced a new powerful feature: variables in scripts and automations. This makes it possible to adjust your condition and action based on the information of the trigger. Automations support [templating](/docs/configuration/templating/) in the same way as scripts do. In addition to the [Home Assistant template extensions](/docs/configuration/templating/#home-assistant-template-extensions) available to scripts, the `trigger` template variable is available.
The trigger data made is available during [template](/docs/configuration/templating/) rendering as the `trigger` variable.
{% raw %}
```yaml
# Example configuration.yaml entries
automation:
trigger:
platform: state
entity_id: device_tracker.paulus
action:
service: notify.notify
data:
message: >
Paulus just changed from {{ trigger.from_state.state }}
to {{ trigger.to_state.state }}
automation 2:
trigger:
platform: mqtt
topic: /notify/+
action:
service: >
notify.{{ trigger.topic.split('/')[-1] }}
data:
message: "{{ trigger.payload }}"
automation 3:
trigger:
# Multiple entities for which you want to perform the same action.
- platform: state
entity_id:
- light.bedroom_closet
- light.kiddos_closet
- light.linen_closet
to: "on"
# Trigger when someone leaves one of those lights on for 10 minutes.
for: "00:10:00"
action:
- service: light.turn_off
data:
# Turn off whichever entity triggered the automation.
entity_id: "{{ trigger.entity_id }}"
```
{% endraw %}
## Important Template Rules
There are a few very important rules to remember when writing automation templates:
1. You **must** surround single-line templates with double quotes (`"`) or single quotes (`'`).
1. It is advised that you prepare for undefined variables by using `if ... is not none` or the [`default` filter](http://jinja.pocoo.org/docs/dev/templates/#default), or both.
1. It is advised that when comparing numbers, you convert the number(s) to a [`float`](http://jinja.pocoo.org/docs/dev/templates/#float) or an [`int`](http://jinja.pocoo.org/docs/dev/templates/#int) by using the respective [filter](http://jinja.pocoo.org/docs/dev/templates/#list-of-builtin-filters).
1. While the [`float`](http://jinja.pocoo.org/docs/dev/templates/#float) and [`int`](http://jinja.pocoo.org/docs/dev/templates/#int) filters do allow a default fallback value if the conversion is unsuccessful, they do not provide the ability to catch undefined variables.
Remembering these simple rules will help save you from many headaches and endless hours of frustration when using automation templates.
## Trigger State Object
Knowing how to access the [state object](/docs/configuration/state_object/) of a trigger entity can be useful in automations. Here are a few ways to access the [`state`](#state), [`numeric state`](#numeric-state) and [`template`](#template) triggers:
* `trigger.from_state` will return the **previous** [state object](/docs/configuration/state_object/) of the entity.
* `trigger.to_state` will return the **new** [state object](/docs/configuration/state_object/) that triggered trigger.
* `states[trigger.to_state.entity_id]` will return the **current** [state object](/docs/configuration/state_object/) of the entity.
<div class='note'> <div class='note'>
Be aware that if you reference a `trigger` state object in templates of automation `action`, attempting to test that automation by calling the `automation.trigger` service or by clicking EXECUTE in the More Info box for the automation will not work. This is because the trigger state object doesn't exist in those contexts. One way to test automations like these is to manually check that the templates work as expected by pasting them in Developer Tools > Template together with your trigger's definition like: Be aware that if you reference a `trigger` state object in templates of an automation' `action` or `condition` sections, attempting to test that automation by calling the `automation.trigger` service or by clicking EXECUTE in the More Info box for the automation will not work. This is because the trigger state object doesn't exist in those contexts. One way to test automations like these is to manually check that the templates work as expected by pasting them in Developer Tools > Template together with your trigger's definition like:
{%raw%} {%raw%}
```yaml ```yaml
@ -180,4 +116,49 @@ The following tables show the available trigger data per platform.
| `trigger.zone` | State object of zone | `trigger.zone` | State object of zone
| `trigger.event` | Event that trigger observed: `enter` or `leave`. | `trigger.event` | Event that trigger observed: `enter` or `leave`.
## Examples
{% raw %}
```yaml
# Example configuration.yaml entries
automation:
trigger:
platform: state
entity_id: device_tracker.paulus
action:
service: notify.notify
data:
message: >
Paulus just changed from {{ trigger.from_state.state }}
to {{ trigger.to_state.state }}
automation 2:
trigger:
platform: mqtt
topic: /notify/+
action:
service: >
notify.{{ trigger.topic.split('/')[-1] }}
data:
message: "{{ trigger.payload }}"
automation 3:
trigger:
# Multiple entities for which you want to perform the same action.
- platform: state
entity_id:
- light.bedroom_closet
- light.kiddos_closet
- light.linen_closet
to: "on"
# Trigger when someone leaves one of those lights on for 10 minutes.
for: "00:10:00"
action:
- service: light.turn_off
data:
# Turn off whichever entity triggered the automation.
entity_id: "{{ trigger.entity_id }}"
```
{% endraw %}
[state object]: /docs/configuration/state_object/ [state object]: /docs/configuration/state_object/

View File

@ -117,6 +117,8 @@ automation:
If you want to migrate your manual automations to use the editor, you'll have to copy them to `automations.yaml`. Make sure that `automations.yaml` remains a list! For each automation that you copy over, you'll have to add an `id`. This can be any string as long as it's unique. If you want to migrate your manual automations to use the editor, you'll have to copy them to `automations.yaml`. Make sure that `automations.yaml` remains a list! For each automation that you copy over, you'll have to add an `id`. This can be any string as long as it's unique.
{% raw %}
```yaml ```yaml
# Example automations.yaml entry. Note, automations.yaml is always a list! # Example automations.yaml entry. Note, automations.yaml is always a list!
- id: my_unique_id # <-- Required for editor to work, for automations created with the editor the id will be automatically generated. - id: my_unique_id # <-- Required for editor to work, for automations created with the editor the id will be automatically generated.
@ -131,11 +133,13 @@ If you want to migrate your manual automations to use the editor, you'll have to
entity_id: sensor.temperature entity_id: sensor.temperature
above: 17 above: 17
below: 25 below: 25
value_template: '{% raw %}{{ float(state.state) + 2 }}{% endraw %}' value_template: "{{ float(state.state) + 2 }}"
action: action:
- service: light.turn_on - service: light.turn_on
``` ```
{% endraw %}
### Deleting Automations ### Deleting Automations
When automations remain visible in the Home Assistant Dashboard, even after having deleted in the YAML file, you have to delete them in the UI. When automations remain visible in the Home Assistant Dashboard, even after having deleted in the YAML file, you have to delete them in the UI.

View File

@ -96,7 +96,7 @@ a default value and also provide a [selector](/docs/blueprint/selectors/) that
ensures a matching input field in the user interface. ensures a matching input field in the user interface.
Each input field can be referred to, outside of the blueprint metadata, using Each input field can be referred to, outside of the blueprint metadata, using
the `!input` custom tag. the `!input` custom YAML tag.
The following example shows a minimal blueprint with a single input: The following example shows a minimal blueprint with a single input:
@ -117,6 +117,19 @@ was used in the user interface, a text input field would be shown to the user.
A blueprint can have as many inputs as you like. A blueprint can have as many inputs as you like.
### Blueprint inputs in templates
The inputs are available as custom YAML tags, but not as template variables.
To use a blueprint input in a template, it first needs to be exposed as either
a [script level variable](/integrations/script/#-configuration-variables) or in
a [variable script step](/docs/scripts/#variables).
```yaml
variables:
# Make input my_input available as a script level variable
my_input: !input my_input
```
## Example blueprints ## Example blueprints
The [built-in blueprints][blueprint-built-in] The [built-in blueprints][blueprint-built-in]

View File

@ -54,7 +54,7 @@ blueprint:
Now we have to decide what steps we want to make configurable. We want to make it as re-usable as possible, without losing its original intent of turning on a light-based on a motion sensor. Now we have to decide what steps we want to make configurable. We want to make it as re-usable as possible, without losing its original intent of turning on a light-based on a motion sensor.
Configurable parts in blueprints are called inputs. To make the motion sensor entity configurable, we're replacing the entity ID with a custom YAML tag `!input`. This YAML tag has to be combined with the name of the input: Configurable parts in blueprints are called [inputs](/docs/blueprint/schema/#blueprint-inputs). To make the motion sensor entity configurable, we're replacing the entity ID with a custom YAML tag `!input`. This YAML tag has to be combined with the name of the input:
```yaml ```yaml
trigger: trigger:

View File

@ -44,6 +44,17 @@ script:
``` ```
{% endraw %} {% endraw %}
### Important Template Rules
There are a few very important rules to remember when adding templates to YAML:
1. You **must** surround single-line templates with double quotes (`"`) or single quotes (`'`).
1. It is advised that you prepare for undefined variables by using `if ... is not none` or the [`default` filter](http://jinja.pocoo.org/docs/dev/templates/#default), or both.
1. It is advised that when comparing numbers, you convert the number(s) to a [`float`](http://jinja.pocoo.org/docs/dev/templates/#float) or an [`int`](http://jinja.pocoo.org/docs/dev/templates/#int) by using the respective [filter](http://jinja.pocoo.org/docs/dev/templates/#list-of-builtin-filters).
1. While the [`float`](http://jinja.pocoo.org/docs/dev/templates/#float) and [`int`](http://jinja.pocoo.org/docs/dev/templates/#int) filters do allow a default fallback value if the conversion is unsuccessful, they do not provide the ability to catch undefined variables.
Remembering these simple rules will help save you from many headaches and endless hours of frustration when using automation templates.
## Home Assistant template extensions ## Home Assistant template extensions
Extensions allow templates to access all of the Home Assistant specific states and adds other convenience functions and filters. Extensions allow templates to access all of the Home Assistant specific states and adds other convenience functions and filters.

View File

@ -422,7 +422,7 @@ Setting up a device tracker:
"state_topic": "homeassistant/device_tracker/paulus/state", "state_topic": "homeassistant/device_tracker/paulus/state",
"payload_home": "home", "payload_home": "home",
"payload_not_home": "not_home", "payload_not_home": "not_home",
"source_type": "bluetooth", "source_type": "bluetooth"
} }
``` ```
@ -438,6 +438,6 @@ If the device supports gps co-ordinates then they can be sent to Home Assistant
{ {
"latitude": 32.87336, "latitude": 32.87336,
"longitude": -117.22743, "longitude": -117.22743,
"gps_accuracy": 1.2, "gps_accuracy": 1.2
} }
``` ```

View File

@ -5,6 +5,8 @@ description: "Documentation for the Home Assistant Script Syntax."
Scripts are a sequence of actions that Home Assistant will execute. Scripts are available as an entity through the standalone [Script component] but can also be embedded in [automations] and [Alexa/Amazon Echo] configurations. Scripts are a sequence of actions that Home Assistant will execute. Scripts are available as an entity through the standalone [Script component] but can also be embedded in [automations] and [Alexa/Amazon Echo] configurations.
When the script is executed within an automation the `trigger` variable is available. See [Available-Trigger-Data](/docs/automation/templating/#available-trigger-data).
The script syntax basic structure is a list of key/value maps that contain actions. If a script contains only 1 action, the wrapping list can be omitted. The script syntax basic structure is a list of key/value maps that contain actions. If a script contains only 1 action, the wrapping list can be omitted.
```yaml ```yaml
@ -62,7 +64,7 @@ Scripts may also use a shortcut syntax for activating scenes instead of calling
## Variables ## Variables
The variables command allows you to set/override variables that will be accessible by templates in actions after it. See also [script variables] for how to define variables accessible in the entire script. The variables action allows you to set/override variables that will be accessible by templates in actions after it. See also [script variables] for how to define variables accessible in the entire script.
{% raw %} {% raw %}
@ -141,8 +143,6 @@ All forms accept templates.
These actions allow a script to wait for entities in the system to be in a certain state as specified by a template, or some event to happen as expressed by one or more triggers. These actions allow a script to wait for entities in the system to be in a certain state as specified by a template, or some event to happen as expressed by one or more triggers.
When used within an automation the `trigger` variable is available. See [Available-Trigger-Data](/docs/automation/templating/#available-trigger-data).
### Wait Template ### Wait Template
This action evaluates the template, and if true, the script will continue. If not, then it will wait until it is true. This action evaluates the template, and if true, the script will continue. If not, then it will wait until it is true.
@ -272,6 +272,8 @@ This action allows you to fire an event. Events can be used for many things. It
You can also use event_data to fire an event with custom data. This could be used to pass data to another script awaiting You can also use event_data to fire an event with custom data. This could be used to pass data to another script awaiting
an event trigger. an event trigger.
The `event_data` accepts templates.
{% raw %} {% raw %}
```yaml ```yaml
@ -285,7 +287,7 @@ an event trigger.
### Raise and Consume Custom Events ### Raise and Consume Custom Events
The following automation shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation. The following automation example shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation.
```yaml ```yaml
- alias: Fire Event - alias: Fire Event
@ -299,7 +301,7 @@ The following automation shows how to raise a custom event called `event_light_s
state: "on" state: "on"
``` ```
The following automation shows how to capture the custom event `event_light_state_changed`, and retrieve corresponding `entity_id` that was passed as the event data. The following automation example shows how to capture the custom event `event_light_state_changed` with an [Event Automation Trigger](/docs/automation/trigger#event-trigger), and retrieve corresponding `entity_id` that was passed as the event trigger data, see [Available-Trigger-Data](/docs/automation/templating/#available-trigger-data) for more details.
{% raw %} {% raw %}

View File

@ -51,7 +51,7 @@ To use your Mi Temperature and Humidity sensor in your installation, add the fol
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
- platform: beewi_smartclim - platform: beewi_smartclim
mac: 'xx:xx:xx:xx:xx:xx' mac: "xx:xx:xx:xx:xx:xx"
``` ```
{% configuration %} {% configuration %}
@ -73,6 +73,6 @@ A full configuration example could look like the one below:
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
- platform: beewi_smartclim - platform: beewi_smartclim
mac: 'xx:xx:xx:xx:xx:xx' mac: "xx:xx:xx:xx:xx:xx"
name: Garden name: Garden
``` ```

View File

@ -195,7 +195,7 @@ binary_sensor:
payload_not_available: "offline" payload_not_available: "offline"
qos: 0 qos: 0
device_class: opening device_class: opening
value_template: '{{ value_json.state }}' value_template: "{{ value_json.state }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -117,8 +117,8 @@ You can play MP3 streams like net radios, FLAC files or videos from your local n
service: media_player.play_media service: media_player.play_media
data: data:
entity_id: media_player.chromecast entity_id: media_player.chromecast
media_content_type: 'video' media_content_type: "video"
media_content_id: 'http://192.168.0.100/movies/sample-video.mkv' media_content_id: "http://192.168.0.100/movies/sample-video.mkv"
``` ```
```yaml ```yaml
@ -126,8 +126,8 @@ data:
service: media_player.play_media service: media_player.play_media
data: data:
entity_id: media_player.chromecast entity_id: media_player.chromecast
media_content_type: 'image/jpeg' media_content_type: "image/jpeg"
media_content_id: 'http://via.placeholder.com/1024x600.jpg/0B6B94/FFFFFF/?text=Hello,%20Home%20Assistant!' media_content_id: "http://via.placeholder.com/1024x600.jpg/0B6B94/FFFFFF/?text=Hello,%20Home%20Assistant!"
``` ```
Extra media metadata (for example title, subtitle, artist or album name) can be passed into the service and that will be shown on the Chromecast display. Extra media metadata (for example title, subtitle, artist or album name) can be passed into the service and that will be shown on the Chromecast display.
@ -138,15 +138,15 @@ For the possible metadata types and values check [Google cast documentation > Me
service: media_player.play_media service: media_player.play_media
data: data:
entity_id: media_player.chromecast entity_id: media_player.chromecast
media_content_type: 'video/mp4' media_content_type: "video/mp4"
media_content_id: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' media_content_id: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
extra: extra:
metadata: metadata:
metadataType: 1 metadataType: 1
title: 'Big Buck Bunny' title: "Big Buck Bunny"
subtitle: 'By Blender Foundation, Licensed under the Creative Commons Attribution license' subtitle: "By Blender Foundation, Licensed under the Creative Commons Attribution license"
images: images:
- url: 'https://peach.blender.org/wp-content/uploads/watchtrailer.gif' - url: "https://peach.blender.org/wp-content/uploads/watchtrailer.gif"
``` ```
```yaml ```yaml
@ -154,15 +154,15 @@ data:
service: media_player.play_media service: media_player.play_media
data: data:
entity_id: media_player.chromecast entity_id: media_player.chromecast
media_content_type: 'audio/mp3' media_content_type: "audio/mp3"
media_content_id: 'http://stream.tilos.hu:8000/tilos' media_content_id: "http://stream.tilos.hu:8000/tilos"
extra: extra:
metadata: metadata:
metadataType: 3 metadataType: 3
title: 'Radio TILOS' title: "Radio TILOS"
artist: 'LIVE' artist: "LIVE"
images: images:
- url: 'https://tilos.hu/images/kockalogo.png' - url: "https://tilos.hu/images/kockalogo.png"
``` ```
## Advanced use ## Advanced use

View File

@ -57,7 +57,7 @@ sender:
description: The name or number of the sender. (Limited to 11 characters.) description: The name or number of the sender. (Limited to 11 characters.)
required: false required: false
type: string type: string
default: 'hass' default: "hass"
{% endconfiguration %} {% endconfiguration %}
To use notifications, please see the [getting started with automation page](/getting-started/automation/). To use notifications, please see the [getting started with automation page](/getting-started/automation/).

View File

@ -68,7 +68,7 @@ automation:
- service: climate.set_preset_mode - service: climate.set_preset_mode
data: data:
entity_id: climate.kitchen entity_id: climate.kitchen
preset_mode: 'eco' preset_mode: "eco"
``` ```
### Service `climate.set_temperature` ### Service `climate.set_temperature`
@ -157,7 +157,7 @@ automation:
- service: climate.set_fan_mode - service: climate.set_fan_mode
data: data:
entity_id: climate.kitchen entity_id: climate.kitchen
fan_mode: 'On Low' fan_mode: "On Low"
``` ```
### Service `climate.set_hvac_mode` ### Service `climate.set_hvac_mode`

View File

@ -68,7 +68,7 @@ Example usage in an automation, taking the album art present on a Chromecast and
action: action:
- service: color_extractor.turn_on - service: color_extractor.turn_on
data_template: data_template:
color_extract_url: '{{ states.media_player.chromecast.attributes.entity_picture }}' color_extract_url: "{{ states.media_player.chromecast.attributes.entity_picture }}"
entity_id: light.shelf_leds entity_id: light.shelf_leds
``` ```
@ -85,7 +85,7 @@ With a nicer transition period of 5 seconds and setting brightness to 100% each
action: action:
- service: color_extractor.turn_on - service: color_extractor.turn_on
data_template: data_template:
color_extract_url: '{{ states.media_player.chromecast.attributes.entity_picture }}' color_extract_url: "{{ states.media_player.chromecast.attributes.entity_picture }}"
entity_id: light.shelf_leds entity_id: light.shelf_leds
brightness_pct: 100 brightness_pct: 100
transition: 5 transition: 5

View File

@ -19,7 +19,7 @@ To use your Command binary sensor in your installation, add the following to you
# Example configuration.yaml entry # Example configuration.yaml entry
binary_sensor: binary_sensor:
- platform: command_line - platform: command_line
command: 'cat /proc/sys/net/ipv4/ip_forward' command: "cat /proc/sys/net/ipv4/ip_forward"
``` ```
<div class='note'> <div class='note'>
@ -81,7 +81,7 @@ Check the state of an [SickRage](https://github.com/sickragetv/sickrage) instanc
binary_sensor: binary_sensor:
- platform: command_line - platform: command_line
command: 'netstat -na | find "33322" | find /c "LISTENING" > nul && (echo "Running") || (echo "Not running")' command: 'netstat -na | find "33322" | find /c "LISTENING" > nul && (echo "Running") || (echo "Not running")'
name: 'sickragerunning' name: "sickragerunning"
device_class: moving device_class: moving
payload_on: "Running" payload_on: "Running"
payload_off: "Not running" payload_off: "Not running"
@ -95,7 +95,7 @@ Check if [RasPlex](https://github.com/RasPlex/RasPlex) is `online`.
binary_sensor: binary_sensor:
- platform: command_line - platform: command_line
command: 'ping -c 1 rasplex.local | grep "1 received" | wc -l' command: 'ping -c 1 rasplex.local | grep "1 received" | wc -l'
name: 'is_rasplex_online' name: "is_rasplex_online"
device_class: connectivity device_class: connectivity
payload_on: 1 payload_on: 1
payload_off: 0 payload_off: 0
@ -133,8 +133,8 @@ A binary command line sensor can check this:
binary_sensor: binary_sensor:
- platform: command_line - platform: command_line
command: '/bin/systemctl is-active home-assistant@rock64.service' command: '/bin/systemctl is-active home-assistant@rock64.service'
payload_on: 'active' payload_on: "active"
payload_off: 'inactive' payload_off: "inactive"
``` ```
## Services ## Services

View File

@ -288,7 +288,7 @@ cover:
payload_available: "online" payload_available: "online"
payload_not_available: "offline" payload_not_available: "offline"
optimistic: false optimistic: false
value_template: '{{ value.x }}' value_template: "{{ value.x }}"
``` ```
{% endraw %} {% endraw %}
@ -319,7 +319,7 @@ cover:
payload_available: "online" payload_available: "online"
payload_not_available: "offline" payload_not_available: "offline"
optimistic: false optimistic: false
value_template: '{{ value.x }}' value_template: "{{ value.x }}"
``` ```
{% endraw %} {% endraw %}
@ -351,9 +351,9 @@ cover:
payload_available: "online" payload_available: "online"
payload_not_available: "offline" payload_not_available: "offline"
optimistic: false optimistic: false
value_template: '{{ value.x }}' value_template: "{{ value.x }}"
tilt_command_topic: 'home-assistant/cover/tilt' tilt_command_topic: "home-assistant/cover/tilt"
tilt_status_topic: 'home-assistant/cover/tilt-state' tilt_status_topic: "home-assistant/cover/tilt-state"
tilt_status_template: '{{ value_json["PWM"]["PWM1"] }}' tilt_status_template: '{{ value_json["PWM"]["PWM1"] }}'
tilt_min: 0 tilt_min: 0
tilt_max: 180 tilt_max: 180

View File

@ -199,15 +199,15 @@ cover:
open_cover: open_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'open' modus: "open"
close_cover: close_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'close' modus: "close"
stop_cover: stop_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'stop' modus: "stop"
set_cover_position: set_cover_position:
service: script.cover_group_position service: script.cover_group_position
data: data:
@ -255,7 +255,7 @@ automation:
trigger: trigger:
- platform: sun - platform: sun
event: sunset event: sunset
offset: '+00:30:00' offset: "+00:30:00"
action: action:
- service: cover.set_cover_position - service: cover.set_cover_position
data: data:
@ -280,15 +280,15 @@ cover:
open_cover: open_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'open' modus: "open"
close_cover: close_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'close' modus: "close"
stop_cover: stop_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'stop' modus: "stop"
value_template: "{{is_state('sensor.cover_group', 'open')}}" value_template: "{{is_state('sensor.cover_group', 'open')}}"
icon_template: >- icon_template: >-
{% if is_state('sensor.cover_group', 'open') %} {% if is_state('sensor.cover_group', 'open') %}
@ -315,15 +315,15 @@ cover:
open_cover: open_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'open' modus: "open"
close_cover: close_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'close' modus: "close"
stop_cover: stop_cover:
service: script.cover_group service: script.cover_group
data: data:
modus: 'stop' modus: "stop"
value_template: "{{is_state('sensor.cover_group', 'open')}}" value_template: "{{is_state('sensor.cover_group', 'open')}}"
icon_template: >- icon_template: >-
{% if is_state('sensor.cover_group', 'open') %} {% if is_state('sensor.cover_group', 'open') %}

View File

@ -280,7 +280,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.doorbell_motion entity_id: binary_sensor.doorbell_motion
to: 'on' to: "on"
action: action:
- service: deconz.configure - service: deconz.configure
data: data:

View File

@ -14,6 +14,7 @@ This integration is a meta-component and configures a default set of integration
- [Home Assistant Cloud](/integrations/cloud/) (`cloud`) - [Home Assistant Cloud](/integrations/cloud/) (`cloud`)
- [Configuration](/integrations/config/) (`config`) - [Configuration](/integrations/config/) (`config`)
- [Counter](/integrations/counter/) (`counter`) - [Counter](/integrations/counter/) (`counter`)
- [DHCP Discovery](/integrations/dhcp/) (`dhcp`)
- [Frontend](/integrations/frontend/) (`frontend`) - [Frontend](/integrations/frontend/) (`frontend`)
- [History](/integrations/history/) (`history`) - [History](/integrations/history/) (`history`)
- [Image](/integrations/image/) (`image`) - [Image](/integrations/image/) (`image`)

View File

@ -27,7 +27,7 @@ To enable this sensor, add the following lines to your `configuration.yaml` file
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
- platform: delijn - platform: delijn
api_key: 'API_SUBSCRIPTION_KEY' api_key: "API_SUBSCRIPTION_KEY"
next_departure: next_departure:
- stop_id: 'STOP_ID' - stop_id: 'STOP_ID'
``` ```
@ -64,7 +64,7 @@ The example below shows a full configuration with two sensors, only the abcdefg
sensor: sensor:
# De Lijn public transport # De Lijn public transport
- platform: delijn - platform: delijn
api_key: 'abcdefg' api_key: "abcdefg"
next_departure: next_departure:
- stop_id: '200018' - stop_id: '200018'
- stop_id: '201169' - stop_id: '201169'

View File

@ -42,14 +42,18 @@ only_direct:
This sensor stores a lot of attributes which can be accessed by other sensors, e.g., a [template sensor](/integrations/template). This sensor stores a lot of attributes which can be accessed by other sensors, e.g., a [template sensor](/integrations/template).
{% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
platform: template platform: template
sensors: sensors:
next_departure: next_departure:
value_template: '{% raw %}{{ state_attr('sensor.munich_to_ulm', 'next') }}{% endraw %}' value_template: "{{ state_attr('sensor.munich_to_ulm', 'next') }}"
friendly_name: 'Next departure' friendly_name: "Next departure"
``` ```
{% endraw %}
The data is coming from the [bahn.de](https://www.bahn.de/p/view/index.shtml) website. The data is coming from the [bahn.de](https://www.bahn.de/p/view/index.shtml) website.

View File

@ -9,9 +9,9 @@ ha_domain: mqtt
--- ---
The `mqtt` device tracker platform allows you to detect presence by monitoring an MQTT topic for new locations. To use this platform, you specify a unique topic for each device. The `mqtt` device tracker platform allows you to define new device_trackers through [manual YAML configuration](#yaml-configuration) in `configuration.yaml` and also to automatically discover device_trackers through a [discovery schema](#discovery-schema) using the MQTT Discovery protocol.
## Configuration ## YAML Configuration
To use this device tracker in your installation, add the following to your `configuration.yaml` file: To use this device tracker in your installation, add the following to your `configuration.yaml` file:
@ -20,8 +20,8 @@ To use this device tracker in your installation, add the following to your `conf
device_tracker: device_tracker:
- platform: mqtt - platform: mqtt
devices: devices:
paulus_oneplus: 'location/paulus' paulus_oneplus: "location/paulus"
annetherese_n4: 'location/annetherese' annetherese_n4: "location/annetherese"
``` ```
{% configuration %} {% configuration %}
@ -37,40 +37,181 @@ payload_home:
description: The payload value that represents the 'home' state for the device. description: The payload value that represents the 'home' state for the device.
required: false required: false
type: string type: string
default: 'home' default: "home"
payload_not_home: payload_not_home:
description: The payload value that represents the 'not_home' state for the device. description: The payload value that represents the 'not_home' state for the device.
required: false required: false
type: string type: string
default: 'not_home' default: "not_home"
source_type: source_type:
description: Attribute of a device tracker that affects state when being used to track a [person](/integrations/person/). Valid options are `gps`, `router`, `bluetooth`, or `bluetooth_le`. description: Attribute of a device tracker that affects state when being used to track a [person](/integrations/person/). Valid options are `gps`, `router`, `bluetooth`, or `bluetooth_le`.
required: false required: false
type: string type: string
{% endconfiguration %} {% endconfiguration %}
## Complete example configuration ## Complete YAML example configuration
```yaml ```yaml
# Complete configuration.yaml entry # Complete configuration.yaml entry
device_tracker: device_tracker:
- platform: mqtt - platform: mqtt
devices: devices:
paulus_oneplus: 'location/paulus' paulus_oneplus: "location/paulus"
annetherese_n4: 'location/annetherese' annetherese_n4: "location/annetherese"
qos: 1 qos: 1
payload_home: 'present' payload_home: "present"
payload_not_home: 'not present' payload_not_home: "not present"
source_type: bluetooth source_type: bluetooth
``` ```
## Usage ## YAML Usage
Example JSON you can publish to the topic (e.g., via mqtt.publish service): To set the state of the device_tracker then you need to publish a JSON message to the topic (e.g., via mqtt.publish service). As an example, the following JSON message would set the `paulus_oneplus` device_tracker to `home`:
```json ```json
{ {
"topic": "location/paulus", "topic": "location/paulus",
"payload": "home" "payload": "present"
} }
``` ```
## Discovery Schema
MQTT device_trackers are also supported through [MQTT discovery](/docs/mqtt/discovery/). This is different to the YAML configuration from above. Here, the device_tracker can be created via a discovery topic that follows the following topic name convention: `<discovery_prefix>/device_tracker/[<node_id>/]<object_id>/config` and the JSON message content of a specific format as defined below.
{% configuration %}
availability:
description: A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`.
required: false
type: list
keys:
payload_available:
description: The payload that represents the available state.
required: false
type: string
default: online
payload_not_available:
description: The payload that represents the unavailable state.
required: false
type: string
default: offline
topic:
description: An MQTT topic subscribed to receive availability (online/offline) updates.
required: true
type: string
availability_mode:
description: When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability.
required: false
type: string
default: latest
availability_topic:
description: The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`.
required: false
type: string
device:
description: "Information about the device this device tracker is a part of that ties it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html)."
required: false
type: map
keys:
connections:
description: "A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `'connections': ['mac', '02:5b:26:a8:dc:12']`."
required: false
type: [list, map]
identifiers:
description: A list of IDs that uniquely identify the device. For example a serial number.
required: false
type: [list, string]
manufacturer:
description: The manufacturer of the device.
required: false
type: string
model:
description: The model of the device.
required: false
type: string
name:
description: The name of the device.
required: false
type: string
sw_version:
description: The firmware version of the device.
required: false
type: string
via_device:
description: 'Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.'
required: false
type: string
icon:
description: The icon for the device tracker.
required: false
type: icon
json_attributes_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation."
required: false
type: template
json_attributes_topic:
description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as device_tracker attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation.
required: false
type: string
name:
description: The name of the MQTT device_tracker.
required: false
type: string
payload_available:
description: The payload that represents the available state.
required: false
type: string
default: online
payload_home:
description: The payload value that represents the 'home' state for the device.
required: false
type: string
default: home
payload_not_available:
description: The payload that represents the unavailable state.
required: false
type: string
default: offline
payload_not_home:
description: The payload value that represents the 'not_home' state for the device.
required: false
type: string
default: not_home
qos:
description: The maximum QoS level of the state topic.
required: false
type: integer
default: 0
source_type:
description: Attribute of a device tracker that affects state when being used to track a [person](/integrations/person/). Valid options are `gps`, `router`, `bluetooth`, or `bluetooth_le`.
required: false
type: string
state_topic:
description: The MQTT topic subscribed to receive device tracker state changes.
required: true
type: string
unique_id:
description: "An ID that uniquely identifies this device_tracker. If two device_trackers have the same unique ID, Home Assistant will raise an exception."
required: false
type: string
value_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) that returns a device tracker state."
required: false
type: template
{% endconfiguration %}
## Discovery Example
You can use the discovery protocol to create a new device tracker and set it's state using the command line tool `mosquitto_pub` shipped with `mosquitto` or the `mosquitto-clients` package to send MQTT messages.
To create the device_tracker:
```bash
mosquitto_pub -h 127.0.0.1 -t home-assistant/device_tracker/a4567d663eaf/config -m '{"state_topic": "a4567d663eaf/state", "name": "My Tracker", "payload_home": "home", "payload_not_home": "not_home"}'
```
To set the state of the device tracker to "home":
```bash
mosquitto_pub -h 127.0.0.1 -t a4567d663eaf/state -m 'home'
```

View File

@ -49,8 +49,8 @@ If you have a sensor session running, and once you have enabled the Dexcom integ
entity_id: sensor.dexcom_YOUR_USERNAME_glucose_value entity_id: sensor.dexcom_YOUR_USERNAME_glucose_value
platform: numeric_state platform: numeric_state
condition: time condition: time
after: '22:00:00' after: "22:00:00"
before: '06:00:00' before: "06:00:00"
action: action:
- service: light.turn_on - service: light.turn_on
data: data:

View File

@ -73,8 +73,8 @@ automation:
action: action:
service: notify.dovado service: notify.dovado
data: data:
message: 'The sun has set' message: "The sun has set"
target: '+14151234567' target: "+14151234567"
``` ```
## Sensor ## Sensor

View File

@ -66,7 +66,7 @@ To use Dweet.io sensors in your installation, add the following to your `configu
sensor: sensor:
- platform: dweet - platform: dweet
device: THING_NAME device: THING_NAME
value_template: '{{ value_json.VARIABLE }}' value_template: "{{ value_json.VARIABLE }}"
``` ```
{% endraw %} {% endraw %}
@ -103,7 +103,7 @@ sensor:
- platform: dweet - platform: dweet
name: Temperature name: Temperature
device: THING_NAME device: THING_NAME
value_template: '{{ value_json.VARIABLE }}' value_template: "{{ value_json.VARIABLE }}"
unit_of_measurement: "°C" unit_of_measurement: "°C"
``` ```

View File

@ -284,9 +284,9 @@ dynalite:
template: time_cover template: time_cover
preset: preset:
'1': '1':
name: 'On' name: "On"
'4': '4':
name: 'Off' name: "Off"
template: template:
room: room:
room_on: 1 room_on: 1

View File

@ -191,7 +191,7 @@ Set the oscillation angle of the selected fan(s).
| `angle_low` | Yes | The angle at which the oscillation should start | 1 | | `angle_low` | Yes | The angle at which the oscillation should start | 1 |
| `angle_high` | Yes | The angle at which the oscillation should end | 255 | | `angle_high` | Yes | The angle at which the oscillation should end | 255 |
#### Service `dyson.flow_direction_front` (only for DP04 and TP04) #### Service `dyson.set_flow_direction_front` (only for DP04 and TP04)
Set the fan flow direction. Set the fan flow direction.

View File

@ -18,7 +18,7 @@ Enable the sensor by adding the following to your `configuration.yaml` file:
# Example configuration.yaml entry # Example configuration.yaml entry
ebusd: ebusd:
host: 127.0.0.1 host: 127.0.0.1
circuit: '700' circuit: "700"
``` ```
{% configuration %} {% configuration %}

View File

@ -90,7 +90,7 @@ sensor:
sensors: sensors:
vacuum_filter: vacuum_filter:
friendly_name: "Vacuum Filter Remaining Lifespan" friendly_name: "Vacuum Filter Remaining Lifespan"
unit_of_measurement: '%' unit_of_measurement: "%"
value_template: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') }}" value_template: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') }}"
``` ```

View File

@ -52,12 +52,12 @@ Starting with [version 2 of the firmware](https://www.edimax.com/edimax/download
sensors: sensors:
edimax_current_power: edimax_current_power:
friendly_name: Edimax Current power consumption friendly_name: Edimax Current power consumption
unit_of_measurement: 'W' unit_of_measurement: "W"
value_template: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | replace('None', 0) }}" value_template: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | replace('None', 0) }}"
edimax_total_power: edimax_total_power:
friendly_name: Edimax Accumulated daily power consumption friendly_name: Edimax Accumulated daily power consumption
unit_of_measurement: 'kWh' unit_of_measurement: "kWh"
value_template: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | replace('None', 0) }}" value_template: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | replace('None', 0) }}"
``` ```

View File

@ -45,7 +45,7 @@ version:
description: The version of the Egardia system. `GATE-01`, `GATE-02` and `GATE-03` are currently supported. description: The version of the Egardia system. `GATE-01`, `GATE-02` and `GATE-03` are currently supported.
required: false required: false
type: string type: string
default: 'GATE-01' default: "GATE-01"
port: port:
description: The port of the alarm panel. description: The port of the alarm panel.
required: false required: false

View File

@ -33,7 +33,7 @@ envisalink:
panel_type: HONEYWELL or DSC panel_type: HONEYWELL or DSC
user_name: YOUR_USERNAME user_name: YOUR_USERNAME
password: YOUR_PASSWORD password: YOUR_PASSWORD
code: '1234' code: "1234"
port: 4025 port: 4025
evl_version: 3 evl_version: 3
keepalive_interval: 60 keepalive_interval: 60
@ -42,14 +42,14 @@ envisalink:
panic_type: Police panic_type: Police
zones: zones:
11: 11:
name: 'Back Door' name: "Back Door"
type: 'opening' type: "opening"
21: 21:
name: 'First Floor Motion' name: "First Floor Motion"
type: 'motion' type: "motion"
partitions: partitions:
1: 1:
name: 'Home Alarm' name: "Home Alarm"
``` ```
{% configuration %} {% configuration %}

View File

@ -40,7 +40,7 @@ name:
description: The name of the device used in the frontend. description: The name of the device used in the frontend.
required: false required: false
type: string type: string
default: 'EPSON Projector' default: "EPSON Projector"
{% endconfiguration %} {% endconfiguration %}
### Supported features ### Supported features

View File

@ -42,7 +42,7 @@ climate:
- platform: eq3btsmart - platform: eq3btsmart
devices: devices:
room1: room1:
mac: '00:11:22:33:44:55' mac: "00:11:22:33:44:55"
``` ```
{% configuration %} {% configuration %}

View File

@ -17,7 +17,7 @@ To add the Etherscan sensor to your installation, specify an Ethereum address to
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
- platform: etherscan - platform: etherscan
address: '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359' address: "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
- platform: etherscan - platform: etherscan
address: "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359" address: "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"
token: OMG token: OMG

View File

@ -74,7 +74,7 @@ camera_view: live
elements: elements:
- icon: 'mdi:arrow-up' - icon: 'mdi:arrow-up'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
bottom: 50px bottom: 50px
right: 25px right: 25px
tap_action: tap_action:
@ -86,7 +86,7 @@ elements:
type: icon type: icon
- icon: 'mdi:arrow-down' - icon: 'mdi:arrow-down'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
bottom: 0px bottom: 0px
right: 25px right: 25px
tap_action: tap_action:
@ -98,7 +98,7 @@ elements:
type: icon type: icon
- icon: 'mdi:arrow-left' - icon: 'mdi:arrow-left'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
bottom: 25px bottom: 25px
right: 50px right: 50px
tap_action: tap_action:
@ -110,7 +110,7 @@ elements:
type: icon type: icon
- icon: 'mdi:arrow-right' - icon: 'mdi:arrow-right'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
bottom: 25px bottom: 25px
right: 0px right: 0px
tap_action: tap_action:
@ -122,7 +122,7 @@ elements:
type: icon type: icon
- icon: 'mdi:run-fast' - icon: 'mdi:run-fast'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
top: 25px top: 25px
right: 25px right: 25px
tap_action: tap_action:
@ -134,7 +134,7 @@ elements:
type: icon type: icon
- icon: 'mdi:run' - icon: 'mdi:run'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
top: 25px top: 25px
right: 0px right: 0px
tap_action: tap_action:
@ -146,7 +146,7 @@ elements:
type: icon type: icon
- icon: 'mdi:eye' - icon: 'mdi:eye'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 25px right: 25px
top: 50px top: 50px
tap_action: tap_action:
@ -158,7 +158,7 @@ elements:
type: icon type: icon
- icon: 'mdi:eye-off' - icon: 'mdi:eye-off'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
top: 50px top: 50px
tap_action: tap_action:
@ -170,7 +170,7 @@ elements:
type: icon type: icon
- icon: 'mdi:volume-high' - icon: 'mdi:volume-high'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 25px right: 25px
top: 75px top: 75px
tap_action: tap_action:
@ -182,7 +182,7 @@ elements:
type: icon type: icon
- icon: 'mdi:volume-off' - icon: 'mdi:volume-off'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
top: 75px top: 75px
tap_action: tap_action:
@ -194,7 +194,7 @@ elements:
type: icon type: icon
- icon: 'mdi:led-on' - icon: 'mdi:led-on'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 25px right: 25px
top: 100px top: 100px
tap_action: tap_action:
@ -206,7 +206,7 @@ elements:
type: icon type: icon
- icon: 'mdi:led-off' - icon: 'mdi:led-off'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
top: 100px top: 100px
tap_action: tap_action:
@ -218,7 +218,7 @@ elements:
type: icon type: icon
- icon: 'mdi:brightness-4' - icon: 'mdi:brightness-4'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 25px right: 25px
top: 100px top: 100px
tap_action: tap_action:
@ -230,7 +230,7 @@ elements:
type: icon type: icon
- icon: 'mdi:brightness-5' - icon: 'mdi:brightness-5'
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
top: 100px top: 100px
tap_action: tap_action:

View File

@ -47,7 +47,7 @@ automation:
action: action:
service: notify.facebook service: notify.facebook
data: data:
message: 'Good Evening' message: "Good Evening"
target: target:
- '+919413017584' - '+919413017584'
- '+919784516314' - '+919784516314'

View File

@ -104,7 +104,7 @@ Use the `image_processing.detect_face` events to trigger automations, and breako
platform: event platform: event
event_type: image_processing.detect_face event_type: image_processing.detect_face
event_data: event_data:
name: 'Ringo_Starr' name: "Ringo_Starr"
action: action:
service: notify.platform service: notify.platform
data: data:
@ -184,7 +184,7 @@ you can create an automation to receive notifications on Facebox errors:
action: action:
- service: notify.pushbullet - service: notify.pushbullet
data_template: data_template:
message: '{{ trigger.event.data.message }}' message: "{{ trigger.event.data.message }}"
title: Facebox error title: Facebox error
``` ```

View File

@ -18,7 +18,7 @@ To enable your Family Hub camera in your installation, add the following to your
# Example configuration.yaml entry # Example configuration.yaml entry
camera: camera:
- platform: familyhub - platform: familyhub
ip_address: 'IP_ADDRESS' ip_address: "IP_ADDRESS"
``` ```
{% configuration %} {% configuration %}

View File

@ -106,5 +106,5 @@ sensor:
name: Temperature name: Temperature
file_path: /home/user/.homeassistant/sensor.json file_path: /home/user/.homeassistant/sensor.json
value_template: {% raw %}'{{ value_json.temperature }}'{% endraw %} value_template: {% raw %}'{{ value_json.temperature }}'{% endraw %}
unit_of_measurement: '°C' unit_of_measurement: "°C"
``` ```

View File

@ -142,7 +142,7 @@ automation:
entity_id: media_player.nest_hub_bedroom entity_id: media_player.nest_hub_bedroom
media_content_id: > media_content_id: >
{{ state_attr('sensor.incidents','message_to_speech_url') }} {{ state_attr('sensor.incidents','message_to_speech_url') }}
media_content_type: 'audio/mp4' media_content_type: "audio/mp4"
- alias: 'Send response acknowledgement when a button is pressed' - alias: 'Send response acknowledgement when a button is pressed'
trigger: trigger:

View File

@ -99,8 +99,8 @@ switch:
- light.desk - light.desk
- light.lamp - light.lamp
name: Fluxer name: Fluxer
start_time: '7:00' start_time: "7:00"
stop_time: '23:00' stop_time: "23:00"
start_colortemp: 4000 start_colortemp: 4000
sunset_colortemp: 3000 sunset_colortemp: 3000
stop_colortemp: 1900 stop_colortemp: 1900

View File

@ -17,6 +17,7 @@ This integration will provide local control over your LED lights/strips and can
The `flux_led` integration is configured through the Configuration -> Integrations page. You can select either auto configuration or manual configuration. For auto configuration the integration will automatically scan your network for any supported devices. The `flux_led` integration is configured through the Configuration -> Integrations page. You can select either auto configuration or manual configuration. For auto configuration the integration will automatically scan your network for any supported devices.
If you select the manual flow you can specify the name and host address of the light controller. You can add multiple lights/strips by adding additional instances of the integration. If you select the manual flow you can specify the name and host address of the light controller. You can add multiple lights/strips by adding additional instances of the integration.
### Effects ### Effects
The Flux LED light offers a number of effects which are not included in other lighting packages. These can be selected from the front-end, or sent in the effect field of the `light.turn_on` command. The Flux LED light offers a number of effects which are not included in other lighting packages. These can be selected from the front-end, or sent in the effect field of the `light.turn_on` command.

View File

@ -61,9 +61,9 @@ camera_image: camera.bedroom
camera_view: live camera_view: live
elements: elements:
- type: icon - type: icon
icon: 'mdi:arrow-up' icon: "mdi:arrow-up"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 25px right: 25px
bottom: 50px bottom: 50px
tap_action: tap_action:
@ -73,9 +73,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: up movement: up
- type: icon - type: icon
icon: 'mdi:arrow-down' icon: "mdi:arrow-down"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 25px right: 25px
bottom: 0px bottom: 0px
tap_action: tap_action:
@ -85,9 +85,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: down movement: down
- type: icon - type: icon
icon: 'mdi:arrow-left' icon: "mdi:arrow-left"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 50px right: 50px
bottom: 25px bottom: 25px
tap_action: tap_action:
@ -97,9 +97,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: left movement: left
- type: icon - type: icon
icon: 'mdi:arrow-right' icon: "mdi:arrow-right"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
bottom: 25px bottom: 25px
tap_action: tap_action:
@ -109,9 +109,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: right movement: right
- type: icon - type: icon
icon: 'mdi:arrow-top-left' icon: "mdi:arrow-top-left"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 50px right: 50px
bottom: 50px bottom: 50px
tap_action: tap_action:
@ -121,9 +121,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: top_left movement: top_left
- type: icon - type: icon
icon: 'mdi:arrow-top-right' icon: "mdi:arrow-top-right"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
bottom: 50px bottom: 50px
tap_action: tap_action:
@ -133,9 +133,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: top_right movement: top_right
- type: icon - type: icon
icon: 'mdi:arrow-bottom-left' icon: "mdi:arrow-bottom-left"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 50px right: 50px
bottom: 0px bottom: 0px
tap_action: tap_action:
@ -145,9 +145,9 @@ elements:
entity_id: camera.bedroom entity_id: camera.bedroom
movement: bottom_left movement: bottom_left
- type: icon - type: icon
icon: 'mdi:arrow-bottom-right' icon: "mdi:arrow-bottom-right"
style: style:
background: 'rgba(255, 255, 255, 0.5)' background: "rgba(255, 255, 255, 0.5)"
right: 0px right: 0px
bottom: 0px bottom: 0px
tap_action: tap_action:

View File

@ -67,8 +67,8 @@ alias: "Bathroom Motion Detected"
trigger: trigger:
platform: state platform: state
entity_id: binary_sensor.motion_sensor_166d0001171111 entity_id: binary_sensor.motion_sensor_166d0001171111
from: 'off' from: "off"
to: 'on' to: "on"
action: action:
service: media_player.turn_on service: media_player.turn_on
data: data:

View File

@ -83,15 +83,15 @@ sensor:
- platform: template - platform: template
sensors: sensors:
garage_door_status: garage_door_status:
friendly_name: 'State of the door' friendly_name: "State of the door"
value_template: "{{ states('cover.garage_door') }}" value_template: "{{ states('cover.garage_door') }}"
garage_door_time_in_state: garage_door_time_in_state:
friendly_name: 'Since' friendly_name: "Since"
value_template: "{{ state_attr('cover.garage_door', 'time_in_state') }}" value_template: "{{ state_attr('cover.garage_door', 'time_in_state') }}"
garage_door_wifi_signal_strength: garage_door_wifi_signal_strength:
friendly_name: 'WiFi strength' friendly_name: "WiFi strength"
value_template: "{{ state_attr('cover.garage_door', 'wifi_signal_strength') }}" value_template: "{{ state_attr('cover.garage_door', 'wifi_signal_strength') }}"
unit_of_measurement: 'dB' unit_of_measurement: "dB"
group: group:
garage_door: garage_door:

View File

@ -89,7 +89,7 @@ camera:
- platform: generic - platform: generic
name: Weather name: Weather
still_image_url: https://www.yr.no/place/Norway/Oslo/Oslo/Oslo/meteogram.svg still_image_url: https://www.yr.no/place/Norway/Oslo/Oslo/Oslo/meteogram.svg
content_type: 'image/svg+xml' content_type: "image/svg+xml"
``` ```
### Local image ### Local image

View File

@ -70,5 +70,5 @@ geo_location:
- platform: geo_json_events - platform: geo_json_events
url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson
radius: 250 radius: 250
entity_namespace: 'usgs_earthquakes' entity_namespace: "usgs_earthquakes"
``` ```

View File

@ -34,7 +34,7 @@ sensor:
- platform: geo_rss_events - platform: geo_rss_events
name: NSW Fire Service name: NSW Fire Service
url: https://www.rfs.nsw.gov.au/feeds/majorIncidents.xml url: https://www.rfs.nsw.gov.au/feeds/majorIncidents.xml
unit_of_measurement: 'Incidents' unit_of_measurement: "Incidents"
categories: categories:
- 'Emergency Warning' - 'Emergency Warning'
- 'Watch and Act' - 'Watch and Act'
@ -87,11 +87,11 @@ sensor:
- platform: geo_rss_events - platform: geo_rss_events
name: Qld Fire and Emergency Services name: Qld Fire and Emergency Services
url: https://www.qfes.qld.gov.au/data/alerts/bushfireAlert.xml url: https://www.qfes.qld.gov.au/data/alerts/bushfireAlert.xml
unit_of_measurement: 'Alerts' unit_of_measurement: "Alerts"
- platform: geo_rss_events - platform: geo_rss_events
name: Tas Fire Service name: Tas Fire Service
url: http://www.fire.tas.gov.au/Show?pageId=colBushfireSummariesRss url: http://www.fire.tas.gov.au/Show?pageId=colBushfireSummariesRss
unit_of_measurement: 'Alerts' unit_of_measurement: "Alerts"
- platform: geo_rss_events - platform: geo_rss_events
name: WA Department of Fire and Emergency Services name: WA Department of Fire and Emergency Services
url: https://www.emergency.wa.gov.au/data/incident_FCAD.rss url: https://www.emergency.wa.gov.au/data/incident_FCAD.rss

View File

@ -39,5 +39,5 @@ A full configuration sample including optional variables:
# Example configuration.yaml entry # Example configuration.yaml entry
tts: tts:
- platform: google_translate - platform: google_translate
language: 'de' language: "de"
``` ```

View File

@ -142,11 +142,11 @@ You can also use the `homeassistant.update_entity` service to update the sensor
initial_state: "on" initial_state: "on"
trigger: trigger:
- platform: time_pattern - platform: time_pattern
minutes: '/2' minutes: "/2"
condition: condition:
- condition: time - condition: time
after: '08:00:00' after: "08:00:00"
before: '11:00:00' before: "11:00:00"
- condition: time - condition: time
weekday: weekday:
- mon - mon

View File

@ -50,7 +50,7 @@ The current price for the Load Zone will appear as a sensor:
```yaml ```yaml
- id: '1572630019168' - id: '1572630019168'
alias: Stop Tesla Charging if Power Price Spikes alias: Stop Tesla Charging if Power Price Spikes
description: '' description: ""
trigger: trigger:
- above: '30' - above: '30'
entity_id: sensor.lz_houston_price_now entity_id: sensor.lz_houston_price_now

View File

@ -54,12 +54,12 @@ name:
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
- platform: growatt_server - platform: growatt_server
name: 'growatt home' name: "growatt home"
plant_id: 12345678 plant_id: 12345678
username: username username: username
password: password password: password
- platform: growatt_server - platform: growatt_server
name: 'growatt work' name: "growatt work"
plant_id: 87654321 plant_id: 87654321
username: username username: username
password: password password: password

View File

@ -238,7 +238,7 @@ sensor:
- platform: rest - platform: rest
resource: https://api.ipify.org/?format=json resource: https://api.ipify.org/?format=json
name: External IP name: External IP
value_template: '{{ value_json.ip }}' value_template: "{{ value_json.ip }}"
scan_interval: 10 scan_interval: 10
automation: automation:
@ -248,7 +248,7 @@ automation:
platform: state platform: state
condition: condition:
- condition: template - condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}' value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
- condition: template - condition: template
value_template: '{{ not is_state("sensor.external_ip", "unavailable") }}' value_template: '{{ not is_state("sensor.external_ip", "unavailable") }}'
action: action:

View File

@ -180,10 +180,10 @@ sensor:
sensors: sensors:
family_room: family_room:
value_template: '{{ state_attr("remote.family_room", "current_activity") }}' value_template: '{{ state_attr("remote.family_room", "current_activity") }}'
friendly_name: 'Family Room' friendly_name: "Family Room"
bedroom: bedroom:
value_template: '{{ state_attr("remote.bedroom", "current_activity") }}' value_template: '{{ state_attr("remote.bedroom", "current_activity") }}'
friendly_name: 'bedroom' friendly_name: "bedroom"
``` ```
{% endraw %} {% endraw %}

View File

@ -160,11 +160,11 @@ automation:
initial_state: "on" initial_state: "on"
trigger: trigger:
- platform: time_pattern - platform: time_pattern
minutes: '/2' minutes: "/2"
condition: condition:
- condition: time - condition: time
after: '08:00:00' after: "08:00:00"
before: '11:00:00' before: "11:00:00"
- condition: time - condition: time
weekday: weekday:
- mon - mon

View File

@ -34,8 +34,8 @@ sensor:
entity_id: light.my_lamp entity_id: light.my_lamp
state: "on" state: "on"
type: time type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}' start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: '{{ now() }}' end: "{{ now() }}"
``` ```
{% endraw %} {% endraw %}
@ -135,8 +135,8 @@ Here are some examples of periods you could work with, and what to write in your
{% raw %} {% raw %}
```yaml ```yaml
start: '{{ now().replace(hour=0, minute=0, second=0) }}' start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: '{{ now() }}' end: "{{ now() }}"
``` ```
{% endraw %} {% endraw %}
@ -146,7 +146,7 @@ Here are some examples of periods you could work with, and what to write in your
{% raw %} {% raw %}
```yaml ```yaml
end: '{{ now().replace(hour=0, minute=0, second=0) }}' end: "{{ now().replace(hour=0, minute=0, second=0) }}"
duration: duration:
hours: 24 hours: 24
``` ```
@ -158,7 +158,7 @@ Here are some examples of periods you could work with, and what to write in your
{% raw %} {% raw %}
```yaml ```yaml
start: '{{ now().replace(hour=6, minute=0, second=0) }}' start: "{{ now().replace(hour=6, minute=0, second=0) }}"
duration: duration:
hours: 5 hours: 5
``` ```
@ -172,8 +172,8 @@ Here, last Monday is _today_ as a timestamp, minus 86400 times the current weekd
{% raw %} {% raw %}
```yaml ```yaml
start: '{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}' start: "{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}"
end: '{{ now() }}' end: "{{ now() }}"
``` ```
{% endraw %} {% endraw %}
@ -183,7 +183,7 @@ Here, last Monday is _today_ as a timestamp, minus 86400 times the current weekd
{% raw %} {% raw %}
```yaml ```yaml
end: '{{ now().replace(hour=0, minute=0, second=0) }}' end: "{{ now().replace(hour=0, minute=0, second=0) }}"
duration: duration:
days: 30 days: 30
``` ```
@ -195,8 +195,8 @@ Here, last Monday is _today_ as a timestamp, minus 86400 times the current weekd
{% raw %} {% raw %}
```yaml ```yaml
start: '{{ 0 }}' start: "{{ 0 }}"
end: '{{ now() }}' end: "{{ now() }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -313,81 +313,7 @@ When exposing a Television media player (a `media_player` with device class `tv`
## Disable Auto Start ## Disable Auto Start
Depending on your setup, it might be necessary to disable `Auto Start` for all accessories to be available for `HomeKit`. Only those entities that are fully set up when the `HomeKit` integration is started, can be added. To start `HomeKit` when `auto_start: false`, you can call the service `homekit.start`. It is not needed (anymore) to disable `Auto Start` for all accessories to be available for `HomeKit` as Home Assistant restores all entities on start instantly.
If you have Z-Wave entities you want to be exposed to HomeKit, then you'll need to disable auto start and then start it after the Z-Wave mesh is ready. This is because the Z-Wave entities won't be fully set up until then. This can be automated using an automation.
<div class='note'>
Please remember that you can only have a single `automation` entry. Add the automation to your existing automations.
</div>
```yaml
# Example for Z-Wave
homekit:
auto_start: false
automation:
- alias: 'Start HomeKit'
trigger:
- platform: event
event_type: zwave.network_ready
- platform: event
event_type: zwave.network_complete
- platform: event
event_type: zwave.network_complete_some_dead
action:
- service: homekit.start
```
For a general delay where your integration doesn't generate an event, you can also do:
```yaml
# Example using a delay after the start of Home Assistant
homekit:
auto_start: false
automation:
- alias: 'Start HomeKit'
trigger:
- platform: homeassistant
event: start
action:
- delay: 00:05 # Waits 5 minutes
- service: homekit.start
```
In some cases it might be desirable to check that all entities are available before starting `HomeKit`. This can be accomplished by adding an additional `binary_sensor` as follows:
{% raw %}
```yaml
# Example checking specific entities to be available before start
homekit:
auto_start: false
automation:
- alias: 'Start HomeKit'
trigger:
- platform: homeassistant
event: start
action:
- wait_template: >-
{% if not states.light.kitchen_lights %}
false
{% elif not states.sensor.outside_temperature %}
false
# Repeat for every entity
{% else %}
true
{% endif %}
timeout: 00:15 # Waits 15 minutes
continue_on_timeout: false
- service: homekit.start
```
{% endraw %}
## Configure Filter ## Configure Filter

View File

@ -212,7 +212,7 @@ sensor:
bedroom_valve: bedroom_valve:
value_template: "{% raw %}{{ state_attr('climate.leq123456', 'level') }}{% endraw %}" value_template: "{% raw %}{{ state_attr('climate.leq123456', 'level') }}{% endraw %}"
entity_id: climate.leq123456 entity_id: climate.leq123456
friendly_name: 'Bedroom valve' friendly_name: "Bedroom valve"
``` ```
### Variables ### Variables

View File

@ -102,11 +102,11 @@ sensor:
monitored_variables: monitored_variables:
- name: CPU fanspeed - name: CPU fanspeed
sensor_type: server_health sensor_type: server_health
unit_of_measurement: '%' unit_of_measurement: "%"
value_template: '{% raw %}{{ ilo_data.fans["Fan 1"].speed[0] }}{% endraw %}' value_template: '{% raw %}{{ ilo_data.fans["Fan 1"].speed[0] }}{% endraw %}'
- name: Inlet temperature - name: Inlet temperature
sensor_type: server_health sensor_type: server_health
unit_of_measurement: '°C' unit_of_measurement: "°C"
value_template: '{% raw %}{{ ilo_data.temperature["01-Inlet Ambient"].currentreading[0] }}{% endraw %}' value_template: '{% raw %}{{ ilo_data.temperature["01-Inlet Ambient"].currentreading[0] }}{% endraw %}'
- name: Server Health - name: Server Health
sensor_type: server_health sensor_type: server_health

View File

@ -179,7 +179,7 @@ Example of adding a tag to your notification. This won't create new notification
message: "Last known sensor state is {{ states('sensor.sensor') }}." message: "Last known sensor state is {{ states('sensor.sensor') }}."
data: data:
data: data:
tag: 'notification-about-sensor' tag: "notification-about-sensor"
``` ```
{% endraw %} {% endraw %}

View File

@ -125,7 +125,7 @@ If you want to apply additional IP filtering, and automatically ban brute force
```yaml ```yaml
127.0.0.1: 127.0.0.1:
banned_at: '2016-11-16T19:20:03' banned_at: "2016-11-16T19:20:03"
``` ```
After a ban is added a Persistent Notification is populated to the Home Assistant frontend. After a ban is added a Persistent Notification is populated to the Home Assistant frontend.

View File

@ -46,7 +46,7 @@ automation:
- service: humidifier.set_mode - service: humidifier.set_mode
data: data:
entity_id: humidifier.bedroom entity_id: humidifier.bedroom
preset_mode: 'eco' preset_mode: "eco"
``` ```
### Service `humidifier.set_humidity` ### Service `humidifier.set_humidity`

View File

@ -93,7 +93,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: light.hyperion entity_id: light.hyperion
to: 'on' to: "on"
action: action:
- service: light.turn_on - service: light.turn_on
data: data:
@ -108,13 +108,13 @@ To have the lights playing an effect when pausing, idle or turn off a media play
trigger: trigger:
- platform: state - platform: state
entity_id: media_player.plex entity_id: media_player.plex
to: 'off' to: "off"
- platform: state - platform: state
entity_id: media_player.plex.plex entity_id: media_player.plex.plex
to: 'paused' to: "paused"
- platform: state - platform: state
entity_id: media_player.plex.plex entity_id: media_player.plex.plex
to: 'idle' to: "idle"
action: action:
- service: light.turn_on - service: light.turn_on
data: data:
@ -129,7 +129,7 @@ To capture the screen when playing something on a media_player you can use this
trigger: trigger:
- platform: state - platform: state
entity_id: media_player.plex entity_id: media_player.plex
to: 'playing' to: "playing"
action: action:
- service: light.turn_on - service: light.turn_on
data: data:

View File

@ -29,9 +29,9 @@ There is two ways to integrate iCloud in Home Assistant
Menu: *Configuration* -> *Integrations*. Search for "iCloud", add your credentials, click submit. Menu: *Configuration* -> *Integrations*. Search for "iCloud", add your credentials, click submit.
If you add the integration for the first time for an account: If you add the integration for the first time for an account, and two-factor authentication is enabled:
1. Choose a trusted device from the list and submit. 1. After clicking submit, you will receive a verification code on your trusted iCloud devices.
2. It will send you a text message on your trusted device, add the received code to the next form and submit (if you missed the right code, you will be back to the previous step, and retry). 2. Press Allow on your device, and enter the 6 digit code in Home Assistant. Finally, click Submit.
3. You are done! 3. You are done!
If you already added the integration before, you are done! If you already added the integration before, you are done!
@ -83,9 +83,7 @@ You may receive an email and a notification from Apple saying that someone has l
For the notification, press "Allow", then "OK". For the notification, press "Allow", then "OK".
</div> </div>
If two-step authentication is enabled for your iCloud account, some time after Home Assistant startup the integration will ask which device you want to use as the Trusted Device via a notification in the Home Assistant UI. The integration will send an SMS prompt to that device with the auth code to enter in Home Assistant. The duration of this authentication is determined by Apple, but is currently 2 months, so you will only need to verify your account every two months. If two-step authentication is enabled for your iCloud account, some time after Home Assistant startup the integration will ask to enter the verification code you receive on your device via a notification in the Home Assistant UI. The duration of this authentication is determined by Apple, so you will need to verify your account every now and then.
2 Factor Authentication is the improved version of two-step authentication and is still not supported by the pyicloud library. Therefore it's not possible to use it with the device_tracker yet.
To prevent excessive battery drainage, a dynamic interval is used for each individual device instead of a fixed interval for all devices linked to one account. The dynamic interval is based on the current zone of a device, the distance towards home and the battery level of the device. To prevent excessive battery drainage, a dynamic interval is used for each individual device instead of a fixed interval for all devices linked to one account. The dynamic interval is based on the current zone of a device, the distance towards home and the battery level of the device.

View File

@ -154,7 +154,7 @@ automation:
action: action:
service: script.ifttt_notify service: script.ifttt_notify
data: data:
value1: 'HA Status:' value1: "HA Status:"
value2: "{{ trigger.event.data.entity_id.split('_')[1] }} is " value2: "{{ trigger.event.data.entity_id.split('_')[1] }} is "
value3: "{{ trigger.event.data.to_state.state }}" value3: "{{ trigger.event.data.to_state.state }}"
``` ```

View File

@ -167,7 +167,7 @@ ihc:
sensor: sensor:
- id: 12345 - id: 12345
name: Temperatur_living_room name: Temperatur_living_room
unit_of_measurement: '°C' unit_of_measurement: "°C"
note: Floor and wall temp. note: Floor and wall temp.
position: On wall between windows position: On wall between windows
- id: 23456 - id: 23456

View File

@ -46,7 +46,7 @@ automation:
event_type: image_processing.detect_face event_type: image_processing.detect_face
event_data: event_data:
entity_id: image_processing.door entity_id: image_processing.door
name: 'Hans Maier' name: "Hans Maier"
... ...
``` ```
@ -67,7 +67,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.door_motion_sensor entity_id: sensor.door_motion_sensor
to: 'on' to: "on"
action: action:
- service: image_processing.scan - service: image_processing.scan
data: data:

View File

@ -525,7 +525,7 @@ username: home-assistant
field: value field: value
database: db1 database: db1
- name: Min for last hour - name: Min for last hour
unit_of_measurement: '%' unit_of_measurement: "%"
value_template: '{% raw %}{{ value | round(1) }}{% endraw %}' value_template: '{% raw %}{{ value | round(1) }}{% endraw %}'
group_function: min group_function: min
where: '"entity_id" = ''salon'' and time > now() - 1h' where: '"entity_id" = ''salon'' and time > now() - 1h'

View File

@ -75,7 +75,7 @@ automation:
trigger: trigger:
platform: state platform: state
entity_id: binary_sensor.motion_garage entity_id: binary_sensor.motion_garage
to: 'on' to: "on"
condition: condition:
condition: state condition: state
entity_id: input_boolean.notify_home entity_id: input_boolean.notify_home

View File

@ -136,7 +136,7 @@ If you have a `datetime` object you can use its `timestamp` method. Of if you ha
target: target:
entity_id: input_datetime.XXX entity_id: input_datetime.XXX
data: data:
time: '05:30:00' time: "05:30:00"
# Sets time to time from datetime object # Sets time to time from datetime object
- service: input_datetime.set_datetime - service: input_datetime.set_datetime
target: target:
@ -148,7 +148,7 @@ If you have a `datetime` object you can use its `timestamp` method. Of if you ha
target: target:
entity_id: input_datetime.XXX entity_id: input_datetime.XXX
data: data:
date: '2020-08-24' date: "2020-08-24"
# Sets date to date from datetime object # Sets date to date from datetime object
- service: input_datetime.set_datetime - service: input_datetime.set_datetime
target: target:
@ -160,7 +160,7 @@ If you have a `datetime` object you can use its `timestamp` method. Of if you ha
target: target:
entity_id: input_datetime.XXX entity_id: input_datetime.XXX
data: data:
datetime: '2020-08-25 05:30:00' datetime: "2020-08-25 05:30:00"
# Sets date and time from datetime object # Sets date and time from datetime object
- service: input_datetime.set_datetime - service: input_datetime.set_datetime
target: target:

View File

@ -154,7 +154,7 @@ input_select:
- Reading - Reading
- Relax - Relax
- 'OFF' - 'OFF'
initial: 'Select' initial: "Select"
input_number: input_number:
bedroom_brightness: bedroom_brightness:
name: Brightness name: Brightness
@ -198,7 +198,7 @@ automation:
- alias: Set temp slider - alias: Set temp slider
trigger: trigger:
platform: mqtt platform: mqtt
topic: 'setTemperature' topic: "setTemperature"
action: action:
service: input_number.set_value service: input_number.set_value
data: data:
@ -214,7 +214,7 @@ automation:
action: action:
service: mqtt.publish service: mqtt.publish
data: data:
topic: 'setTemperature' topic: "setTemperature"
retain: true retain: true
payload: "{{ states('input_number.target_temp') | int }}" payload: "{{ states('input_number.target_temp') | int }}"
``` ```
@ -249,7 +249,7 @@ automation:
trigger: trigger:
platform: state platform: state
entity_id: switch.something entity_id: switch.something
to: 'on' to: "on"
action: action:
- delay: "00:{{ states('input_number.minutes') | int }}:{{ states('input_number.seconds') | int }}" - delay: "00:{{ states('input_number.minutes') | int }}:{{ states('input_number.seconds') | int }}"
- service: switch.turn_off - service: switch.turn_off

View File

@ -32,7 +32,7 @@ input_text:
max: 40 max: 40
text3: text3:
name: Text 3 name: Text 3
pattern: '[a-fA-F0-9]*' pattern: "[a-fA-F0-9]*"
text4: text4:
name: Text 4 name: Text 4
mode: password mode: password
@ -121,7 +121,7 @@ input_select:
- Reading - Reading
- Relax - Relax
- 'OFF' - 'OFF'
initial: 'Select' initial: "Select"
input_text: input_text:
bedroom: bedroom:
name: Brightness name: Brightness

View File

@ -33,7 +33,7 @@ islamic_prayer_times:
{% configuration %} {% configuration %}
calculation_method: calculation_method:
required: false required: false
default: 'isna' default: "isna"
type: string type: string
description: "The calculation method used for prayer times. Must be one of: `karachi`, `isna`, `mwl`, `makkah`." description: "The calculation method used for prayer times. Must be one of: `karachi`, `isna`, `mwl`, `makkah`."
{% endconfiguration %} {% endconfiguration %}

View File

@ -113,7 +113,7 @@ automation:
event_type: isy994_control event_type: isy994_control
event_data: event_data:
entity_id: light.lr_track_lights_front entity_id: light.lr_track_lights_front
control: 'DFON' control: "DFON"
value: 255 value: 255
formatted: "On" formatted: "On"
uom: "100" uom: "100"

View File

@ -19,7 +19,7 @@ The `evdev` package is used to interface with the keyboard and thus this is Linu
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
keyboard_remote: keyboard_remote:
type: 'key_up' type: "key_up"
``` ```
{% configuration %} {% configuration %}
@ -62,7 +62,7 @@ A full configuration for two Keyboard Remotes could look like the one below:
```yaml ```yaml
keyboard_remote: keyboard_remote:
- device_descriptor: '/dev/input/by-id/bluetooth-keyboard' - device_descriptor: '/dev/input/by-id/bluetooth-keyboard'
type: 'key_down' type: "key_down"
emulate_key_hold: true emulate_key_hold: true
emulate_key_hold_delay: 250 emulate_key_hold_delay: 250
emulate_key_hold_repeat: 33 emulate_key_hold_repeat: 33
@ -76,8 +76,8 @@ Or like the following for one keyboard:
```yaml ```yaml
keyboard_remote: keyboard_remote:
device_name: 'Bluetooth Keyboard' device_name: "Bluetooth Keyboard"
type: 'key_down' type: "key_down"
``` ```
And an automation rule to breathe life into it: And an automation rule to breathe life into it:

View File

@ -282,7 +282,7 @@ default:
The `knx` binary sensor platform allows you to monitor [KNX](https://www.knx.org/) binary sensors. The `knx` binary sensor platform allows you to monitor [KNX](https://www.knx.org/) binary sensors.
Binary sensors are read-only. To write to the knx-bus configure an exposure [KNX Integration - Expose](/integrations/knx/#exposing-sensor-values-or-time-to-knx-bus). Binary sensors are read-only. To write to the KNX bus configure an exposure [KNX Integration Expose](/integrations/knx/#exposing-entity-states-entity-attributes-or-time-to-knx-bus).
```yaml ```yaml
knx: knx:
@ -917,7 +917,7 @@ name:
The `knx` sensor platform allows you to monitor [KNX](https://www.knx.org/) sensors. The `knx` sensor platform allows you to monitor [KNX](https://www.knx.org/) sensors.
Sensors are read-only. To write to the knx-bus configure an exposure [KNX Integration - Expose](/integrations/knx/#exposing-sensor-values-or-time-to-knx-bus) or use the `knx.send` service. Sensors are read-only. To write to the KNX bus configure an exposure [KNX Integration Expose](/integrations/knx/#exposing-entity-states-entity-attributes-or-time-to-knx-bus) or use the `knx.send` service.
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
@ -925,6 +925,7 @@ knx:
sensor: sensor:
- name: Heating.Valve1 - name: Heating.Valve1
state_address: "2/0/0" state_address: "2/0/0"
type: "percent"
``` ```
In order to actively read the sensor data from the bus every 30 minutes you can add the following lines to your `configuration.yaml`: In order to actively read the sensor data from the bus every 30 minutes you can add the following lines to your `configuration.yaml`:
@ -935,6 +936,7 @@ knx:
sensor: sensor:
- name: Heating.Valve1 - name: Heating.Valve1
state_address: "2/0/0" state_address: "2/0/0"
type: "percent"
sync_state: every 30 sync_state: every 30
``` ```
@ -943,6 +945,10 @@ state_address:
description: KNX group address of the sensor. description: KNX group address of the sensor.
required: true required: true
type: string type: string
type:
description: A type from the value types table below must be defined. The DPT of the group address should match the expected KNX DPT to be parsed correctly.
required: true
type: string
name: name:
description: A name for this device used within Home Assistant. description: A name for this device used within Home Assistant.
required: false required: false
@ -952,10 +958,6 @@ sync_state:
required: false required: false
type: [boolean, string, integer] type: [boolean, string, integer]
default: true default: true
type:
description: A type from the following table must be defined. The DPT of the group address should match the expected KNX DPT to be parsed correctly.
required: true
type: string
always_callback: always_callback:
description: Defines if telegrams with equal payload as the previously received telegram should trigger a state update within Home Assistant. description: Defines if telegrams with equal payload as the previously received telegram should trigger a state update within Home Assistant.
required: false required: false

View File

@ -56,7 +56,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.motion_1 entity_id: binary_sensor.motion_1
to: 'on' to: "on"
action: action:
- service: light.turn_on - service: light.turn_on
data: data:

View File

@ -195,7 +195,7 @@ lock:
optimistic: false optimistic: false
qos: 1 qos: 1
retain: true retain: true
value_template: '{{ value.x }}' value_template: "{{ value.x }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -63,12 +63,12 @@ To explore the data available within the `data` attribute of a sensor use the `d
- platform: template - platform: template
sensors: sensors:
updated: updated:
friendly_name: 'Updated' friendly_name: "Updated"
value_template: {% raw %}'{{state_attr('sensor.merton', 'updated')}}'{% endraw %} value_template: {% raw %}'{{state_attr('sensor.merton', 'updated')}}'{% endraw %}
merton_pm10: merton_pm10:
friendly_name: 'Merton PM10' friendly_name: "Merton PM10"
value_template: {% raw %}'{{state_attr('sensor.merton', 'data')[0].pollutants[0].summary}}'{% endraw %} value_template: {% raw %}'{{state_attr('sensor.merton', 'data')[0].pollutants[0].summary}}'{% endraw %}
westminster_s02: westminster_s02:
friendly_name: 'Westminster S02' friendly_name: "Westminster S02"
value_template: {% raw %}'{{state_attr('sensor.westminster', 'data')[0].pollutants[3].summary}}'{% endraw %} value_template: {% raw %}'{{state_attr('sensor.westminster', 'data')[0].pollutants[3].summary}}'{% endraw %}
``` ```

View File

@ -47,11 +47,11 @@ Now you have the keys, add the following lines to your `configuration.yaml`, rep
sensor: sensor:
- platform: loopenergy - platform: loopenergy
electricity: electricity:
electricity_serial: 'ELECTRICAL_SERIAL' electricity_serial: "ELECTRICAL_SERIAL"
electricity_secret: 'ELECTRICAL_SECRET' electricity_secret: "ELECTRICAL_SECRET"
gas: gas:
gas_serial: 'GAS_SERIAL' gas_serial: "GAS_SERIAL"
gas_secret: 'GAS_SECRET' gas_secret: "GAS_SECRET"
``` ```
{% configuration %} {% configuration %}

View File

@ -153,7 +153,7 @@ For more information on working with binary sensors in Home Assistant, see the [
## Pico and Shade Remotes ## Pico and Shade Remotes
Pico and Shade remotes require a RA2 Select Main Repeater (`RR-SEL-REP2-BL`) or Lutron Caséta Smart Bridge PRO (`L-BDGPRO2-WH`) with Telnet Support enabled in the Lutron app under `Settings` >> `Advanced` >> `Intergration` Pico and Shade remotes require a RA2 Select Main Repeater (`RR-SEL-REP2-BL`) or Lutron Caséta Smart Bridge PRO (`L-BDGPRO2-WH`) with Telnet Support enabled in the Lutron app under `Settings` >> `Advanced` >> `Integration`
Device Triggers are implemented for `press` and `release` of each button on the remotes via watching for `lutron_caseta_button_event` events in the format: Device Triggers are implemented for `press` and `release` of each button on the remotes via watching for `lutron_caseta_button_event` events in the format:

View File

@ -134,7 +134,7 @@ In the configuration example below:
alarm_control_panel: alarm_control_panel:
- platform: manual - platform: manual
name: Home Alarm name: Home Alarm
code: '1234' code: "1234"
arming_time: 30 arming_time: 30
delay_time: 20 delay_time: 20
trigger_time: 4 trigger_time: 4
@ -157,16 +157,16 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.pir1 entity_id: sensor.pir1
to: 'active' to: "active"
- platform: state - platform: state
entity_id: sensor.pir2 entity_id: sensor.pir2
to: 'active' to: "active"
- platform: state - platform: state
entity_id: sensor.door entity_id: sensor.door
to: 'open' to: "open"
- platform: state - platform: state
entity_id: sensor.window entity_id: sensor.window
to: 'open' to: "open"
condition: condition:
- condition: state - condition: state
entity_id: alarm_control_panel.ha_alarm entity_id: alarm_control_panel.ha_alarm
@ -184,7 +184,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.ha_alarm entity_id: alarm_control_panel.ha_alarm
to: 'triggered' to: "triggered"
action: action:
- service: notify.notify - service: notify.notify
data: data:
@ -199,7 +199,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.front_door_lock_alarm_type entity_id: sensor.front_door_lock_alarm_type
to: '19' to: "19"
# many z-wave locks use Alarm Type 19 for 'Unlocked by Keypad' # many z-wave locks use Alarm Type 19 for 'Unlocked by Keypad'
action: action:
- service: alarm_control_panel.alarm_disarm - service: alarm_control_panel.alarm_disarm
@ -215,7 +215,7 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'disarmed' to: "disarmed"
action: action:
- service: notify.notify - service: notify.notify
data: data:
@ -227,7 +227,7 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'pending' to: "pending"
action: action:
- service: notify.notify - service: notify.notify
data: data:
@ -239,7 +239,7 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'armed_away' to: "armed_away"
action: action:
- service: notify.notify - service: notify.notify
data: data:
@ -251,7 +251,7 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'armed_home' to: "armed_home"
action: action:
- service: notify.notify - service: notify.notify
data: data:

View File

@ -68,11 +68,11 @@ A full configuration sample including optional variables:
# Example configuration.yaml entry # Example configuration.yaml entry
tts: tts:
- platform: marytts - platform: marytts
host: 'localhost' host: "localhost"
port: 59125 port: 59125
codec: 'WAVE_FILE' codec: "WAVE_FILE"
voice: 'cmu-slt-hsmm' voice: "cmu-slt-hsmm"
language: 'en_US' language: "en_US"
effect: effect:
Volume: "amount:2.0;", Volume: "amount:2.0;",
TractScaler: "amount:1.5;", TractScaler: "amount:1.5;",

View File

@ -124,7 +124,7 @@ automation:
action: action:
service: notify.matrix_notify service: notify.matrix_notify
data: data:
message: 'It looks like you wrote !testword' message: "It looks like you wrote !testword"
- alias: 'React to an introduction' - alias: 'React to an introduction'
trigger: trigger:
platform: event platform: event

View File

@ -50,8 +50,9 @@ neato:
``` ```
3. Restart Home Assistant 3. Restart Home Assistant
4. Add Neato Botvac via *Configuration* -> *Integrations* 4. Make sure you visit Home Assistant via a the same domain you used as `redirect_url` before
5. Follow the instructions. After that, all the entities will automatically show up in Home Assistant. 5. Add Neato Botvac via *Configuration* -> *Integrations*
6. Follow the instructions. After that, all the entities will automatically show up in Home Assistant. Make sure you start only one configuration flow at a time. Even though you can click “Open Website” several times, press it only once and wait until this flow is complete.
{% configuration %} {% configuration %}
client_id: client_id:
@ -75,10 +76,6 @@ After the update to firmware 4.0 (which adds cleaning maps) there is also suppor
The `neato` vacuum platform allows you to control your [Neato Botvac Connected][botvac-connected]. The `neato` vacuum platform allows you to control your [Neato Botvac Connected][botvac-connected].
The status will contain attributes on the robots last clean session. The status will contain attributes on the robots last clean session.
<div class='note'>
If you notice the robot stops responding to commands check the state to see if the robot is "unavailable". If you see "unavailable" first try to restart the vacuum and wait about 5 minutes to see if it is no longer "unavailable". If you are still having issues check the Neato app and make sure your robot is connected and working. If it is not then follow the steps in the app to reset your robot and give it the same name as before then restart Home Assistant.
</div>
### Services ### Services
Currently supported services are: Currently supported services are:
@ -116,3 +113,17 @@ Some information about the capabilities might be found on the [Neato Developer P
| `zone` | yes | Only supported on the Botvac D7. Name of the zone to clean from the Neato app. Use unique names for the zones to avoid the wrong zone from running. Defaults to no zone i.e., complete house cleanup. | | `zone` | yes | Only supported on the Botvac D7. Name of the zone to clean from the Neato app. Use unique names for the zones to avoid the wrong zone from running. Defaults to no zone i.e., complete house cleanup. |
[botvac-connected]: https://neatorobotics.com/products [botvac-connected]: https://neatorobotics.com/products
## Troubleshooting
### My robot is unavailable
Try to restart the vacuum and wait about 5 minutes to see if it is no longer unavailable. If you are still having issues check the Neato app and make sure your robot is connected and working. If it is not then follow the steps in the app to reset your robot and give it the same name as before then restart Home Assistant.
### My robot is not deteced by Home Assistant
Please check your logs if there are any warnings. When there is a message about your robot being offline, check if it is connected to the internet and available though the app. If there is a message about a bad response, try to reset this robot via your app.
### There is a warning about a bad response but everything works as expected
Do you have a stale robot in your configuration? Try to [look into your account](https://neatorobotics.com) and delete any stale robots. If these warnings are about actively used robots, please report an issue to help us solving this problem.

View File

@ -182,7 +182,7 @@ subscriber_id:
Once your developer account is set up and you have a valid `nest` entry in `configuration.yaml`, you need to connect devices with the following steps: Once your developer account is set up and you have a valid `nest` entry in `configuration.yaml`, you need to connect devices with the following steps:
1. From the Home Assistant front-end, navigate to **Configuration** then **Integrations**. Click **Add Integration** then locate 'Nest'. 1. Using your externally accessible address from the Home Assistant front-end, navigate to **Configuration** then **Integrations**. Click **Add Integration** then locate 'Nest'.
1. You should get redirected to Google to choose an account. This should be the same developer account you configured above. 1. You should get redirected to Google to choose an account. This should be the same developer account you configured above.

View File

@ -3,7 +3,7 @@ title: "MQTT Number"
description: "Instructions on how to interact with a device exposing a Number through MQTT from within Home Assistant." description: "Instructions on how to interact with a device exposing a Number through MQTT from within Home Assistant."
ha_category: ha_category:
- Number - Number
ha_release: 2020.02 ha_release: 2021.2
ha_iot_class: Configurable ha_iot_class: Configurable
ha_domain: mqtt ha_domain: mqtt
--- ---

View File

@ -13,7 +13,7 @@ ha_codeowners:
ha_domain: ozw ha_domain: ozw
--- ---
This integration allows you to utilize OpenZWave's ozwdaemon to control a Z-Wave network over MQTT. This integration allows you to utilize OpenZWave's ozwdaemon to control a Z-Wave network over MQTT. If you're starting out with Z-Wave in Home Assistant, we recommend that you use [the Z-Wave JS integration](/integrations/zwave_js).
## Requirements ## Requirements

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