mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
11baa54397
@ -1,7 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "home-assistant.io",
|
"name": "home-assistant.io",
|
||||||
"context": "..",
|
"build": {
|
||||||
"dockerFile": "../Dockerfile",
|
"dockerfile": "../Dockerfile",
|
||||||
|
"context": "..",
|
||||||
|
"args": {
|
||||||
|
"VARIANT": "2.6",
|
||||||
|
"NODE_VERSION": "12.1",
|
||||||
|
}
|
||||||
|
},
|
||||||
"appPort": [4000],
|
"appPort": [4000],
|
||||||
"postCreateCommand": "bundle install && npm install",
|
"postCreateCommand": "bundle install && npm install",
|
||||||
"containerEnv": {"DEVCONTAINER": "true"},
|
"containerEnv": {"DEVCONTAINER": "true"},
|
||||||
@ -21,4 +27,4 @@
|
|||||||
"errorLens.enabledDiagnosticLevels": ["error", "warning"],
|
"errorLens.enabledDiagnosticLevels": ["error", "warning"],
|
||||||
"terminal.integrated.shell.linux": "/usr/bin/zsh",
|
"terminal.integrated.shell.linux": "/usr/bin/zsh",
|
||||||
}
|
}
|
||||||
}
|
}
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -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.1.4
|
uses: actions/cache@v2.1.5
|
||||||
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.1.4
|
uses: actions/cache@v2.1.5
|
||||||
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.1.4
|
uses: actions/cache@v2.1.5
|
||||||
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.1.4
|
uses: actions/cache@v2.1.5
|
||||||
with:
|
with:
|
||||||
path: source/.jekyll-cache
|
path: source/.jekyll-cache
|
||||||
key:
|
key:
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,6 +4,8 @@
|
|||||||
.gist-cache
|
.gist-cache
|
||||||
.pygments-cache
|
.pygments-cache
|
||||||
public
|
public
|
||||||
|
source/_data/analytics_data.json
|
||||||
|
source/_data/blueprint_exchange_data.json
|
||||||
source/_stash
|
source/_stash
|
||||||
source/stylesheets/screen.css
|
source/stylesheets/screen.css
|
||||||
source/.jekyll-cache/
|
source/.jekyll-cache/
|
||||||
|
16
Dockerfile
16
Dockerfile
@ -1,11 +1,8 @@
|
|||||||
ARG VARIANT=2.6
|
ARG VARIANT=2
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
|
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
|
||||||
|
|
||||||
# Install node
|
ARG NODE_VERSION="lts/*"
|
||||||
COPY .nvmrc /tmp/.nvmrc
|
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
||||||
RUN \
|
|
||||||
su vscode -c \
|
|
||||||
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"
|
|
||||||
|
|
||||||
# Locale env vars
|
# Locale env vars
|
||||||
ENV \
|
ENV \
|
||||||
@ -19,11 +16,8 @@ RUN \
|
|||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
ack \
|
ack \
|
||||||
&& echo "en_US UTF-8" > /etc/locale.gen \
|
&& echo "en_US UTF-8" > /etc/locale.gen \
|
||||||
&& locale-gen en_US.UTF-8 \
|
&& 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
|
# Install the specific version of bundler we need
|
||||||
COPY Gemfile.lock ./
|
COPY Gemfile.lock ./
|
||||||
RUN gem install bundler -v `awk 'c&&c--;/BUNDLED WITH/{c=1}' Gemfile.lock`
|
RUN gem install bundler -v `awk 'c&&c--;/BUNDLED WITH/{c=1}' Gemfile.lock`
|
2
Gemfile
2
Gemfile
@ -21,7 +21,7 @@ group :jekyll_plugins do
|
|||||||
end
|
end
|
||||||
|
|
||||||
gem 'sinatra', '2.1.0'
|
gem 'sinatra', '2.1.0'
|
||||||
gem 'nokogiri', '1.11.2'
|
gem 'nokogiri', '1.11.3'
|
||||||
|
|
||||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
# and associated library
|
# and associated library
|
||||||
|
@ -74,10 +74,10 @@ GEM
|
|||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
mustermann (1.1.1)
|
mustermann (1.1.1)
|
||||||
ruby2_keywords (~> 0.0.1)
|
ruby2_keywords (~> 0.0.1)
|
||||||
nokogiri (1.11.2)
|
nokogiri (1.11.3)
|
||||||
mini_portile2 (~> 2.5.0)
|
mini_portile2 (~> 2.5.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.11.2-x64-mingw32)
|
nokogiri (1.11.3-x64-mingw32)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
pathutil (0.16.2)
|
pathutil (0.16.2)
|
||||||
forwardable-extended (~> 2.6)
|
forwardable-extended (~> 2.6)
|
||||||
@ -130,7 +130,7 @@ DEPENDENCIES
|
|||||||
jekyll-sitemap (= 1.4.0)
|
jekyll-sitemap (= 1.4.0)
|
||||||
jekyll-time-to-read (= 0.1.2)
|
jekyll-time-to-read (= 0.1.2)
|
||||||
jekyll-toc (= 0.17.0)
|
jekyll-toc (= 0.17.0)
|
||||||
nokogiri (= 1.11.2)
|
nokogiri (= 1.11.3)
|
||||||
rake (= 13.0.3)
|
rake (= 13.0.3)
|
||||||
sass-globbing (= 1.1.5)
|
sass-globbing (= 1.1.5)
|
||||||
sassc (= 2.1.0)
|
sassc (= 2.1.0)
|
||||||
|
32
Rakefile
32
Rakefile
@ -1,6 +1,9 @@
|
|||||||
require "rubygems"
|
require "rubygems"
|
||||||
require "bundler/setup"
|
require "bundler/setup"
|
||||||
require "stringex"
|
require "stringex"
|
||||||
|
require 'net/http'
|
||||||
|
require 'json'
|
||||||
|
|
||||||
|
|
||||||
## -- Misc Configs -- ##
|
## -- Misc Configs -- ##
|
||||||
public_dir = "public/" # compiled site directory
|
public_dir = "public/" # compiled site directory
|
||||||
@ -28,6 +31,10 @@ task :generate do
|
|||||||
puts "## Generating Site with Jekyll"
|
puts "## Generating Site with Jekyll"
|
||||||
success = system "compass compile --css-dir #{source_dir}/stylesheets"
|
success = system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||||
abort("Generating CSS failed") unless success
|
abort("Generating CSS failed") unless success
|
||||||
|
success = system "rake analytics_data"
|
||||||
|
abort("Generating analytics data failed") unless success
|
||||||
|
success = system "rake blueprint_exchange_data"
|
||||||
|
abort("Generating blueprint exchange data failed") unless success
|
||||||
success = system "jekyll build"
|
success = system "jekyll build"
|
||||||
abort("Generating site failed") unless success
|
abort("Generating site failed") unless success
|
||||||
if ENV["CONTEXT"] != 'production'
|
if ENV["CONTEXT"] != 'production'
|
||||||
@ -63,6 +70,8 @@ task :preview, :listen do |t, args|
|
|||||||
puts "Starting to watch source with Jekyll and Compass."
|
puts "Starting to watch source with Jekyll and Compass."
|
||||||
puts "Now listening on http://localhost:#{server_port}"
|
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")
|
||||||
|
system "rake analytics_data"
|
||||||
|
system "rake blueprint_exchange_data"
|
||||||
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")
|
||||||
rackupPid = Process.spawn("rackup --port #{server_port} --host #{listen_addr}")
|
rackupPid = Process.spawn("rackup --port #{server_port} --host #{listen_addr}")
|
||||||
@ -168,6 +177,29 @@ task :clean do
|
|||||||
rm_rf [Dir.glob(".pygments-cache/**"), Dir.glob(".gist-cache/**"), Dir.glob(".sass-cache/**"), "source/stylesheets/screen.css"]
|
rm_rf [Dir.glob(".pygments-cache/**"), Dir.glob(".gist-cache/**"), Dir.glob(".sass-cache/**"), "source/stylesheets/screen.css"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Download data from analytics.home-assistant.io"
|
||||||
|
task :analytics_data do
|
||||||
|
uri = URI('https://analytics.home-assistant.io/data.json')
|
||||||
|
|
||||||
|
remote_data = JSON.parse(Net::HTTP.get(uri))
|
||||||
|
last_entry=remote_data.keys().sort().reverse()[0]
|
||||||
|
|
||||||
|
File.open("#{source_dir}/_data/analytics_data.json", "w") do |file|
|
||||||
|
file.write(JSON.generate(remote_data[last_entry]))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Download data from the blueprint exchange @ community.home-assistant.io"
|
||||||
|
task :blueprint_exchange_data do
|
||||||
|
uri = URI('https://community.home-assistant.io/c/blueprints-exchange/53/l/top/all.json')
|
||||||
|
|
||||||
|
remote_data = JSON.parse(Net::HTTP.get(uri))
|
||||||
|
|
||||||
|
File.open("#{source_dir}/_data/blueprint_exchange_data.json", "w") do |file|
|
||||||
|
file.write(JSON.generate(remote_data['topic_list']['topics']))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def get_stdin(message)
|
def get_stdin(message)
|
||||||
print message
|
print message
|
||||||
STDIN.gets.chomp
|
STDIN.gets.chomp
|
||||||
|
@ -66,7 +66,7 @@ titlecase: true # Converts page and post titles to titlecase
|
|||||||
collections:
|
collections:
|
||||||
integrations:
|
integrations:
|
||||||
output: true
|
output: true
|
||||||
cookbook:
|
examples:
|
||||||
output: true
|
output: true
|
||||||
docs:
|
docs:
|
||||||
output: true
|
output: true
|
||||||
@ -106,8 +106,8 @@ social:
|
|||||||
# Home Assistant release details
|
# Home Assistant release details
|
||||||
current_major_version: 2021
|
current_major_version: 2021
|
||||||
current_minor_version: 4
|
current_minor_version: 4
|
||||||
current_patch_version: 0
|
current_patch_version: 4
|
||||||
date_released: 2021-04-07
|
date_released: 2021-04-13
|
||||||
|
|
||||||
# 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.
|
||||||
|
@ -20,6 +20,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"markdown:lint": "remark --quiet --frail .",
|
"markdown:lint": "remark --quiet --frail .",
|
||||||
"textlint:all": "textlint source",
|
"textlint:all": "textlint source",
|
||||||
"textlint": "textlint source/_cookbook source/_docs source/_faq source/_integrations source/_lovelace source/cloud source/getting-started source/hassio source/lovelace"
|
"textlint": "textlint source/_examples source/_docs source/_faq source/_integrations source/_lovelace source/cloud source/getting-started source/hassio source/lovelace"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -208,8 +208,17 @@ $primary-color: #049cdb;
|
|||||||
border: 0;
|
border: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
width: 200px;
|
width: 100%;
|
||||||
max-width: 40%;
|
max-width: 40%;
|
||||||
|
max-height: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.square {
|
||||||
|
width: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.round {
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -455,7 +464,8 @@ div.note {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
.brand-logo-container {
|
.brand-logo-container {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Switch Philips Hue with enocean"
|
|
||||||
description: "Automation to switch a Philips Hue lamp with an enocean switch."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
Assume that you have an enocean wall switch and some Philips Hue lamps. The enocean wall switch will fire the event button_pressed and pass along several parameters which is used to turn on/off the lamps.
|
|
||||||
|
|
||||||
event_data:
|
|
||||||
|
|
||||||
* which
|
|
||||||
* pushed
|
|
||||||
* onoff
|
|
||||||
* id
|
|
||||||
* devname
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
enocean:
|
|
||||||
device: /dev/ttyUSB0
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: enocean
|
|
||||||
id: [0x00,0x01,0x02,0x03]
|
|
||||||
name: living_room_switch
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "Turn on living room light"
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: button_pressed
|
|
||||||
event_data:
|
|
||||||
onoff: 1
|
|
||||||
devname: living_room_switch
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: light.hue_color_lamp_3
|
|
||||||
|
|
||||||
- alias: "Turn off living room light"
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: button_pressed
|
|
||||||
event_data:
|
|
||||||
onoff: 0
|
|
||||||
devname: living_room_switch
|
|
||||||
action:
|
|
||||||
service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: light.hue_color_lamp_3
|
|
||||||
```
|
|
@ -1,121 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Examples using first light"
|
|
||||||
description: "Automation examples that trigger lights in the morning."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Create an input_boolean
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
input_boolean:
|
|
||||||
trigger_first_morning:
|
|
||||||
name: Waiting for first morning motion
|
|
||||||
icon: mdi:kettle
|
|
||||||
```
|
|
||||||
|
|
||||||
#### The Main Automation
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
## These first two control t input_boolean that allows the "first morning action" to occur
|
|
||||||
## If the action is triggered, it will also disable this boolean. This assumes you have the sun platform enabled.
|
|
||||||
|
|
||||||
automation:
|
|
||||||
#turns it on at 5am
|
|
||||||
- alias: "Enable First Morning Trigger"
|
|
||||||
trigger:
|
|
||||||
- platform: time
|
|
||||||
at: "05:00:00"
|
|
||||||
action:
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.trigger_first_morning
|
|
||||||
|
|
||||||
# turns it off an hour after sunrise
|
|
||||||
- alias: "Disable First Morning Trigger"
|
|
||||||
trigger:
|
|
||||||
- platform: sun
|
|
||||||
event: sunrise
|
|
||||||
offset: "01:00:00"
|
|
||||||
action:
|
|
||||||
service: homeassistant.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.trigger_first_morning
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# This is the main automation. It triggers when my motion sensor is triggered
|
|
||||||
# (in this case, a motion sensor from a security system attached to my Vera)
|
|
||||||
- alias: "First Morning Motion"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: binary_sensor.livingroom_motion
|
|
||||||
to: "on"
|
|
||||||
# only complete the automation if we're still waiting for the first motion
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: input_boolean.trigger_first_morning
|
|
||||||
state: "on"
|
|
||||||
|
|
||||||
action:
|
|
||||||
# turn off the "waiting" boolean regardless of whether lights will turn on
|
|
||||||
# so that this happens only once
|
|
||||||
- service: homeassistant.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.trigger_first_morning
|
|
||||||
|
|
||||||
# But only turn on lights if the living room and kitchen lights are off or dimmed
|
|
||||||
# If a condition tests false, the automation will end
|
|
||||||
- condition: and
|
|
||||||
conditions:
|
|
||||||
- condition: numeric_state
|
|
||||||
entity_id: light.livingroom_ec
|
|
||||||
# if light is off, force a 0, otherwise use the brightness value
|
|
||||||
value_template: '{% if is_state('light.livingroom_ec', 'on') %}{{ state_attr('light.livingroom_ec', 'brightness') }}{% else %}0{% endif %}'
|
|
||||||
# brightness below 50% (255 = 100%)
|
|
||||||
below: 128
|
|
||||||
- condition: numeric_state
|
|
||||||
entity_id: light.kitchen_bar
|
|
||||||
value_template: '{% if is_state('light.kitchen_bar', 'on') %}{{ state_attr('light.kitchen_bar', 'brightness') }}{% else %}0{% endif %}'
|
|
||||||
below: 128
|
|
||||||
- condition: numeric_state
|
|
||||||
entity_id: light.kitchen_ceiling
|
|
||||||
value_template: '{% if is_state('light.kitchen_ceiling', 'on') %}{{ state_attr('light.kitchen_ceiling', 'brightness') }}{% else %}0{% endif %}'
|
|
||||||
below: 128
|
|
||||||
|
|
||||||
# Trigger a scene
|
|
||||||
# You could add as many services or scenes as you'd like
|
|
||||||
- service: scene.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: scene.morning_first_motion
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
#### The Scene
|
|
||||||
|
|
||||||
Here is the Scene that is called via the Automations above.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# here's the scene that gets called. Lights in
|
|
||||||
# my living room and kitchen turn on.
|
|
||||||
scene:
|
|
||||||
- name: Morning First Motion
|
|
||||||
entities:
|
|
||||||
light.kitchen_ceiling:
|
|
||||||
state: on
|
|
||||||
brightness: 127
|
|
||||||
light.kitchen_bar:
|
|
||||||
state: on
|
|
||||||
brightness: 178
|
|
||||||
light.kitchen_above_cabinet:
|
|
||||||
state: on
|
|
||||||
brightness: 178
|
|
||||||
light.livingroom_ec:
|
|
||||||
state: on
|
|
||||||
brightness: 153
|
|
||||||
light.livingroom_track:
|
|
||||||
state: on
|
|
||||||
brightness: 153
|
|
||||||
```
|
|
@ -1,113 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Examples for flashing lights"
|
|
||||||
description: "Automation examples for flashing lights in case of an alarm."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Flashing lights triggered by an alarm
|
|
||||||
|
|
||||||
For flashing regular lights in case an alarm is triggered.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# AlmAct1 - switch to activate the alarm in Room1
|
|
||||||
# AlmSnd1 - switch for a buzzer
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "Alarm_PIR_Room1"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: binary_sensor.PIR1
|
|
||||||
to: "on"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: switch.AlmAct1
|
|
||||||
state: "on"
|
|
||||||
- condition: state
|
|
||||||
entity_id: script.alarm_room1
|
|
||||||
state: "off"
|
|
||||||
action:
|
|
||||||
# start alarm on movement if alarm activated
|
|
||||||
# and the alarm is not triggered
|
|
||||||
service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.alarm_room1
|
|
||||||
|
|
||||||
- alias: "flash_room1_start"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: switch.AlmSnd1
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.flash_room1
|
|
||||||
|
|
||||||
- alias: "flash_room1_stop"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: switch.REL1
|
|
||||||
to: "off"
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: switch.AlmSnd1
|
|
||||||
state: "off"
|
|
||||||
action:
|
|
||||||
service: script.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: script.flash_room1
|
|
||||||
|
|
||||||
script:
|
|
||||||
alarm_room1:
|
|
||||||
alias: "Alarm room1"
|
|
||||||
sequence:
|
|
||||||
- alias: "Alarm Room1 Start"
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: switch.AlmSnd1
|
|
||||||
- alias: "Set Ack Room1"
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.ack1
|
|
||||||
- alias: "email_Room1"
|
|
||||||
service: notify.email
|
|
||||||
data:
|
|
||||||
message: "Movement alarm in Room1"
|
|
||||||
- delay:
|
|
||||||
# time interval for alarm sound and light flashing
|
|
||||||
seconds: 60
|
|
||||||
- alias: "Alarm Room1 Stop"
|
|
||||||
service: homeassistant.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.AlmSnd1
|
|
||||||
|
|
||||||
flash_room1:
|
|
||||||
alias: "Flash Room1 On"
|
|
||||||
sequence:
|
|
||||||
- alias: "Light Room1 On"
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: switch.REL1
|
|
||||||
- delay:
|
|
||||||
# time for flash light on
|
|
||||||
seconds: 1
|
|
||||||
- alias: "Light Room1 Off"
|
|
||||||
service: homeassistant.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.REL1
|
|
||||||
- alias: "loop_room1"
|
|
||||||
service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.flash_loop
|
|
||||||
|
|
||||||
flash_loop:
|
|
||||||
alias: "Flash loop"
|
|
||||||
sequence:
|
|
||||||
- delay:
|
|
||||||
# time for flash light off
|
|
||||||
seconds: 1
|
|
||||||
- alias: "loop_room1"
|
|
||||||
service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.flash_room1
|
|
||||||
```
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Automation for rainy days"
|
|
||||||
description: "Basic example how to use weather conditions to set states"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
This requires a [Dark Sky](/integrations/darksky) sensor with the condition `precip_intensity` that tells if it's raining or not. You could also experiment with other attributes such as `cloud_cover`.
|
|
||||||
|
|
||||||
Turn on a light in the living room when it starts raining, someone is home, and it's afternoon or later.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Rainy Day"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: sensor.precip_intensity
|
|
||||||
to: "rain"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: all
|
|
||||||
state: "home"
|
|
||||||
- condition: time
|
|
||||||
after: "14:00"
|
|
||||||
before: "23:00"
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: light.couch_lamp
|
|
||||||
```
|
|
||||||
|
|
||||||
And then of course turn off the lamp when it stops raining but only if it's within an hour before sunset.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- alias: "Rain is over"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: sensor.precip_intensity
|
|
||||||
to: "None"
|
|
||||||
condition:
|
|
||||||
- condition: sun
|
|
||||||
after: "sunset"
|
|
||||||
after_offset: "-01:00:00"
|
|
||||||
action:
|
|
||||||
service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: light.couch_lamp
|
|
||||||
```
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Examples using the sun"
|
|
||||||
description: "Automation examples that use the sun."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Turn on the living room lights 45 minutes before sunset if anyone is at home
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
trigger:
|
|
||||||
platform: sun
|
|
||||||
event: sunset
|
|
||||||
offset: "-00:45:00"
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: all
|
|
||||||
state: home
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: group.living_room_lights
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Natural wake up light
|
|
||||||
|
|
||||||
_Note, Philips Hue and LIFX are currently the only light platforms that support transitions._
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
trigger:
|
|
||||||
platform: time
|
|
||||||
at: "07:15:00"
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: light.bedroom
|
|
||||||
data:
|
|
||||||
# 900 seconds = 15 minutes
|
|
||||||
transition: 900
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Send sun rise/sun set notifications
|
|
||||||
|
|
||||||
Send notifications through [PushBullet](/integrations/pushbullet) when the sun state is changed.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Send notification when sun rises"
|
|
||||||
trigger:
|
|
||||||
platform: sun
|
|
||||||
event: sunrise
|
|
||||||
offset: "+00:00:00"
|
|
||||||
action:
|
|
||||||
service: notify.pushbullet
|
|
||||||
data:
|
|
||||||
message: "The sun is up."
|
|
||||||
- alias: "Send notification when sun sets"
|
|
||||||
trigger:
|
|
||||||
platform: sun
|
|
||||||
event: sunset
|
|
||||||
offset: "+00:00:00"
|
|
||||||
action:
|
|
||||||
service: notify.pushbullet
|
|
||||||
data:
|
|
||||||
message: "The sun is down."
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Automations for lights and blinds based on solar elevation
|
|
||||||
|
|
||||||
Solar elevation automations can cope with offsets from sunset / sunrise as the seasons change better than using a time based offsets.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- alias: "Turn a few lights on when the sun gets dim"
|
|
||||||
trigger:
|
|
||||||
platform: numeric_state
|
|
||||||
entity_id: sun.sun
|
|
||||||
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
|
|
||||||
below: 3.5
|
|
||||||
action:
|
|
||||||
service: scene.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: scene.background_lights
|
|
||||||
|
|
||||||
- alias: "Turn more lights on as the sun gets dimmer"
|
|
||||||
trigger:
|
|
||||||
platform: numeric_state
|
|
||||||
entity_id: sun.sun
|
|
||||||
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
|
|
||||||
below: 1.5
|
|
||||||
action:
|
|
||||||
service: scene.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: scene.more_lights
|
|
||||||
|
|
||||||
- alias: "Close blind at dusk"
|
|
||||||
trigger:
|
|
||||||
platform: numeric_state
|
|
||||||
entity_id: sun.sun
|
|
||||||
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
|
|
||||||
below: -2.5
|
|
||||||
action:
|
|
||||||
service: switch.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.blind
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Examples sending notification depending of the presence"
|
|
||||||
description: "Examples sending notification depending of the presence"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
This will send a message when someone in your known devices list connects to your local network. In other words, when someone arrives home. It will only work if you are using the [Nmap](/integrations/nmap_tracker) device tracker or a similar integration.
|
|
||||||
|
|
||||||
This example uses [Telegram](/integrations/telegram) to send the notification.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
notify:
|
|
||||||
- name: Telegram
|
|
||||||
platform: telegram
|
|
||||||
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
chat_id: xxxxxxxxx
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the automation rule. Change `device_name_here` to match the device you want to track.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: device_tracker.device_name_here
|
|
||||||
from: "not_home"
|
|
||||||
to: "home"
|
|
||||||
action:
|
|
||||||
service: notify.Telegram
|
|
||||||
data:
|
|
||||||
message: "Person is now home"
|
|
||||||
```
|
|
@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Using time interval and input boolean"
|
|
||||||
description: "Automation to get a random color every 2 minutes that can be turned on/off."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Change Hue light on interval to random color based on state of an input boolean
|
|
||||||
|
|
||||||
_Note, Philips Hue is currently the only light platform that support the random effect._
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
input_boolean:
|
|
||||||
loop_livingcolors:
|
|
||||||
name: Loop LivingColors
|
|
||||||
initial: off
|
|
||||||
icon: mdi:spotlight
|
|
||||||
|
|
||||||
automation:
|
|
||||||
# Changes Hue light every two minutes to random color if input boolean is set to on
|
|
||||||
- alias: "Set LivingColors to random color"
|
|
||||||
trigger:
|
|
||||||
platform: time_pattern
|
|
||||||
minutes: "/2"
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: input_boolean.loop_livingcolors
|
|
||||||
state: "on"
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: light.woonkamer_livingcolors
|
|
||||||
data:
|
|
||||||
effect: random
|
|
||||||
transition: 5
|
|
||||||
brightness: 255
|
|
||||||
```
|
|
@ -1,151 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Dim (and brighten) lights via a remote"
|
|
||||||
description: "The scripts and automations to allow you to use a remote to dim and brighten a light"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
This requires both a dimmable light, and a Z-Wave remote control that sends one scene when a button is held, and another when released. This ensures that the scripts (which follow) are stopped, avoiding the risks of a script that never ends.
|
|
||||||
|
|
||||||
In the following automations, replace `zwave.YOUR_REMOTE` with the actual entity ID of your controller, and `light.YOUR_LIGHT` with the actual entity ID of your light.
|
|
||||||
|
|
||||||
For the controller this was written for scene ID 13 was sent when the up button was held, and 15 when released. Similarly, scene 14 when the down button was held, and 16 when released. You'll need to use the scene IDs that are sent by your remote if different.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
|
|
||||||
- alias: "Make the lights go bright"
|
|
||||||
initial_state: "on"
|
|
||||||
trigger:
|
|
||||||
- platform: event
|
|
||||||
event_type: zwave.scene_activated
|
|
||||||
event_data:
|
|
||||||
scene_id: 13
|
|
||||||
entity_id: zwave.YOUR_REMOTE
|
|
||||||
action:
|
|
||||||
- service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.ramp_light
|
|
||||||
data:
|
|
||||||
variables:
|
|
||||||
direction: up
|
|
||||||
light: light.YOUR_LIGHT
|
|
||||||
|
|
||||||
- alias: "Make the lights go dim"
|
|
||||||
initial_state: "on"
|
|
||||||
trigger:
|
|
||||||
- platform: event
|
|
||||||
event_type: zwave.scene_activated
|
|
||||||
event_data:
|
|
||||||
scene_id: 14
|
|
||||||
entity_id: zwave.YOUR_REMOTE
|
|
||||||
action:
|
|
||||||
- service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.ramp_light
|
|
||||||
data:
|
|
||||||
variables:
|
|
||||||
direction: down
|
|
||||||
light: light.YOUR_LIGHT
|
|
||||||
|
|
||||||
- alias: "Stop the light just there"
|
|
||||||
initial_state: "on"
|
|
||||||
trigger:
|
|
||||||
- platform: event
|
|
||||||
event_type: zwave.scene_activated
|
|
||||||
event_data:
|
|
||||||
scene_id: 15
|
|
||||||
entity_id: zwave.YOUR_REMOTE
|
|
||||||
- platform: event
|
|
||||||
event_type: zwave.scene_activated
|
|
||||||
event_data:
|
|
||||||
scene_id: 16
|
|
||||||
entity_id: zwave.YOUR_REMOTE
|
|
||||||
action:
|
|
||||||
- service: script.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: script.ramp_light
|
|
||||||
```
|
|
||||||
|
|
||||||
There are two variables that control the speed of the change for the script below. The first is the step -- small steps create a smooth transition. The second is the delay -- larger delays will create a slower transition.
|
|
||||||
Please note that some lights do not update their new brightness attribute very quickly, so make sure to use a large enough delay for your particular light.
|
|
||||||
|
|
||||||
There are two other variables that control the minimum and maximum brightness levels at which to stop the script.
|
|
||||||
|
|
||||||
To allow flexibility all four variables are controlled by [Input Number](/integrations/input_number/) entities so that it's easy to tune (or manage through an automation).
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
input_number:
|
|
||||||
light_step:
|
|
||||||
name: "Step the lights this much"
|
|
||||||
initial: 20
|
|
||||||
min: 1
|
|
||||||
max: 64
|
|
||||||
step: 1
|
|
||||||
|
|
||||||
light_minimum:
|
|
||||||
name: "No dimmer than this"
|
|
||||||
initial: 5
|
|
||||||
min: 1
|
|
||||||
max: 255
|
|
||||||
step: 1
|
|
||||||
|
|
||||||
light_maximum:
|
|
||||||
name: "No brighter than this"
|
|
||||||
initial: 255
|
|
||||||
min: 50
|
|
||||||
max: 255
|
|
||||||
step: 1
|
|
||||||
|
|
||||||
light_delay_ms:
|
|
||||||
name: "Step the lights this often (ms)"
|
|
||||||
initial: 500
|
|
||||||
min: 100
|
|
||||||
max: 5000
|
|
||||||
step: 100
|
|
||||||
```
|
|
||||||
|
|
||||||
Now the script.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
```yaml
|
|
||||||
script:
|
|
||||||
ramp_light:
|
|
||||||
alias: "Ramp Light Brightness"
|
|
||||||
description: Ramp light brightness up or down
|
|
||||||
fields:
|
|
||||||
direction:
|
|
||||||
description: "Direction to change brightness: up or down"
|
|
||||||
example: up
|
|
||||||
light:
|
|
||||||
description: Light entity_id
|
|
||||||
example: light.family_room_lamp
|
|
||||||
mode: restart
|
|
||||||
sequence:
|
|
||||||
- repeat:
|
|
||||||
while:
|
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{% set br = state_attr(light, 'brightness')|int(0) %}
|
|
||||||
{% set mn = states('input_number.light_minimum')|int %}
|
|
||||||
{% set mx = states('input_number.light_maximum')|int %}
|
|
||||||
{{ direction == 'up' and br < mx or
|
|
||||||
direction == 'down' and br > mn }}
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: "{{ light }}"
|
|
||||||
data:
|
|
||||||
brightness: >
|
|
||||||
{% set br = state_attr(light, 'brightness')|int(0) %}
|
|
||||||
{% set mn = states('input_number.light_minimum')|int %}
|
|
||||||
{% set mx = states('input_number.light_maximum')|int %}
|
|
||||||
{% set st = states('input_number.light_step')|int %}
|
|
||||||
{% if direction == 'up' %}
|
|
||||||
{{ [br + st, mx]|min }}
|
|
||||||
{% else %}
|
|
||||||
{{ [br - st, mn]|max }}
|
|
||||||
{% endif %}
|
|
||||||
- delay:
|
|
||||||
milliseconds: "{{ states('input_number.light_delay_ms')|int }}"
|
|
||||||
```
|
|
||||||
{% endraw %}
|
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Dim lights when playing media"
|
|
||||||
description: "Dim lights up or down when playing media"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
Like it how the lights dim up/down at the movies? Do it at home as well!
|
|
||||||
|
|
||||||
This example uses the [media player](/integrations/media_player/), [lights](/integrations/light/) (transitions) and the [sun](/integrations/sun/) integration. We'll use actions to detect media player state changes and [scenes](/integrations/scene/) to control multiple lights and transition between scenes.
|
|
||||||
|
|
||||||
#### Scenes
|
|
||||||
One scene for normal light, one for when movies are on. A 2 second transition gives a nice 'feel' to the switch.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
scene:
|
|
||||||
- name: Livingroom normal
|
|
||||||
entities:
|
|
||||||
light.light1:
|
|
||||||
state: on
|
|
||||||
transition: 2
|
|
||||||
brightness_pct: 60
|
|
||||||
light.light2:
|
|
||||||
state: on
|
|
||||||
transition: 2
|
|
||||||
brightness_pct: 85
|
|
||||||
- name: Livingroom dim
|
|
||||||
entities:
|
|
||||||
light.light1:
|
|
||||||
state: on
|
|
||||||
transition: 2
|
|
||||||
brightness_pct: 30
|
|
||||||
light.light2:
|
|
||||||
state: on
|
|
||||||
transition: 2
|
|
||||||
brightness_pct: 55
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
#### Automation
|
|
||||||
The paused/stopped state is best matched using "from: 'playing'". Adding in the sun condition as we only want this when it's dark.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Media player paused/stopped"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: media_player.htpc
|
|
||||||
from: "playing"
|
|
||||||
to: "idle"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: sun.sun
|
|
||||||
state: "below_horizon"
|
|
||||||
action:
|
|
||||||
service: scene.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: scene.livingroom_normal
|
|
||||||
|
|
||||||
- alias: "Media player playing"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: media_player.htpc
|
|
||||||
to: "playing"
|
|
||||||
from: "idle"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: sun.sun
|
|
||||||
state: "below_horizon"
|
|
||||||
action:
|
|
||||||
service: scene.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: scene.livingroom_dim
|
|
||||||
```
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Foscam Recording during Away Mode Only using Pan/Tilt/Zoom Control and Motion Detection"
|
|
||||||
description: "Example of how to set Foscam to only have Motion Detection Recording while no one is home. When users are home the Foscam will indicate it is not recording by pointing down and away from users"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
This requires a [Foscam IP Camera](/integrations/foscam) camera with PTZ (Pan, Tilt, Zoom) and CGI functionality ([Source](https://www.foscam.es/descarga/Foscam-IPCamera-CGI-User-Guide-AllPlatforms-2015.11.06.pdf))
|
|
||||||
|
|
||||||
Foscam Cameras can be controlled by Home Assistant through a number of CGI commands.
|
|
||||||
The following outlines examples of the switch, services, and scripts required to move between 2 preset destinations while controlling motion detection, but many other options of movement are provided in the Foscam CGI User Guide linked above.
|
|
||||||
|
|
||||||
The `switch.foscam_motion` will control whether the motion detection is on or off. This switch supports `statecmd`, which checks the current state of motion detection.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Replace admin and password with an "Admin" privileged Foscam user
|
|
||||||
# Replace ipaddress with the local IP address of your Foscam
|
|
||||||
switch:
|
|
||||||
platform: command_line
|
|
||||||
switches:
|
|
||||||
#Switch for Foscam Motion Detection
|
|
||||||
foscam_motion:
|
|
||||||
command_on: "curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password""
|
|
||||||
command_off: 'curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"'
|
|
||||||
command_state: 'curl -k --silent --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep "isEnable" | cut -b 15'
|
|
||||||
value_template: '{{ value == "1" }}'
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
The service `shell_command.foscam_turn_off` sets the camera to point down and away to indicate it is not recording, and `shell_command.foscam_turn_on` sets the camera to point where I'd like to record. Each of these services require preset points to be added to your camera. See source above for additional information.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
shell_command:
|
|
||||||
#Created a preset point in Foscam Web Interface named Off which essentially points the camera down and away
|
|
||||||
foscam_turn_off: 'curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Off&usr=admin&pwd=password"'
|
|
||||||
#Created a preset point in Foscam Web Interface named Main which points in the direction I would like to record
|
|
||||||
foscam_turn_on: 'curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Main&usr=admin&pwd=password"'
|
|
||||||
```
|
|
||||||
|
|
||||||
The `script.foscam_off` and `script.foscam_on` can be used to set the motion detection appropriately, and then move the camera. These scripts can be called as part of an automation with `device_tracker` triggers to set `home` and `not_home` modes for your Foscam and disable motion detection recording while `home`.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
script:
|
|
||||||
foscam_off:
|
|
||||||
sequence:
|
|
||||||
- service: switch.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.foscam_motion
|
|
||||||
- service: shell_command.foscam_turn_off
|
|
||||||
foscam_on:
|
|
||||||
sequence:
|
|
||||||
- service: switch.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.foscam_motion
|
|
||||||
- service: shell_command.foscam_turn_on
|
|
||||||
- service: switch.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: switch.foscam_motion
|
|
||||||
```
|
|
||||||
|
|
||||||
To automate Foscam being set to "on" (facing the correct way with motion sensor on), I used the following simple automation:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Set Foscam to Away Mode when I leave home"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: group.family
|
|
||||||
from: "home"
|
|
||||||
action:
|
|
||||||
service: script.foscam_on
|
|
||||||
- alias: "Set Foscam to Home Mode when I arrive Home"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: group.family
|
|
||||||
to: "home"
|
|
||||||
action:
|
|
||||||
service: script.foscam_off
|
|
||||||
```
|
|
@ -1,55 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Send notification if new Home Assistant release"
|
|
||||||
description: "Basic example of how to send a notification if a new Home Assistant release is available"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
The following example sends a notification via XMPP if a new Home Assistant release is available:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
notify:
|
|
||||||
- platform: xmpp
|
|
||||||
name: jabber
|
|
||||||
sender: sender@jabber.org
|
|
||||||
password: !secret xmpp_password
|
|
||||||
recipient: recipient@jabber.org
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "Update notification"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.updater
|
|
||||||
from: "off"
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
- service: notify.jabber
|
|
||||||
data:
|
|
||||||
message: "There is a new Home Assistant release available."
|
|
||||||
```
|
|
||||||
|
|
||||||
You can use [templates](/topics/templating/) to include the release number of Home Assistant if you prefer. The following example sends a notification via [Pushbullet](/integrations/pushbullet) with the Home Assistant version in the message.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
notify:
|
|
||||||
- platform: pushbullet
|
|
||||||
api_key: "YOUR_KEY_HERE"
|
|
||||||
name: pushbullet
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "Update notification"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.updater
|
|
||||||
from: "off"
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
- service: notify.pushbullet
|
|
||||||
data:
|
|
||||||
title: "New Home Assistant Release"
|
|
||||||
target: "YOUR_TARGET_HERE" #See Pushbullet integration for usage
|
|
||||||
message: "Home Assistant {{ state_attr('binary_sensor.updater', 'newest_version') }} is now available."
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
@ -1,49 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Send notification based on sensor"
|
|
||||||
description: "Basic example of how to send a templated notification if a sensor is over a given threshold"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
The following example sends a notification via pushbullet if a sensor is over a critical value:
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
notify me:
|
|
||||||
platform: pushbullet
|
|
||||||
api_key: "API_KEY_HERE"
|
|
||||||
name: mypushbullet
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "FanOn"
|
|
||||||
trigger:
|
|
||||||
platform: numeric_state
|
|
||||||
entity_id: sensor.furnace
|
|
||||||
above: 2
|
|
||||||
action:
|
|
||||||
service: notify.mypushbullet
|
|
||||||
data:
|
|
||||||
title: "Furnace fan is running"
|
|
||||||
message: "Fan running because current is {{ states('sensor.furnace') }} amps"
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
If you also want a notification when it drops back down below that limit, you could add this as well:
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- alias: "FanOff"
|
|
||||||
trigger:
|
|
||||||
platform: numeric_state
|
|
||||||
entity_id: sensor.furnace
|
|
||||||
below: 2
|
|
||||||
action:
|
|
||||||
service: notify.mypushbullet
|
|
||||||
data:
|
|
||||||
title: "Furnace fan is stopped"
|
|
||||||
message: "Fan stopped because current is {{ states('sensor.furnace') }} amps"
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
@ -1,171 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Perform actions based on input select"
|
|
||||||
description: "Example playing media to Chromecast based on input select element"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
This example uses an [`input_select`](/integrations/input_select/) element to pick which mp3 file to play on a [Chromecast](/integrations/cast/).
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Define our dropdown list
|
|
||||||
input_select:
|
|
||||||
lullaby:
|
|
||||||
name: Lullaby
|
|
||||||
options:
|
|
||||||
- Rain
|
|
||||||
- Babbling Brook
|
|
||||||
- None
|
|
||||||
initial: None
|
|
||||||
icon: mdi:weather-rainy
|
|
||||||
|
|
||||||
# Define our media player
|
|
||||||
media_player:
|
|
||||||
- platform: cast
|
|
||||||
host: chromecast-nursery
|
|
||||||
name: Nursery
|
|
||||||
|
|
||||||
automation:
|
|
||||||
# If you select "Rain", play the "rain.mp3" file
|
|
||||||
- alias: "Play Rain Lullaby"
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_select.lullaby
|
|
||||||
to: "Rain"
|
|
||||||
|
|
||||||
action:
|
|
||||||
service: media_player.play_media
|
|
||||||
target:
|
|
||||||
entity_id: media_player.nursery
|
|
||||||
data:
|
|
||||||
media_content_id: http://fileserver/rain.mp3
|
|
||||||
media_content_type: music
|
|
||||||
|
|
||||||
|
|
||||||
# If you select "Babbling Brook", play the "babbling_brook.mp3" file
|
|
||||||
- alias: "Play Babbling Brook Lullaby"
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_select.lullaby
|
|
||||||
to: "Babbling Brook"
|
|
||||||
|
|
||||||
action:
|
|
||||||
service: media_player.play_media
|
|
||||||
target:
|
|
||||||
entity_id: media_player.nursery
|
|
||||||
data:
|
|
||||||
media_content_id: http://fileserver/babbling_brook.mp3
|
|
||||||
media_content_type: music
|
|
||||||
|
|
||||||
# If you select "None, turn the Chromecast off
|
|
||||||
- alias: "Stop the Lullaby"
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_select.lullaby
|
|
||||||
to: "None"
|
|
||||||
|
|
||||||
action:
|
|
||||||
service: media_player.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: media_player.nursery
|
|
||||||
```
|
|
||||||
A little bit more complex example that uses [`input_select`](/integrations/input_select/) and template to decide what to play, and which [Chromecast](/integrations/cast/) to play on.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
input_select:
|
|
||||||
radio_station:
|
|
||||||
name: Radio Station
|
|
||||||
options:
|
|
||||||
- Z88.3
|
|
||||||
- Virgin
|
|
||||||
- RMC
|
|
||||||
- rmcHQ
|
|
||||||
- 105
|
|
||||||
- None
|
|
||||||
initial: None
|
|
||||||
icon: mdi:radio
|
|
||||||
radio_player:
|
|
||||||
name: Radio Player
|
|
||||||
options:
|
|
||||||
- Mansarda
|
|
||||||
- Doccia
|
|
||||||
- Bed
|
|
||||||
- Bath
|
|
||||||
- Salotto
|
|
||||||
- Salotto Video
|
|
||||||
- None
|
|
||||||
initial: None
|
|
||||||
icon: mdi:airplay
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "Stop Streaming Radio"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: input_select.radio_station
|
|
||||||
to: "None"
|
|
||||||
action:
|
|
||||||
service: media_player.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: >
|
|
||||||
{% if is_state("input_select.radio_player", "Mansarda") %}
|
|
||||||
media_player.bed_2
|
|
||||||
{%-elif is_state("input_select.radio_player", "Doccia") %}
|
|
||||||
media_player.bed_3
|
|
||||||
{%-elif is_state("input_select.radio_player", "Bed") %}
|
|
||||||
media_player.bed
|
|
||||||
{%-elif is_state("input_select.radio_player", "Bath") %}
|
|
||||||
media_player.bath
|
|
||||||
{%-elif is_state("input_select.radio_player", "Salotto") %}
|
|
||||||
media_player.salotto
|
|
||||||
{%-elif is_state("input_select.radio_player", "Salotto Video") %}
|
|
||||||
media_player.salotto_video
|
|
||||||
{% else %}
|
|
||||||
none
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
- alias: "Stream Radio - Template"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: input_select.radio_station
|
|
||||||
action:
|
|
||||||
- service: media_player.play_media
|
|
||||||
target:
|
|
||||||
entity_id: >
|
|
||||||
{% if is_state("input_select.radio_player", "Mansarda") %}
|
|
||||||
media_player.bed_2
|
|
||||||
{%-elif is_state("input_select.radio_player", "Doccia") %}
|
|
||||||
media_player.bed_3
|
|
||||||
{%-elif is_state("input_select.radio_player", "Bed") %}
|
|
||||||
media_player.bed
|
|
||||||
{%-elif is_state("input_select.radio_player", "Bath") %}
|
|
||||||
media_player.bath
|
|
||||||
{%-elif is_state("input_select.radio_player", "Salotto") %}
|
|
||||||
media_player.salotto
|
|
||||||
{%-elif is_state("input_select.radio_player", "Salotto Video") %}
|
|
||||||
media_player.salotto_video
|
|
||||||
{% else %}
|
|
||||||
none
|
|
||||||
{% endif %}
|
|
||||||
data:
|
|
||||||
media_content_id: >
|
|
||||||
{% if is_state("input_select.radio_station", "Z88.3") %}
|
|
||||||
http://ice.zradio.org/z/high.mp3
|
|
||||||
{%-elif is_state("input_select.radio_station", "Virgin") %}
|
|
||||||
http://icecast.unitedradio.it/Virgin.mp3
|
|
||||||
{%-elif is_state("input_select.radio_station", "RMC") %}
|
|
||||||
http://icecast.unitedradio.it/RMC.mp3
|
|
||||||
{%-elif is_state("input_select.radio_station", "rmcHQ") %}
|
|
||||||
http://icecast.unitedradio.it/rmcHQ.mp3
|
|
||||||
{%-elif is_state("input_select.radio_station", "105") %}
|
|
||||||
http://icecast.unitedradio.it/Radio105.mp3
|
|
||||||
{% else %}
|
|
||||||
none
|
|
||||||
{% endif %}
|
|
||||||
media_content_type: "music"
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
@ -1,99 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Restart Home Assistant if Wemo Switch is not detected"
|
|
||||||
description: "Restart Home Assistant if Wemo Switch is not detected."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
### Restart Home Assistant
|
|
||||||
|
|
||||||
This configuration example is restarting Home Assistant if a [WeMo](/integrations/wemo) switch is not detected. An additional MQTT switch is present for stopping Home Assistant and can be triggered by [IFTTT](/integrations/ifttt/). The running batch script will automatically restart Home Assistant if the process isn't found anymore.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
mqtt:
|
|
||||||
broker: 127.0.0.1
|
|
||||||
port: 1883
|
|
||||||
client_id: home-assistant-1
|
|
||||||
keepalive: 60
|
|
||||||
|
|
||||||
device_tracker:
|
|
||||||
- platform: nmap_tracker
|
|
||||||
hosts: 192.168.0.1-255
|
|
||||||
home_interval: 1
|
|
||||||
interval_seconds: 30
|
|
||||||
consider_home: 900
|
|
||||||
|
|
||||||
ifttt:
|
|
||||||
key: ***
|
|
||||||
|
|
||||||
notify:
|
|
||||||
- platform: pushbullet
|
|
||||||
api_key: ***
|
|
||||||
name: pushbullet
|
|
||||||
|
|
||||||
wemo:
|
|
||||||
discovery: true
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: mqtt
|
|
||||||
state_topic: "home/killhass"
|
|
||||||
command_topic: "home/killhass"
|
|
||||||
name: "KillHass"
|
|
||||||
qos: 0
|
|
||||||
payload_on: "ON"
|
|
||||||
payload_of: "OFF"
|
|
||||||
optimistic: false
|
|
||||||
|
|
||||||
script:
|
|
||||||
restarthawemo:
|
|
||||||
alias: "Restart HA if WeMo isn't found after 15 minutes"
|
|
||||||
sequence:
|
|
||||||
- delay:
|
|
||||||
minutes: 15
|
|
||||||
- service: notify.pushbullet
|
|
||||||
data:
|
|
||||||
message: "WeMo not found, restarting HA"
|
|
||||||
- service: switch.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: switch.killhass
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: "Restart HA if WeMo switch isn't found after 15 minutes"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: device_tracker.wemo
|
|
||||||
from: "not_home"
|
|
||||||
to: "home"
|
|
||||||
condition:
|
|
||||||
- condition: template
|
|
||||||
value_template: '{% if states.switch.wemo %}false{% else %}true{% endif %}'
|
|
||||||
- condition: state
|
|
||||||
entity_id: script.restarthawemo
|
|
||||||
state: "off"
|
|
||||||
action:
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.restarthawemo
|
|
||||||
- alias: "Stop HA"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: switch.KillHass
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
service: homeassistant.stop
|
|
||||||
- alias: "Stop restarting HA is WeMo is found"
|
|
||||||
trigger:
|
|
||||||
platform: template
|
|
||||||
value_template: '{% if states.switch.wemo %}true{% else %}false{% endif %}'
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: script.restarthawemo
|
|
||||||
state: "on"
|
|
||||||
action:
|
|
||||||
service: homeassistant.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: script.restarthawemo
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Send a reminder"
|
|
||||||
description: "Send a reminder"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
Always forget to eat lunch? Let Home Assistant send you a reminder.
|
|
||||||
|
|
||||||
Add a [notify platform](/integrations/notify/) of your choice.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
notify:
|
|
||||||
- platform: xmpp
|
|
||||||
name: jabber
|
|
||||||
sender: YOUR_JID
|
|
||||||
password: YOUR_JABBER_ACCOUNT_PASSWORD
|
|
||||||
recipient: YOUR_RECIPIENT
|
|
||||||
```
|
|
||||||
|
|
||||||
and automation part to your `configuration.yaml` file.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Send message at a given time"
|
|
||||||
trigger:
|
|
||||||
platform: time
|
|
||||||
at: "12:15:00"
|
|
||||||
action:
|
|
||||||
service: notify.jabber
|
|
||||||
data:
|
|
||||||
message: "Time for lunch"
|
|
||||||
```
|
|
@ -1,68 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Sonos say script to speak with text-to-speech"
|
|
||||||
description: "Sonos say script to use text-to-speech with Sonos"
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Sonos say script to speak with text-to-speech
|
|
||||||
|
|
||||||
This script allows you to use [TTS](/integrations/#text-to-speech) on Sonos.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
script:
|
|
||||||
sonos_say:
|
|
||||||
alias: "Sonos TTS script"
|
|
||||||
sequence:
|
|
||||||
- service: sonos.snapshot
|
|
||||||
target:
|
|
||||||
entity_id: "{{ sonos_entity }}"
|
|
||||||
- service: sonos.unjoin
|
|
||||||
target:
|
|
||||||
entity_id: "{{ sonos_entity }}"
|
|
||||||
- service: media_player.volume_set
|
|
||||||
data:
|
|
||||||
entity_id: "{{ sonos_entity }}"
|
|
||||||
volume_level: "{{ volume }}"
|
|
||||||
- service: tts.voicerss_say
|
|
||||||
data:
|
|
||||||
entity_id: "{{ sonos_entity }}"
|
|
||||||
message: "{{ message }}"
|
|
||||||
- delay: "{{ delay }}"
|
|
||||||
- service: sonos.restore
|
|
||||||
target:
|
|
||||||
entity_id: "{{ sonos_entity }}"
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
We call this now with:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "test"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: input_boolean.mytest
|
|
||||||
action:
|
|
||||||
- service: script.sonos_say
|
|
||||||
data:
|
|
||||||
sonos_entity: media_player.office
|
|
||||||
volume: 0.5
|
|
||||||
message: "Your husband coming home!"
|
|
||||||
delay: "00:00:05"
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that this example uses the `voicerss` text-to-speech platform. There are many platforms that can be used. The one installed by default with Home Assistant is Google TTS. This appears in your `configuration.yaml` file as:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
tts:
|
|
||||||
- platform: google_translate
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to use this TTS engine, change the line in the example provided to:
|
|
||||||
|
|
||||||
```txt
|
|
||||||
- service: tts.google_translate_say
|
|
||||||
```
|
|
@ -1,96 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Track your phone battery level"
|
|
||||||
description: "Basic example how to track the battery level of your mobile devices."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
## Android and iOS Devices
|
|
||||||
|
|
||||||
The [Home Assistant Companion Apps](https://companion.home-assistant.io/) for iOS and Android pass the current battery level to Home Assistant with every location update. The default name of the sensor used is `sensor.battery_level`.
|
|
||||||
|
|
||||||
### iOS Devices
|
|
||||||
|
|
||||||
If you have a device running iOS (iPhone, iPad, etc), The [iCloud](/integrations/icloud) integration is gathering various details about your device including the battery level. To display it in the Frontend use a [template sensor](/integrations/template). You can also use the `battery` [sensor device class](/integrations/sensor/#device-class) to dynamically change the icon with the battery level.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
battery_iphone:
|
|
||||||
friendly_name: iPhone Battery
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: >-
|
|
||||||
{%- if state_attr('device_tracker.iphone', 'battery') %}
|
|
||||||
{{ state_attr('device_tracker.iphone', 'battery')|round }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('sensor.battery_iphone') }}
|
|
||||||
{%- endif %}
|
|
||||||
device_class: battery
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
### Android Devices
|
|
||||||
|
|
||||||
On your Android device, once the official [Home Assistant Companion app](https://companion.home-assistant.io/) is installed and connected to your Home Assistance instance, you will be able to display the battery level in the frontend by adding a [template sensor](/integrations/template) to your configuration YAML file. You can also use the battery [sensor device class](/integrations/sensor/#device-class) to dynamically change the icon with the battery level.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
battery_phone:
|
|
||||||
friendly_name: AndroidPhone Battery
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: >-
|
|
||||||
{%- if state_attr('device_tracker.xxxxx', 'battery_level') %}
|
|
||||||
{{ state_attr('device_tracker.xxxxx', 'battery_level')|round }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('device_tracker.xxxxx') }}
|
|
||||||
{%- endif %}
|
|
||||||
device_class: battery
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
Replace 'device_tracker.xxxxx' with your phone name as shown under Configuration/Devices Device Info/Entities, for example: 'device_tracker.mi_a1'
|
|
||||||
|
|
||||||
#### MQTT
|
|
||||||
|
|
||||||
If you have configured Owntracks to send reports via MQTT you can use the received data via a MQTT sensor.
|
|
||||||
Replace username with your MQTT username (for the embedded MQTT it's simply homeassistant), and deviceid with the set Device ID in Owntracks.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
sensor:
|
|
||||||
- platform: mqtt
|
|
||||||
state_topic: "owntracks/username/deviceid"
|
|
||||||
name: "Battery Tablet"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: "{{ value_json.batt }}"
|
|
||||||
device_class: battery
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
#### HTTP
|
|
||||||
|
|
||||||
If you have configured Owntracks to send reports to your Home Assistant instance via HTTP you can use a template sensor.
|
|
||||||
Replace `deviceid` with the set Device ID in Owntracks.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
your_battery_sensor_name:
|
|
||||||
value_template: "{{ state_attr('device_tracker.deviceid', 'battery_level') }}"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
@ -1,106 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Turn on lights for 10 minutes after motion detected"
|
|
||||||
description: "Turn on lights for 10 minutes when motion detected."
|
|
||||||
ha_category: Automation Examples
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Turn on lights with a resettable off timer
|
|
||||||
|
|
||||||
This recipe will turn on a light when there is motion and turn off the light when ten minutes has passed without any motion events.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Turn on kitchen light when there is movement"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: sensor.motion_sensor
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: light.kitchen_light
|
|
||||||
|
|
||||||
- alias: "Turn off kitchen light 10 minutes after last movement"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: sensor.motion_sensor
|
|
||||||
to: "off"
|
|
||||||
for:
|
|
||||||
minutes: 10
|
|
||||||
action:
|
|
||||||
service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: light.kitchen_light
|
|
||||||
```
|
|
||||||
|
|
||||||
Or in the case of multiple sensors/triggers:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
automation:
|
|
||||||
- alias: "Turn on hallway lights when the doorbell rings, the front door opens or if there is movement"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: sensor.motion_sensor, binary_sensor.front_door, binary_sensor.doorbell
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- light.hallway_0
|
|
||||||
- light.hallway_1
|
|
||||||
- service: timer.start
|
|
||||||
target:
|
|
||||||
entity_id: timer.hallway
|
|
||||||
|
|
||||||
- alias: "Turn off hallway lights 10 minutes after trigger"
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: timer.finished
|
|
||||||
event_data:
|
|
||||||
entity_id: timer.hallway
|
|
||||||
action:
|
|
||||||
service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- light.hallway_0
|
|
||||||
- light.hallway_1
|
|
||||||
|
|
||||||
timer:
|
|
||||||
hallway:
|
|
||||||
duration: "00:10:00"
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also restrict lights from turning on based on time of day and implement transitions for fading lights on and off.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- alias: "Motion Sensor Lights On"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
|
|
||||||
to: "on"
|
|
||||||
condition:
|
|
||||||
condition: time
|
|
||||||
after: "07:30"
|
|
||||||
before: "23:30"
|
|
||||||
action:
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: group.office_lights
|
|
||||||
data:
|
|
||||||
transition: 15
|
|
||||||
|
|
||||||
|
|
||||||
- alias: "Motion Sensor Lights Off"
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
|
|
||||||
to: "off"
|
|
||||||
for:
|
|
||||||
minutes: 15
|
|
||||||
action:
|
|
||||||
- service: homeassistant.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: group.office_lights
|
|
||||||
data:
|
|
||||||
transition: 160
|
|
||||||
```
|
|
@ -10,8 +10,6 @@
|
|||||||
description: "Integrations (see below) used to be known as components."
|
description: "Integrations (see below) used to be known as components."
|
||||||
- topic: Condition
|
- topic: Condition
|
||||||
description: "[Conditions](/docs/scripts/conditions/) are an optional part of an automation that will prevent an action from firing if they are not met."
|
description: "[Conditions](/docs/scripts/conditions/) are an optional part of an automation that will prevent an action from firing if they are not met."
|
||||||
- topic: Cookbook
|
|
||||||
description: "The [Cookbook](/cookbook/) contains a set of configuration examples of Home Assistant from the community."
|
|
||||||
- topic: Cover
|
- topic: Cover
|
||||||
description: "[Covers](/integrations/cover) are devices such as blinds, garage doors, etc that can be opened and closed and optionally set to a specific position."
|
description: "[Covers](/integrations/cover) are devices such as blinds, garage doors, etc that can be opened and closed and optionally set to a specific position."
|
||||||
- topic: Customize
|
- topic: Customize
|
||||||
|
@ -20,7 +20,7 @@ If you want to use a different folder for configuration, use the configuration c
|
|||||||
|
|
||||||
Inside your configuration folder is the file `configuration.yaml`. This is the main file that contains integrations to be loaded along with their configurations. Throughout the documentation you will find snippets that you can add to your configuration file to enable specific functionality.
|
Inside your configuration folder is the file `configuration.yaml`. This is the main file that contains integrations to be loaded along with their configurations. Throughout the documentation you will find snippets that you can add to your configuration file to enable specific functionality.
|
||||||
|
|
||||||
If you run into trouble while configuring Home Assistant, refer the [configuration troubleshooting page](/getting-started/troubleshooting-configuration/) and at the [`configuration.yaml` examples](/cookbook/#example-configurationyaml).
|
If you run into trouble while configuring Home Assistant, refer the [configuration troubleshooting page](/getting-started/troubleshooting-configuration/) and at the [`configuration.yaml` examples](/examples/#example-configurationyaml).
|
||||||
|
|
||||||
<div class='note tip'>
|
<div class='note tip'>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ description: "Splitting the configuration.yaml into several files."
|
|||||||
|
|
||||||
So you've been using Home Assistant for a while now and your `configuration.yaml` file brings people to tears or you simply want to start off with the distributed approach, here's how to split the `configuration.yaml` into more manageable (read: humanly readable) pieces.
|
So you've been using Home Assistant for a while now and your `configuration.yaml` file brings people to tears or you simply want to start off with the distributed approach, here's how to split the `configuration.yaml` into more manageable (read: humanly readable) pieces.
|
||||||
|
|
||||||
First off, several community members have sanitized (read: without API keys/passwords etc) versions of their configurations available for viewing, you can see a list of them [here](/cookbook/#example-configurationyaml).
|
First off, several community members have sanitized (read: without API keys/passwords etc) versions of their configurations available for viewing, you can see a list of them [here](/examples/#example-configurationyaml).
|
||||||
|
|
||||||
As commenting code doesn't always happen, please read on for the details.
|
As commenting code doesn't always happen, please read on for the details.
|
||||||
|
|
||||||
|
@ -32,4 +32,4 @@ When using templates, attributes will be available by their name. For example `s
|
|||||||
| `assumed_state` | Boolean if the current state is an assumption. [More info](/blog/2016/02/12/classifying-the-internet-of-things/#classifiers) Example: `True`. |
|
| `assumed_state` | Boolean if the current state is an assumption. [More info](/blog/2016/02/12/classifying-the-internet-of-things/#classifiers) Example: `True`. |
|
||||||
| `unit_of_measurement` | The unit of measurement the state is expressed in. Used for grouping graphs or understanding the entity. Example: `°C`. |
|
| `unit_of_measurement` | The unit of measurement the state is expressed in. Used for grouping graphs or understanding the entity. Example: `°C`. |
|
||||||
|
|
||||||
When an attribute contains spaces, you can retrieve it like this: `states.sensor.livingroom.attributes["Battery numeric"]`.
|
When an attribute contains spaces, you can retrieve it like this: `state_attr('sensor.livingroom', 'Battery numeric')`.
|
||||||
|
@ -440,8 +440,8 @@ Some of these functions can also be used in a [filter](https://jinja.palletsproj
|
|||||||
- `round(x, "floor")` will always round down to `x` decimals
|
- `round(x, "floor")` will always round down to `x` decimals
|
||||||
- `round(x, "ceil")` will always round up to `x` decimals
|
- `round(x, "ceil")` will always round up to `x` decimals
|
||||||
- `round(1, "half")` will always round to the nearest .5 value. `x` should be 1 for this mode
|
- `round(1, "half")` will always round to the nearest .5 value. `x` should be 1 for this mode
|
||||||
- Filter `max` will obtain the largest item in a sequence.
|
- Filter `[x, y, ...] | max` will obtain the largest item in a sequence.
|
||||||
- Filter `min` will obtain the smallest item in a sequence.
|
- Filter `[x, y, ...] | min` will obtain the smallest item in a sequence.
|
||||||
- Filter `value_one|bitwise_and(value_two)` perform a bitwise and(&) operation with two values.
|
- Filter `value_one|bitwise_and(value_two)` perform a bitwise and(&) operation with two values.
|
||||||
- Filter `value_one|bitwise_or(value_two)` perform a bitwise or(\|) operation with two values.
|
- Filter `value_one|bitwise_or(value_two)` perform a bitwise or(\|) operation with two values.
|
||||||
- Filter `ord` will return for a string of length one an integer representing the Unicode code point of the character when the argument is a Unicode object, or the value of the byte when the argument is an 8-bit string.
|
- Filter `ord` will return for a string of length one an integer representing the Unicode code point of the character when the argument is a Unicode object, or the value of the byte when the argument is an 8-bit string.
|
||||||
@ -544,7 +544,7 @@ The following overview contains a couple of options to get the needed values:
|
|||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
To evaluate a response, go to **{% my developer_templates title="Developer Tools -> Template" %}**, create your output in "Template editor", and check the result.
|
To evaluate a response, go to **{% my developer_template title="Developer Tools -> Template" %}**, create your output in "Template editor", and check the result.
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ The frontend of Home Assistant is built with [Polymer](https://www.polymer-proje
|
|||||||
<img src='/images/screenshots/ui2015.png' />
|
<img src='/images/screenshots/ui2015.png' />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
The [User Interface section](/cookbook/#user-interface) can give you some starting points to expand the frontend.
|
The [User Interface section](/examples/#user-interface) can give you some starting points to expand the frontend.
|
||||||
|
|
||||||
If you want to work on the frontend, please refer to the [Frontend Development documentation](/developers/frontend/).
|
If you want to work on the frontend, please refer to the [Frontend Development documentation](/developers/frontend/).
|
||||||
|
|
||||||
|
@ -18,39 +18,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if page.ha_iot_class -%}
|
<div class='section'>
|
||||||
<div class='section'>
|
The {{ page.name | default: page.title }} integration was introduced in Home Assistant {{ page.ha_release | default: "unknown" }},
|
||||||
IoT class<sup><a href='/blog/2016/02/12/classifying-the-internet-of-things/#classifiers'><i class="icon-info-sign"></i></a></sup>: {{ page.ha_iot_class }}
|
and it's used by <a title="Open analytics.home-assistant.io" href="https://analytics.home-assistant.io" target="_blank" rel="noopener">
|
||||||
</div>
|
{{ 100.0 | times: site.data.analytics_data.integrations[page.ha_domain] | divided_by: site.data.analytics_data.reports_integrations | round: 1 | remove: ".0" }}%</a> of the active installations.
|
||||||
{%- endif -%}
|
Its IoT class<sup><a href='/blog/2016/02/12/classifying-the-internet-of-things/#classifiers'><i class="icon-info-sign"></i></a></sup> is {{ page.ha_iot_class | default: "unknown" }}
|
||||||
|
|
||||||
{%- if page.ha_quality_scale -%}
|
{%- if page.ha_quality_scale %}
|
||||||
<div class='section'>
|
and scores {{page.ha_quality_scale}} on our <a href='/docs/quality_scale/'>quality scale</a>
|
||||||
Quality Scale: <a href='/docs/quality_scale/'>
|
{%- endif -%}.
|
||||||
{%- if page.ha_quality_scale == 'platinum' -%}
|
|
||||||
🏆 (platinum)
|
|
||||||
{%- elsif page.ha_quality_scale == 'gold' -%}
|
|
||||||
🥇 (gold)
|
|
||||||
{%- elsif page.ha_quality_scale == 'silver' -%}
|
|
||||||
🥈 (silver)
|
|
||||||
{%- elsif page.ha_quality_scale == 'internal' -%}
|
|
||||||
🏠 (internal)
|
|
||||||
{%- endif -%}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
{%- if page.ha_release -%}
|
{% if page.ha_domain %}
|
||||||
<div class='section'>
|
You can find the source for this integration on <a href='https://github.com/home-assistant/core/tree/dev/homeassistant/components/{{ page.ha_domain }}'>GitHub</a>.
|
||||||
Introduced in release: {{ page.ha_release }}
|
{%- endif -%}
|
||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
{%- if page.ha_domain -%}
|
|
||||||
<div class='section'>
|
|
||||||
Source: <a href='https://github.com/home-assistant/core/tree/dev/homeassistant/components/{{ page.ha_domain }}'>View on GitHub</a>
|
|
||||||
</div>
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
{%- if page.ha_category.first -%}
|
{%- if page.ha_category.first -%}
|
||||||
<div class='section'>
|
<div class='section'>
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
<section class="aside-module grid__item one-whole lap-one-half">
|
|
||||||
{% assign cookbook = site.cookbook | sort_natural: 'title' %}
|
|
||||||
|
|
||||||
<div class="section">
|
|
||||||
<a href="/cookbook">Back to the cookbook</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section">
|
|
||||||
<h1 class="title delta">{{page.ha_category}}</h1>
|
|
||||||
<ul class="divided">
|
|
||||||
{% for recipe in cookbook %} {% if recipe.ha_category == page.ha_category
|
|
||||||
%}
|
|
||||||
<li>
|
|
||||||
{% if recipe.url == page.url %} {{recipe.title}} {% elsif
|
|
||||||
recipe.ha_external_link %}
|
|
||||||
<a href="{{recipe.ha_external_link}}"
|
|
||||||
>{{recipe.title}} <i class="icon-external-link"></i
|
|
||||||
></a>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{recipe.url}}">{{recipe.title}}</a>
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
|
||||||
{% endif %} {% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
@ -9,4 +9,4 @@
|
|||||||
<li>receive a message when the lights turn on while you are not at home?</li>
|
<li>receive a message when the lights turn on while you are not at home?</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><a href='/getting-started/automation/'>We've got you covered.</a></p>
|
<p><a href='/getting-started/automation/'>We've got you covered.</a></p>
|
||||||
<p><a href='/cookbook/'>View examples by the community.</a></p>
|
<p><a href='/examples/'>View examples by the community.</a></p>
|
||||||
|
11
source/_includes/integrations/option_flow.md
Normal file
11
source/_includes/integrations/option_flow.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% capture name %}{{ include.name | default: page.title }}{% endcapture %}
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
Options for {{ name }} can be set via the user interface, by taking the following steps:
|
||||||
|
|
||||||
|
- Browse to your Home Assistant instance.
|
||||||
|
- In the sidebar click on _**{% my config icon %}**_.
|
||||||
|
- From the configuration menu select: _**{% my integrations icon %}**_.
|
||||||
|
- If multiple instances of {{ name }} are configured, choose the instance you want to configure.
|
||||||
|
- Click on _**"Options"**_.
|
@ -44,7 +44,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="/integrations/">Integrations</a></li>
|
<li><a href="/integrations/">Integrations</a></li>
|
||||||
<li><a href="/cookbook/">Examples</a></li>
|
<li><a href="/examples/">Examples</a></li>
|
||||||
<li><a href="/blog/">Blog</a></li>
|
<li><a href="/blog/">Blog</a></li>
|
||||||
<li><a href="/help/">Need help?</a></li>
|
<li><a href="/help/">Need help?</a></li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
{% include asides/installation_navigation.html %}
|
{% include asides/installation_navigation.html %}
|
||||||
{% elsif root == 'common-tasks' %}
|
{% elsif root == 'common-tasks' %}
|
||||||
{% include asides/common_tasks_navigation.html %}
|
{% include asides/common_tasks_navigation.html %}
|
||||||
{% elsif root == 'cookbook' %}
|
|
||||||
{% include asides/cookbook_navigation.html %}
|
|
||||||
{% elsif root == 'lovelace' %}
|
{% elsif root == 'lovelace' %}
|
||||||
{% include asides/lovelace_navigation.html %}
|
{% include asides/lovelace_navigation.html %}
|
||||||
{% elsif root == 'developers' or root == 'help' %}
|
{% elsif root == 'developers' or root == 'help' %}
|
||||||
|
@ -4,6 +4,7 @@ description: Instructions on how to add air quality sensors with Home Assistant
|
|||||||
ha_release: 0.85
|
ha_release: 0.85
|
||||||
ha_iot_class:
|
ha_iot_class:
|
||||||
ha_domain: air_quality
|
ha_domain: air_quality
|
||||||
|
ha_quality_scale: internal
|
||||||
---
|
---
|
||||||
|
|
||||||
The `air_quality` gather information about the air quality and pollution details.
|
The `air_quality` gather information about the air quality and pollution details.
|
||||||
|
@ -49,10 +49,6 @@ region_name:
|
|||||||
required: false
|
required: false
|
||||||
type: [string, list]
|
type: [string, list]
|
||||||
default: us-east-1
|
default: us-east-1
|
||||||
name:
|
|
||||||
description: "Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
text_type:
|
text_type:
|
||||||
description: "Specify wherever to use text (default) or ssml markup by default."
|
description: "Specify wherever to use text (default) or ssml markup by default."
|
||||||
required: false
|
required: false
|
||||||
|
@ -16,7 +16,7 @@ Home Assistant allows users to share their usage data via the analytics integrat
|
|||||||
|
|
||||||
## Data Collection
|
## Data Collection
|
||||||
|
|
||||||
The information sent depends on what you opt-in to. You can opt-in during onboarding and by going to **{% my general title="Configuration >> General" %}**.
|
The information sent depends on what options you opt-in to. You can opt-in during onboarding and by going to **{% my general title="Configuration >> General" %}** .
|
||||||
|
|
||||||
**{% my general badge %}**
|
**{% my general badge %}**
|
||||||
|
|
||||||
|
@ -153,7 +153,3 @@ binary_sensor:
|
|||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
The template is re-evaluated whenever an entity ID that it references changes state. If you use non-deterministic functions like `now()` in the template it will not be continuously re-evaluated, but only when an entity ID that is referenced is updated.
|
|
||||||
|
|
||||||
In this example, since the template is only evaluated on state change of `device_tracker.paulus` the template won't change state after 5 mins like intended. The ways to force template reevaluation are documented in the [template binary_sensor](/integrations/binary_sensor.template/#working-without-entities).
|
|
||||||
|
@ -73,7 +73,6 @@ Save the last recorded video of a camera to a local file. Note that in most case
|
|||||||
| `name` | no | Name of camera containing video to save. |
|
| `name` | no | Name of camera containing video to save. |
|
||||||
| `filename` | no | Location of save file. |
|
| `filename` | no | Location of save file. |
|
||||||
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
homeassistant:
|
homeassistant:
|
||||||
allowlist_external_dirs:
|
allowlist_external_dirs:
|
||||||
@ -91,7 +90,7 @@ Send a new pin to blink. Since Blink's 2FA implementation is new and changing,
|
|||||||
|
|
||||||
### Other Services
|
### Other Services
|
||||||
|
|
||||||
In addition to the services mentioned above, there are generic `camera` and `alarm_control_panel` services available for use as well. The `camera.enable_motion_detection` and `camera.disable_motion_detection` services allow for individual cameras to be enabled and disabled, respectively, within the Blink system. The `alarm_control_panel.alarm_arm_away` and `alarm_control_panel.alarm_disarm` services allow for the whole system to be armed and disarmed, respectively. Blink Mini cameras linked to an existing sync module cannot be armed/disarmed via Home Assistant.
|
In addition to the services mentioned above, there are generic `camera` and `alarm_control_panel` services available for use as well. The `camera.enable_motion_detection` and `camera.disable_motion_detection` services allow for individual cameras to be enabled and disabled, respectively, within the Blink system. The `alarm_control_panel.alarm_arm_away` and `alarm_control_panel.alarm_disarm` services allow for the whole system to be armed and disarmed, respectively. Blink Mini cameras linked to an existing sync module cannot be armed/disarmed individually via Home Assistant.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -13,12 +13,21 @@ ha_codeowners:
|
|||||||
ha_zeroconf: true
|
ha_zeroconf: true
|
||||||
---
|
---
|
||||||
|
|
||||||
You can enable the Cast integration by going to the Integrations page inside the configuration panel.
|
{% include integrations/config_flow.md %}
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
Support for mDNS discovery in your local network is mandatory. Make sure that your router has this feature enabled. This is even required if you entered the IP addresses of the Cast devices are manually in the configuration as mentioned below.
|
Support for mDNS discovery in your local network is mandatory. Make sure that your router has this feature enabled. This is even required if you entered the IP addresses of the Cast devices are manually in the configuration as mentioned below.
|
||||||
|
|
||||||
|
{% include integrations/option_flow.md %}
|
||||||
|
{% configuration_basic %}
|
||||||
|
Known hosts:
|
||||||
|
description: "A comma-separated list of hostnames or IP-addresses of cast devices, use if mDNS discovery is not working"
|
||||||
|
Allowed UUIDs:
|
||||||
|
description: A comma-separated list of UUIDs of Cast devices to add to Home Assistant. **Use only if you don't want to add all available devices.** The device won't be added until discovered through either mDNS or if it's included in the list of known hosts. In order to find the UUID for your device use a mDNS browser or advanced users can use the following Python command (adjust friendly names as required) - `python3 -c "import pychromecast; print(pychromecast.get_listed_chromecasts(friendly_names=['Living Room TV', 'Bedroom TV', 'Office Chromecast']))`. This option is only visible if advanced mode is enabled in your user profile.
|
||||||
|
Ignore CEC:
|
||||||
|
description: A comma-separated list of Chromecasts that should ignore CEC data for determining the
|
||||||
|
active input. [See the upstream documentation for more information.](https://github.com/balloob/pychromecast#ignoring-cec-data). This option is only visible if advanced mode is enabled in your user profile.
|
||||||
|
{% endconfiguration_basic %}
|
||||||
|
|
||||||
## Home Assistant Cast
|
## Home Assistant Cast
|
||||||
|
|
||||||
Home Assistant has its own Cast application to show the Home Assistant UI on any Chromecast device. You can use it by adding the [Cast entity row](/lovelace/entities/#cast) to your Lovelace UI, or by calling the `cast.show_lovelace_view` service. The service takes the path of a Lovelace view and an entity ID of a Cast device to show the view on. A `path` has to be defined in your Lovelace YAML for each view, as outlined in the [views documentation](/lovelace/views/#path). The `dashboard_path` is the part of the Lovelace UI URL that follows the defined `base_url` Typically "lovelace". The following is a full configuration for a script that starts casting the `downstairs` tab of the `lovelace-cast` path (note that `entity_id` is specified under `data` and not for the service call):
|
Home Assistant has its own Cast application to show the Home Assistant UI on any Chromecast device. You can use it by adding the [Cast entity row](/lovelace/entities/#cast) to your Lovelace UI, or by calling the `cast.show_lovelace_view` service. The service takes the path of a Lovelace view and an entity ID of a Cast device to show the view on. A `path` has to be defined in your Lovelace YAML for each view, as outlined in the [views documentation](/lovelace/views/#path). The `dashboard_path` is the part of the Lovelace UI URL that follows the defined `base_url` Typically "lovelace". The following is a full configuration for a script that starts casting the `downstairs` tab of the `lovelace-cast` path (note that `entity_id` is specified under `data` and not for the service call):
|
||||||
@ -173,46 +182,12 @@ data:
|
|||||||
- url: "https://tilos.hu/images/kockalogo.png"
|
- url: "https://tilos.hu/images/kockalogo.png"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced use
|
## Cast devices and Home Assistant on different subnets
|
||||||
|
|
||||||
### Manual configuration
|
|
||||||
|
|
||||||
By default, any discovered Cast device is added to Home Assistant. This can be restricted by supplying a list of allowed chrome casts.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Example configuration.yaml entry
|
|
||||||
cast:
|
|
||||||
media_player:
|
|
||||||
- uuid: "ae3be716-b011-4b88-a75d-21478f4f0822"
|
|
||||||
```
|
|
||||||
|
|
||||||
{% configuration %}
|
|
||||||
media_player:
|
|
||||||
description: A list that contains advanced configuration options.
|
|
||||||
required: false
|
|
||||||
type: list
|
|
||||||
keys:
|
|
||||||
uuid:
|
|
||||||
description: UUID of a Cast device to add to Home Assistant. Use only if you don't want to add all available devices. The device won't be added until discovered through mDNS. In order to find the UUID for your device use a mDNS browser or advanced users can use the following Python command (adjust friendly names as required) - `python3 -c "import pychromecast; print(pychromecast.get_listed_chromecasts(friendly_names=['Living Room TV', 'Bedroom TV', 'Office Chromecast']))"`
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
ignore_cec:
|
|
||||||
description: >
|
|
||||||
A list of Chromecasts that should ignore CEC data for determining the
|
|
||||||
active input. [See the upstream documentation for more information.](https://github.com/balloob/pychromecast#ignoring-cec-data)
|
|
||||||
required: false
|
|
||||||
type: list
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
### Docker and Cast devices and Home Assistant on different subnets
|
|
||||||
|
|
||||||
Cast devices can only be discovered and connected to if they are on the same subnet as Home Assistant.
|
|
||||||
|
|
||||||
When running Home Assistant Core in a [Docker container](/docs/installation/docker/), the command line option `--net=host` or the compose file equivalent `network_mode: host` must be used to put it on the host's network, otherwise the Home Assistant Core will not be able to connect to any Cast device.
|
|
||||||
|
|
||||||
|
Cast devices can only be automatically discovered if they are on the same subnet as Home Assistant.
|
||||||
Setups with cast devices on a different subnet than Home Assistant are not recommended and not supported.
|
Setups with cast devices on a different subnet than Home Assistant are not recommended and not supported.
|
||||||
|
If this is not possible, it's necessary to either enable mDNS forwarding between the subnets or to provide a list of known hosts.
|
||||||
|
|
||||||
If this is not possible, it's necessary to:
|
### Home Assistant Container
|
||||||
|
|
||||||
- Enable mDNS forwarding between the subnets.
|
When running the [Home Assistant Container](/installation/linux#install-home-assistant-container) in Docker, make sure it is running with host network mode. Running without it is not supported by the Home Assistant project, and will cause this integration to be unable to discover to your Cast devices.
|
||||||
- Enable source NAT to make requests from Home Assistant to the Chromecast appear to come from the same subnet as the Chromecast.
|
|
||||||
|
@ -7,7 +7,6 @@ ha_category:
|
|||||||
ha_release: 0.12
|
ha_release: 0.12
|
||||||
ha_iot_class: Local Polling
|
ha_iot_class: Local Polling
|
||||||
ha_domain: command_line
|
ha_domain: command_line
|
||||||
ha_quality_scale: internal
|
|
||||||
ha_platforms:
|
ha_platforms:
|
||||||
- binary_sensor
|
- binary_sensor
|
||||||
- cover
|
- cover
|
||||||
|
@ -115,7 +115,7 @@ Zones with the name `-` will be ignored, just as the AirBase application is work
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Additionally the Daikin Streamer (air purifier) function can be toggled on supported devices using a switch.
|
Additionally the Daikin Streamer (air purifier) function can be toggled onsupported devices using a switch. Note that it isn't currently possible to reliably detect whether a specific device has streamer support, so the switch may appear in the UI even if the functionality isn't actually supported.
|
||||||
|
|
||||||
## Region Changing
|
## Region Changing
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ Tested devices:
|
|||||||
- Epson WF3640
|
- Epson WF3640
|
||||||
- Epson EcoTank ET-77x0
|
- Epson EcoTank ET-77x0
|
||||||
- Epson ET-2650
|
- Epson ET-2650
|
||||||
|
- Epson Expression Home XP-2105
|
||||||
|
|
||||||
To make this module work you need to connect your printer to your LAN.
|
To make this module work you need to connect your printer to your LAN.
|
||||||
The best is to navigate to the status page of the printer to check if it shows the page with the ink levels on the URL http://<IP_ADDRESS>/PRESENTATION/HTML/TOP/PRTINFO.HTML
|
The best is to navigate to the status page of the printer to check if it shows the page with the ink levels on the URL http://<IP_ADDRESS>/PRESENTATION/HTML/TOP/PRTINFO.HTML
|
||||||
|
@ -217,12 +217,12 @@ retain:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
speed_range_min:
|
speed_range_min:
|
||||||
description: The minimum of numeric output range (`off` not included, so `speed_range_min` - 1 represents 0%).
|
description: The minimum of numeric output range (`off` not included, so `speed_range_min` - 1 represents 0%). The number of speeds within the speed_range / 100 will determine the `percentage_step`.
|
||||||
required: false
|
required: false
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
speed_range_max:
|
speed_range_max:
|
||||||
description: The maximum of numeric output range (representing 100%).
|
description: The maximum of numeric output range (representing 100%). The number of speeds within the speed_range / 100 will determine the `percentage_step`.
|
||||||
required: false
|
required: false
|
||||||
type: integer
|
type: integer
|
||||||
default: 100
|
default: 100
|
||||||
@ -253,6 +253,7 @@ In this section you find some real-life examples of how to use this fan.
|
|||||||
### Full configuration
|
### Full configuration
|
||||||
|
|
||||||
The example below shows a full configuration for a MQTT fan using percentage and preset modes.
|
The example below shows a full configuration for a MQTT fan using percentage and preset modes.
|
||||||
|
There are 10 speeds within the speed range, so `percentage_step` = 100 / 10 steps = 10.0 %.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example using percentage based speeds with preset modes configuration.yaml
|
# Example using percentage based speeds with preset modes configuration.yaml
|
||||||
@ -279,10 +280,10 @@ fan:
|
|||||||
payload_oscillation_on: "true"
|
payload_oscillation_on: "true"
|
||||||
payload_oscillation_off: "false"
|
payload_oscillation_off: "false"
|
||||||
speed_range_min: 1
|
speed_range_min: 1
|
||||||
speed_range_max: 100
|
speed_range_max: 10
|
||||||
```
|
```
|
||||||
|
|
||||||
{% raw %}}
|
{% raw %}
|
||||||
|
|
||||||
This example demonstrates how to use command templates with JSON output.
|
This example demonstrates how to use command templates with JSON output.
|
||||||
|
|
||||||
@ -308,4 +309,4 @@ fan:
|
|||||||
- "breeze"
|
- "breeze"
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
@ -54,7 +54,7 @@ fan:
|
|||||||
preset_modes:
|
preset_modes:
|
||||||
- 'auto'
|
- 'auto'
|
||||||
- 'smart'
|
- 'smart'
|
||||||
- 'woosh'
|
- 'whoosh'
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
@ -130,7 +130,7 @@ The returned value is rounded to the number of decimals defined in (`precision`)
|
|||||||
|
|
||||||
The Outlier filter (`outlier`) is a basic Band-pass filter, as it cuts out any value outside a specific range.
|
The Outlier filter (`outlier`) is a basic Band-pass filter, as it cuts out any value outside a specific range.
|
||||||
|
|
||||||
The included Outlier filter will discard any value beyond a band centered on the median of the previous values, replacing it with the median value of the previous values. If inside the band, the
|
The included Outlier filter will discard any value beyond a band centered on the median of the previous values, replacing it with the median value of the previous values. If inside the band, the current state is returned.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
distance = abs(state - median(previous_states))
|
distance = abs(state - median(previous_states))
|
||||||
|
@ -160,4 +160,4 @@ elements:
|
|||||||
|
|
||||||
### Extra CGI Commands
|
### Extra CGI Commands
|
||||||
|
|
||||||
Foscam Webcams which support CGI Commands can be controlled by Home Assistant ([Source](https://www.iltucci.com/blog/wp-content/uploads/2018/12/Foscam-IPCamera-CGI-User-Guide-V1.0.4.pdf)). For an example of how this can be done, see the [Foscam IP Camera Pan, Tilt, Zoom Control](/cookbook/foscam_away_mode_PTZ/) Cookbook entry.
|
Foscam Webcams which support CGI Commands can be controlled by Home Assistant ([Source](https://www.iltucci.com/blog/wp-content/uploads/2018/12/Foscam-IPCamera-CGI-User-Guide-V1.0.4.pdf)).
|
||||||
|
@ -71,10 +71,14 @@ verify_ssl:
|
|||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
rtsp_transport:
|
||||||
|
description: "Set the RTSP transport protocol to `tcp`, `udp`, `udp_multicast` or `http`."
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
<p class='img'>
|
<p class='img'>
|
||||||
<a href='/cookbook/google_maps_card/'>
|
<a href='/examples/google_maps_card/'>
|
||||||
<img src='/images/integrations/camera/generic-google-maps.png' alt='Screenshot showing Google Maps integration in Home Assistant front end.'>
|
<img src='/images/integrations/camera/generic-google-maps.png' alt='Screenshot showing Google Maps integration in Home Assistant front end.'>
|
||||||
Example showing the Generic camera platform pointing at a dynamic Google Map image.
|
Example showing the Generic camera platform pointing at a dynamic Google Map image.
|
||||||
</a>
|
</a>
|
||||||
|
@ -6,6 +6,7 @@ ha_category:
|
|||||||
logo: geo_location.png
|
logo: geo_location.png
|
||||||
ha_release: 0.78
|
ha_release: 0.78
|
||||||
ha_domain: geo_location
|
ha_domain: geo_location
|
||||||
|
ha_quality_scale: internal
|
||||||
ha_iot_class:
|
ha_iot_class:
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ using the "ignored" customize option detailed below.
|
|||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
In order for the sensors to work the hikvision user must have the 'Remote: Notify Surveillance Center/Trigger Alarm Output' permission which can be enabled from the user management section of the web interface.
|
In order for the sensors to work the hikvision user must have the 'Remote: Notify Surveillance Center/Trigger Alarm Output' permission which can be enabled from the user management section of the web interface.
|
||||||
Also the 'WEB Authentication' needs to be set to 'digest/basic' in the security/authentication section.
|
Also the 'WEB Authentication' needs to be set to 'digest/basic' in the security/authentication section. Ensure this is applied on each individual camera in case of using an NVR.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
For example, if you configure a camera with the name "Front Porch" that has
|
For example, if you configure a camera with the name "Front Porch" that has
|
||||||
|
@ -312,7 +312,7 @@ When exposing a Camera, Activity based remote (a `remote` that supports activiti
|
|||||||
To quickly add all accessory modes entities in the UI:
|
To quickly add all accessory modes entities in the UI:
|
||||||
|
|
||||||
1. Create a new bridge via the UI (i.e., **{% my config_flow_start title="Configuration >> Integrations" domain=page.ha_domain %}**).
|
1. Create a new bridge via the UI (i.e., **{% my config_flow_start title="Configuration >> Integrations" domain=page.ha_domain %}**).
|
||||||
2. Select `media_player` and `camera` domains.
|
2. Select `media_player`, `remote`, `lock`, and `camera` domains.
|
||||||
3. Complete the flow as normal.
|
3. Complete the flow as normal.
|
||||||
4. Additional HomeKit entries for each entity that must operate in accessory mode will be created for each entity that does not already have one.
|
4. Additional HomeKit entries for each entity that must operate in accessory mode will be created for each entity that does not already have one.
|
||||||
5. If you have already created another HomeKit bridge for the non-accessory mode entities, the new bridge can safely be removed.
|
5. If you have already created another HomeKit bridge for the non-accessory mode entities, the new bridge can safely be removed.
|
||||||
|
@ -21,7 +21,7 @@ ha_platforms:
|
|||||||
- sensor
|
- sensor
|
||||||
---
|
---
|
||||||
|
|
||||||
The Philips Hue integration allows you to control and monitor the lights and motion sensors connected to your Hue bridge. The Hue integration is automatically discovered. If not, add it via the add integration menu.
|
The Philips Hue integration allows you to control and monitor the lights and motion sensors connected to your Hue bridge.
|
||||||
|
|
||||||
There is currently support for the following device types within Home Assistant:
|
There is currently support for the following device types within Home Assistant:
|
||||||
|
|
||||||
@ -35,53 +35,28 @@ There is currently support for the following device types within Home Assistant:
|
|||||||
|
|
||||||
{% include integrations/config_flow.md %}
|
{% include integrations/config_flow.md %}
|
||||||
|
|
||||||
## Using Hue Groups in Home Assistant
|
## Options
|
||||||
|
|
||||||
The Hue API allows you to group lights. Home Assistant also supports grouping of entities natively, but sometimes it can be useful to use Hue groups to group light bulbs. By doing so, Home Assistant only needs to send one API call to change the state of all the bulbs in those groups instead of one call for every light in the group. This causes all the bulbs to change state simultaneously.
|
Options for the Hue integration can be set going to **Configuration** -> **Integrations** -> **Hue** -> **Options**.
|
||||||
|
|
||||||
These Hue groups can be a `Luminaire`, `Lightsource`, `LightGroup`, or `Room`. The `Luminaire` and `Lightsource` can't be created manually since the Hue bridge manages these automatically based on the discovered bulbs. The `Room` and `LightGroup` can be created manually through the API or the mobile app. A bulb can only exist in one `Room`, but can exist in more than one `LightGroup`. The `LightGroup` can be useful if you want to link certain bulbs together.
|
{% configuration_basic %}
|
||||||
|
Allow Hue groups:
|
||||||
|
description: "Enabling this option, will create entities for each Hue group, so you can control your Hue light groups from Home Assistant."
|
||||||
|
Allow unreachable bulbs to report their state correctly:
|
||||||
|
description: "If a light is unavailable, it will show up as unavailable in Home Assistant as well. Enabling this option, will not mark the light unavailable, but instead show the last state known to the Hue bridge."
|
||||||
|
{% endconfiguration_basic %}
|
||||||
|
|
||||||
The 2nd generation Hue app only has the ability to create a `Room`. You need to use the first generation app or the API to create a `LightGroup`.
|
## Using Hue Scenes
|
||||||
|
|
||||||
Example:
|
The Hue platform has its own concept of scenes for setting the colors of a group of lights simultaneously. A Hue bridge could potentially have dozens of scenes stored on it, and many scenes across different rooms might share the same name (the default scenes, for example). To avoid user interface overload, we don't expose scenes directly. Instead there is a `hue.hue_activate_scene` service which can be used in an automation or script. This will have all the bulbs transitioned at once, instead of one at a time like when using standard scenes in Home Assistant.
|
||||||
|
|
||||||
To create a `LightGroup` named `Ceiling lights` that contains the lights 1, 2, and 3, execute the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -XPOST -d '{"name": "Ceiling lights", "lights": ["1", "2", "3"]}' http://<bridge>/api/<username>/groups
|
|
||||||
```
|
|
||||||
|
|
||||||
The `<username>` is the string that is used to register Home Assistant with the bridge. You can find it in the `core.config_entries` file in `/PATH-TO-YOUR-CONFIGURATION/.storage/`. `<bridge>` is the IP address or hostname of your Hue bridge.
|
|
||||||
|
|
||||||
You can find the IDs of your lights by executing the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl http://<bridge>/api/<username>/lights
|
|
||||||
```
|
|
||||||
|
|
||||||
Home Assistant will automatically detect your new `LightGroup` and add it to the interface.
|
|
||||||
|
|
||||||
<div class='note warning'>
|
|
||||||
To support Hue light groups, your bridge needs to have at least firmware 1.13 (released on June 3, 2016).
|
|
||||||
</div>
|
|
||||||
|
|
||||||
More information can be found on the [Philips Hue API documentation](https://www.developers.meethue.com/documentation/groups-api#22_create_group) website.
|
|
||||||
|
|
||||||
## Using Hue Scenes in Home Assistant
|
|
||||||
|
|
||||||
The Hue platform has its own concept of scenes for setting the colors of a group of lights simultaneously. A Hue bridge could potentially have dozens of scenes stored on it, and many scenes across different rooms might share the same name (the default scenes, for example). To avoid user interface overload, we don't expose scenes directly. Instead there is a `hue.hue_activate_scene` service which can be used in an automation or script.
|
|
||||||
This will have all the bulbs transitioned at once, instead of one at a time like when using standard scenes in Home Assistant.
|
|
||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
script:
|
service: hue.hue_activate_scene
|
||||||
porch_on:
|
data:
|
||||||
sequence:
|
group_name: "Porch"
|
||||||
- service: hue.hue_activate_scene
|
scene_name: "Porch Orange"
|
||||||
data:
|
|
||||||
group_name: "Porch"
|
|
||||||
scene_name: "Porch Orange"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
@ -96,11 +71,11 @@ _Note_: `group_name` is not a reference to a Home Assistant group name. It can o
|
|||||||
|
|
||||||
The easiest way to find Hue scene names is to only use the scenes from the 2nd generation Hue app, which are organized by room (group) and scene name. Use the room name and scene name that you see in the app. You can test that these work at Developer Tools > Services in your Home Assistant instance.
|
The easiest way to find Hue scene names is to only use the scenes from the 2nd generation Hue app, which are organized by room (group) and scene name. Use the room name and scene name that you see in the app. You can test that these work at Developer Tools > Services in your Home Assistant instance.
|
||||||
|
|
||||||
Alternatively, you can dump all rooms and scene names using this [gist](https://gist.github.com/sdague/5479b632e0fce931951c0636c39a9578). This does **not** tell you which groups and scenes work together, but it is sufficient to get values that you can test at Developer Tools > Services.
|
Alternatively, a more advanced method can be used to dump all rooms and scene names using this [gist](https://gist.github.com/sdague/5479b632e0fce931951c0636c39a9578). This does **not** tell you which groups and scenes work together, but it is sufficient to get values that you can test at Developer Tools > Services.
|
||||||
|
|
||||||
### Caveats
|
### Caveats
|
||||||
|
|
||||||
The Hue API doesn't activate scenes directly; rather, they must be associated with a Hue group (typically rooms, especially if using the 2nd generation Hue app). But Hue scenes don't actually reference their group, so heuristic matching is used.
|
The Hue API doesn't activate scenes directly; rather, they must be associated with a Hue group (typically rooms). But Hue scenes don't actually reference their group, so heuristic matching is used.
|
||||||
|
|
||||||
Neither group names nor scene names are guaranteed unique in Hue. If you are observing unexpected behavior from calling Hue scenes in Home Assistant, make the names of your Hue scenes more specific in the Hue app.
|
Neither group names nor scene names are guaranteed unique in Hue. If you are observing unexpected behavior from calling Hue scenes in Home Assistant, make the names of your Hue scenes more specific in the Hue app.
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ ha_config_flow: true
|
|||||||
ha_codeowners:
|
ha_codeowners:
|
||||||
- '@issacg'
|
- '@issacg'
|
||||||
ha_domain: local_ip
|
ha_domain: local_ip
|
||||||
ha_quality_scale: internal
|
|
||||||
ha_platforms:
|
ha_platforms:
|
||||||
- sensor
|
- sensor
|
||||||
---
|
---
|
||||||
|
@ -131,7 +131,7 @@ logger:
|
|||||||
logs:
|
logs:
|
||||||
custom_components.my_integration: critical
|
custom_components.my_integration: critical
|
||||||
filters:
|
filters:
|
||||||
custom_component.my_integartion:
|
custom_component.my_integration:
|
||||||
- "HTTP 429" # Filter all HTTP 429 errors
|
- "HTTP 429" # Filter all HTTP 429 errors
|
||||||
- "Request to .*unreliable.com.* Timed Out"
|
- "Request to .*unreliable.com.* Timed Out"
|
||||||
homeassistant.components.nws:
|
homeassistant.components.nws:
|
||||||
|
@ -63,6 +63,10 @@ homeassistant:
|
|||||||
To play media from a media source via a service call, use the uri scheme `media-source://media_source/<media_dir>/<path>`.
|
To play media from a media source via a service call, use the uri scheme `media-source://media_source/<media_dir>/<path>`.
|
||||||
Default `media_dir`is `local`.
|
Default `media_dir`is `local`.
|
||||||
|
|
||||||
|
<div class="note">
|
||||||
|
Web browsers and Google Cast media players have very limited video container and codec support. The Media Source integration does not do any transcoding of media, meaning media files must be natively supported by your media player or web browser (for playing in the frontend). If a video file is not supported by your media player or web browser it will fail to play. Please check the documentation of your media player or web browser for lists of supported video formats.
|
||||||
|
</div>
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```yaml
|
```yaml
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
|
@ -521,7 +521,7 @@ modbus:
|
|||||||
- name: Sensor2
|
- name: Sensor2
|
||||||
unit_of_measurement: mg
|
unit_of_measurement: mg
|
||||||
slave: 1
|
slave: 1
|
||||||
register: 110
|
address: 110
|
||||||
count: 2
|
count: 2
|
||||||
- name: Sensor3
|
- name: Sensor3
|
||||||
unit_of_measurement: °C
|
unit_of_measurement: °C
|
||||||
@ -614,7 +614,7 @@ If you specify scale or offset as floating point values, double precision floati
|
|||||||
|
|
||||||
#### Full example
|
#### Full example
|
||||||
|
|
||||||
Example a temperature sensor with a 10 seconds scan interval:
|
Example temperature sensor with a default scan interval:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
modbus:
|
modbus:
|
||||||
@ -681,7 +681,7 @@ switches:
|
|||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
input_type:
|
input_type:
|
||||||
description: type of adddress (holding/discrete/coil)
|
description: type of adddress (holding/input/coil)
|
||||||
required: false
|
required: false
|
||||||
default: holding
|
default: holding
|
||||||
type: integer
|
type: integer
|
||||||
@ -722,7 +722,7 @@ switches:
|
|||||||
|
|
||||||
#### Full example
|
#### Full example
|
||||||
|
|
||||||
Example switches, for which the state is polled from Modbus every 10 seconds.
|
Example switches, for which the state is polled from Modbus every 15 seconds (default).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
modbus:
|
modbus:
|
||||||
|
@ -31,7 +31,7 @@ subscribe_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
ignore_event:
|
ignore_event:
|
||||||
description: Ignore sending these [events](/docs/configuration/events/) over mqtt.
|
description: List of [events](/docs/configuration/events/) which will not be sent over mqtt.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
@ -105,7 +105,7 @@ Project**. Note: This is a different type of project from the Device Access proj
|
|||||||
1. From the drop-down list select *OAuth client ID*.
|
1. From the drop-down list select *OAuth client ID*.
|
||||||

|

|
||||||
|
|
||||||
1. Enter *Web Application* for the Application typex, since you will use this with Home Assistant.
|
1. Enter *Web Application* for the Application type, since you will use this with Home Assistant.
|
||||||
|
|
||||||
1. Pick a name for your credential.
|
1. Pick a name for your credential.
|
||||||
|
|
||||||
|
@ -141,11 +141,13 @@ The list with all known valid keys can be found [here](https://github.com/floria
|
|||||||
- TX-55FZ802B
|
- TX-55FZ802B
|
||||||
- TX-58AX802B
|
- TX-58AX802B
|
||||||
- TX-58DX700B
|
- TX-58DX700B
|
||||||
|
- TX-65CX800E
|
||||||
- TX-65EXW784
|
- TX-65EXW784
|
||||||
- TX-65FX720W
|
- TX-65FX720W
|
||||||
- TX-L42ET50
|
- TX-L42ET50
|
||||||
- TX-L47ET60E (can't power on)
|
- TX-L47ET60E (can't power on)
|
||||||
- TX-P42STW50
|
- TX-P42STW50
|
||||||
|
- TX-P42VT30E
|
||||||
- TX-P50GT30Y
|
- TX-P50GT30Y
|
||||||
- TX-P50GT60E
|
- TX-P50GT60E
|
||||||
|
|
||||||
|
@ -23,19 +23,19 @@ The Proximity entity which is created has the following values:
|
|||||||
|
|
||||||
- `state`: Distance from the monitored zone (in km)
|
- `state`: Distance from the monitored zone (in km)
|
||||||
- `dir_of_travel`: Direction of the closest device or person to the monitored zone. Values are:
|
- `dir_of_travel`: Direction of the closest device or person to the monitored zone. Values are:
|
||||||
- 'not set'
|
- `not set`
|
||||||
- 'arrived'
|
- `arrived`
|
||||||
- 'towards'
|
- `towards`
|
||||||
- 'away_from'
|
- `away_from`
|
||||||
- 'unknown'
|
- `unknown`
|
||||||
- 'stationary'
|
- `stationary`
|
||||||
- `dist_to_zone`: Distance from the monitored zone (in km)
|
- `dist_to_zone`: Distance from the monitored zone (in km)
|
||||||
- `unit_of_measurement`: Measurement of distance. Values are:
|
- `unit_of_measurement`: Measurement of distance. Values are:
|
||||||
- 'km'
|
- `km`
|
||||||
- 'm'
|
- `m`
|
||||||
- 'mi'
|
- `mi`
|
||||||
- 'yd'
|
- `yd`
|
||||||
- 'ft'
|
- `ft`
|
||||||
- `nearest`: The device or person which is nearest to the zone
|
- `nearest`: The device or person which is nearest to the zone
|
||||||
|
|
||||||
To enable this integration in your installation, add the following to your `configuration.yaml` file:
|
To enable this integration in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
@ -22,7 +22,6 @@ sensor:
|
|||||||
- platform: pvoutput
|
- platform: pvoutput
|
||||||
system_id: YOUR_SYSTEM_ID
|
system_id: YOUR_SYSTEM_ID
|
||||||
api_key: YOUR_API_KEY
|
api_key: YOUR_API_KEY
|
||||||
scan_interval: 120
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
@ -41,12 +40,6 @@ name:
|
|||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
<div class='note warning'>
|
|
||||||
|
|
||||||
It's recommended to set `scan_interval:` according to a value greater than 60 seconds. The service only allows 60 requests per hour but the sensor's default is 30 seconds.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
To format the PVoutput sensor it's recommended to use the [template component](/topics/templating/). For example:
|
To format the PVoutput sensor it's recommended to use the [template component](/topics/templating/). For example:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
@ -56,7 +49,6 @@ sensor:
|
|||||||
- platform: pvoutput
|
- platform: pvoutput
|
||||||
system_id: YOUR_SYSTEM_ID
|
system_id: YOUR_SYSTEM_ID
|
||||||
api_key: YOUR_API_KEY
|
api_key: YOUR_API_KEY
|
||||||
scan_interval: 150
|
|
||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
power_consumption:
|
power_consumption:
|
||||||
|
@ -122,6 +122,7 @@ In order to have your devices discovered automatically, you need to add the foll
|
|||||||
When pressing the button on the physical remote, RFLink detects the signal and the device should be added automatically to Home Assistant.
|
When pressing the button on the physical remote, RFLink detects the signal and the device should be added automatically to Home Assistant.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
light:
|
light:
|
||||||
- platform: rflink
|
- platform: rflink
|
||||||
automatic_add: true
|
automatic_add: true
|
||||||
@ -173,6 +174,7 @@ If you find a device is recognized differently, with different protocols or the
|
|||||||
For debugging purposes or context when investigating issues you can enable debug logging for RFLink with the following configuration snippet:
|
For debugging purposes or context when investigating issues you can enable debug logging for RFLink with the following configuration snippet:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
logger:
|
logger:
|
||||||
default: error
|
default: error
|
||||||
logs:
|
logs:
|
||||||
|
@ -32,3 +32,10 @@ Currently supported services are:
|
|||||||
- `stop`
|
- `stop`
|
||||||
- `return_to_base`
|
- `return_to_base`
|
||||||
- `locate`
|
- `locate`
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Integration Disconnecting
|
||||||
|
|
||||||
|
If the integration frequently disconnects and you have an ad blocker runner like [Pi-hole](https://pi-hole.net/) or [AdGuard](https://adguard.com) add `ads-field.aylanetworks.com` to the Allow list . This domain is needed for the connection and can be part of the automatic blocking because of `ads` being part of the subdomain.
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ The `slack` platform allows you to deliver notifications from Home Assistant to
|
|||||||
1. Create a [new app](https://api.slack.com/apps) under your Slack.com account.
|
1. Create a [new app](https://api.slack.com/apps) under your Slack.com account.
|
||||||
2. Click the `OAuth & Permissions` link in the sidebar, under the Features heading.
|
2. Click the `OAuth & Permissions` link in the sidebar, under the Features heading.
|
||||||
3. In the Scopes section, add the `chat:write` scope, `Send messages as user`. If you get a `missing_scope` error when trying to send a message, check these permissions.
|
3. In the Scopes section, add the `chat:write` scope, `Send messages as user`. If you get a `missing_scope` error when trying to send a message, check these permissions.
|
||||||
4. Scroll up to `OAuth Tokens & Redirect URLs` and click `Install App`.
|
4. Scroll up to `OAuth Tokens & Redirect URLs` and click `Add to Workspace`.
|
||||||
5. Copy your `OAuth Access Token` and put that key into your `configuration.yaml` file -- see below.
|
5. Copy your `OAuth Access Token` and put that key into your `configuration.yaml` file -- see below.
|
||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
|
@ -14,7 +14,7 @@ Integrate your [Start.ca](https://www.start.ca/) account information into Home A
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
You can get your API key from: [Start.ca Usage API](https://www.start.ca/support/usage/api)
|
You can get your API key from: [Start.ca Usage API](https://www.start.ca/account/usage/api)
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ ha_codeowners:
|
|||||||
- '@pvizeli'
|
- '@pvizeli'
|
||||||
ha_domain: stt
|
ha_domain: stt
|
||||||
ha_iot_class:
|
ha_iot_class:
|
||||||
|
ha_quality_scale: internal
|
||||||
---
|
---
|
||||||
|
|
||||||
Speech-to-Text (STT) allows you to stream speech data to the STT API and get text back.
|
Speech-to-Text (STT) allows you to stream speech data to the STT API and get text back.
|
||||||
|
@ -53,61 +53,49 @@ If you denied access to all locations and applications it is normal to receive a
|
|||||||
|
|
||||||
## Sensors
|
## Sensors
|
||||||
|
|
||||||
Utilisation:
|
### CPU Utilisation sensors
|
||||||
- `cpu_other_load`: Displays unspecified (that is, not user or system) load in percentage.
|
|
||||||
- `cpu_user_load`: Displays user load in percentage.
|
|
||||||
- `cpu_system_load`: Displays system load in percentage.
|
|
||||||
- `cpu_total_load`: Displays combined load in percentage.
|
|
||||||
- `cpu_1min_load`: Displays maximum load in past minute.
|
|
||||||
- `cpu_5min_load`: Displays maximum load in past 5 minutes.
|
|
||||||
- `cpu_15min_load`: Displays maximum load in past 15 minutes.
|
|
||||||
- `memory_real_usage`: Displays percentage of memory used.
|
|
||||||
- `memory_size`: Displays total size of memory in MB.
|
|
||||||
- `memory_cached`: Displays total size of cache in MB.
|
|
||||||
- `memory_available_swap`: Displays total size of available swap in MB.
|
|
||||||
- `memory_available_real`: Displays total size of memory used (based on real memory) in MB.
|
|
||||||
- `memory_total_swap`: Displays total size of actual memory in MB.
|
|
||||||
- `memory_total_real`: Displays total size of real memory in MB.
|
|
||||||
- `network_up`: Displays total up speed of network interfaces (combines all interfaces).
|
|
||||||
- `network_down`: Displays total down speed of network interfaces (combines all interfaces).
|
|
||||||
|
|
||||||
Information:
|
Entities reporting the current and combined CPU utilization of the NAS. There are sensors the report the current CPU load, separated by User, System and others. By default, only the User sensor is enabled.
|
||||||
- `temperature`: Displays the temperature of the NAS.
|
|
||||||
- `uptime`: Displays the uptime of the NAS (in seconds).
|
|
||||||
|
|
||||||
For each disk:
|
There are also combined CPU load sensors. These report the total CPU load for the entire NAS. Available as current, 1min, 5min and 15min load sensors. By default the 1min load sensor is disabled.
|
||||||
- `disk_smart_status`: Displays the S.M.A.R.T status of the disk.
|
|
||||||
- `disk_status`: Displays the status of the disk.
|
|
||||||
- `disk_temp`: Displays the temperature of the disk.
|
|
||||||
|
|
||||||
For each volume:
|
### Memory Utilisation sensors
|
||||||
- `volume_status`: Displays the status of the volume.
|
|
||||||
- `volume_size_total`: Displays the total size of the volume in TB's.
|
|
||||||
- `volume_size_used`: Displays the used space on this volume in TB's.
|
|
||||||
- `volume_percentage_used`: Displays the percentage used for this volume.
|
|
||||||
- `volume_disk_temp_avg`: Displays the average temperature of all disks in the volume.
|
|
||||||
- `volume_disk_temp_max`: Displays the maximum temperature of all disks in the volume.
|
|
||||||
|
|
||||||
|
Entities reporting the current and combined memory and swap utilization of the NAS. These sensors include the total installed amount, the currently free amount and the % of memory used.
|
||||||
|
|
||||||
|
### Network sensors
|
||||||
|
|
||||||
|
Entities reporting the current network transfer rates of the NAS. Both upload and download sensors are available.
|
||||||
|
|
||||||
|
### General sensors
|
||||||
|
|
||||||
|
Entities reporting the internal temperature and the uptime of the NAS. The uptime sensor is disabled by default.
|
||||||
|
|
||||||
|
### Disk sensors
|
||||||
|
|
||||||
|
Entities reporting the internal temperature, status (as shown in Synology DSM) and SMART status for each drive inside the NAS. The SMART status sensor is disabled by default.
|
||||||
|
|
||||||
|
### Volume sensors
|
||||||
|
|
||||||
|
Entities reporting status, total size (TB), used size (TB), % of volume used, average disk temperature and maximum disk temperature for each volume inside the NAS. By default the total size and maximum disk temperature sensors are disabled.
|
||||||
|
|
||||||
## Binary sensors
|
## Binary sensors
|
||||||
|
|
||||||
Security:
|
### General sensors
|
||||||
- `security_status`: Displays safe to indicate if the NAS is safe.
|
|
||||||
|
|
||||||
Upgrade:
|
Entities reporting the update and security status of the NAS.
|
||||||
- `update_available`: Displays on if a DSM update is available.
|
|
||||||
|
|
||||||
For each disk:
|
### Disk sensors
|
||||||
- `disk_exceed_bad_sector_thr`: Displays on to indicate if the disk exceeded the maximum bad sector threshold. (Does not work with DSM 5.x)
|
|
||||||
- `disk_below_remain_life_thr`: Displays on to indicate if the disk dropped below the remain life threshold. (Does not work with DSM 5.x)
|
|
||||||
|
|
||||||
|
Similar to the [normal disk sensors](#disk-sensors), there are binary sensors reporting each drive's status. These sensors report if a drive has exceeded the maximum threshold for detected bad sectors and if a drive has dropped below the threshold for its remaining life.
|
||||||
|
|
||||||
## Switch
|
## Switch
|
||||||
- `home_mode`: Displays a toggle to enable/disable the [Surveillance Station](https://www.synology.com/en-us/surveillance) Home mode.
|
|
||||||
|
|
||||||
|
A switch is available to enable/disable the [Surveillance Station](https://www.synology.com/en-us/surveillance) Home mode.
|
||||||
|
|
||||||
## Cameras
|
## Cameras
|
||||||
- `{camera_name}`: Displays cameras added in [Surveillance Station](https://www.synology.com/en-us/surveillance).
|
|
||||||
|
For each camera added in [Surveillance Station](https://www.synology.com/en-us/surveillance), a camera will be created in Home Assistant.
|
||||||
|
|
||||||
## Services
|
## Services
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ Send a photo.
|
|||||||
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
||||||
| `disable_notification` | yes | True/false for send the message silently. iOS users and web users will not receive a notification, Android users will receive a notification with no sound. Defaults to False. |
|
| `disable_notification` | yes | True/false for send the message silently. iOS users and web users will not receive a notification, Android users will receive a notification with no sound. Defaults to False. |
|
||||||
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
||||||
| `timeout` | yes | Timeout for send photo. Will help with timeout errors (poor internet connection, etc) |
|
| `timeout` | yes | Timeout for sending photo in seconds. Will help with timeout errors (poor internet connection, etc) |
|
||||||
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
||||||
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
||||||
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
||||||
@ -71,7 +71,7 @@ Send a video.
|
|||||||
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
||||||
| `disable_notification` | yes | True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound. Defaults to False. |
|
| `disable_notification` | yes | True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound. Defaults to False. |
|
||||||
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
||||||
| `timeout` | yes | Timeout for send video. Will help with timeout errors (poor internet connection, etc) |
|
| `timeout` | yes | Timeout for sending video in seconds. Will help with timeout errors (poor internet connection, etc) |
|
||||||
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
||||||
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ Send an animation.
|
|||||||
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
||||||
| `disable_notification` | yes | True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound. Defaults to False. |
|
| `disable_notification` | yes | True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound. Defaults to False. |
|
||||||
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
||||||
| `timeout` | yes | Timeout for send video. Will help with timeout errors (poor internet connection, etc) |
|
| `timeout` | yes | Timeout for sending video in seconds. Will help with timeout errors (poor internet connection, etc) |
|
||||||
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
||||||
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
||||||
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
||||||
@ -111,7 +111,7 @@ Send a voice message.
|
|||||||
| `target` | yes | An array of pre-authorized chat_ids or user_ids to send the notification to. Defaults to the first allowed chat_id. |
|
| `target` | yes | An array of pre-authorized chat_ids or user_ids to send the notification to. Defaults to the first allowed chat_id. |
|
||||||
| `disable_notification` | yes | True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound. Defaults to False. |
|
| `disable_notification` | yes | True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound. Defaults to False. |
|
||||||
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
||||||
| `timeout` | yes | Timeout for send voice. Will help with timeout errors (poor internet connection, etc) |
|
| `timeout` | yes | Timeout for sending voice in seconds. Will help with timeout errors (poor internet connection, etc) |
|
||||||
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
||||||
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
||||||
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
||||||
@ -130,7 +130,7 @@ Send a sticker.
|
|||||||
| `target` | yes | An array of pre-authorized chat_ids or user_ids to send the notification to. Defaults to the first allowed chat_id. |
|
| `target` | yes | An array of pre-authorized chat_ids or user_ids to send the notification to. Defaults to the first allowed chat_id. |
|
||||||
| `disable_notification` | yes | True/false for send the message silently. iOS users and web users will not receive a notification, Android users will receive a notification with no sound. Defaults to False. |
|
| `disable_notification` | yes | True/false for send the message silently. iOS users and web users will not receive a notification, Android users will receive a notification with no sound. Defaults to False. |
|
||||||
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
||||||
| `timeout` | yes | Timeout for send photo. Will help with timeout errors (poor internet connection, etc) |
|
| `timeout` | yes | Timeout for sending photo in seconds. Will help with timeout errors (poor internet connection, etc) |
|
||||||
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
||||||
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
||||||
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
||||||
@ -151,7 +151,7 @@ Send a document.
|
|||||||
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
| `parse_mode` | yes | Parser for the message text: `markdownv2`, `html` or `markdown`. |
|
||||||
| `disable_notification` | yes | True/false for send the message silently. iOS users and web users will not receive a notification, Android users will receive a notification with no sound. Defaults to False. |
|
| `disable_notification` | yes | True/false for send the message silently. iOS users and web users will not receive a notification, Android users will receive a notification with no sound. Defaults to False. |
|
||||||
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
|
||||||
| `timeout` | yes | Timeout for send document. Will help with timeout errors (poor internet connection, etc) |
|
| `timeout` | yes | Timeout for sending document in seconds. Will help with timeout errors (poor internet connection, etc) |
|
||||||
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. `[]` to reset to no custom keyboard. Example: `["/command1, /command2", "/command3"]` |
|
||||||
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
|
||||||
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
| `message_tag` | yes | Tag for sent message. In `telegram_sent` event data: `{{trigger.event.data.message_tag}}` |
|
||||||
@ -487,7 +487,7 @@ Telegram callbacks also support arguments and commands the same way as normal me
|
|||||||
data:
|
data:
|
||||||
show_alert: true
|
show_alert: true
|
||||||
callback_query_id: "{{ trigger.event.data.id }}"
|
callback_query_id: "{{ trigger.event.data.id }}"
|
||||||
message: "I repeat: {{trigger.event.data["args"]}}"
|
message: "I repeat: {{trigger.event.data['args']}}"
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
@ -28,6 +28,7 @@ ha_platforms:
|
|||||||
|
|
||||||
The `Tesla` integration offers integration with the [Tesla](https://auth.tesla.com/login) cloud service and provides presence detection as well as sensors such as charger state and temperature.
|
The `Tesla` integration offers integration with the [Tesla](https://auth.tesla.com/login) cloud service and provides presence detection as well as sensors such as charger state and temperature.
|
||||||
|
|
||||||
|
|
||||||
This integration provides the following platforms:
|
This integration provides the following platforms:
|
||||||
|
|
||||||
- Binary sensors - such as update available, parking, and charger connection.
|
- Binary sensors - such as update available, parking, and charger connection.
|
||||||
@ -39,6 +40,12 @@ This integration provides the following platforms:
|
|||||||
|
|
||||||
{% include integrations/config_flow.md %}
|
{% include integrations/config_flow.md %}
|
||||||
|
|
||||||
|
<div class='note warning'>
|
||||||
|
|
||||||
|
Note: MFA on your Tesla Account is not supported at this time.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
Tesla options are set via **Configuration** -> **Integrations** -> **Tesla** -> **Options**.
|
Tesla options are set via **Configuration** -> **Integrations** -> **Tesla** -> **Options**.
|
||||||
|
@ -71,7 +71,6 @@ Other bulbs may also work, but with limited color temperatures. If you find a bu
|
|||||||
- KL125
|
- KL125
|
||||||
- KL130
|
- KL130
|
||||||
- KB130
|
- KB130
|
||||||
- KL430
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ ha_platforms:
|
|||||||
- switch
|
- switch
|
||||||
---
|
---
|
||||||
|
|
||||||
The `tuya` integration is the main integration to integrate [Tuya Smart](https://www.tuya.com) related platforms, except the Zigbee hub. You will need your Tuya account information (username, password and account country code) to discover and control devices which related to your account.
|
The `tuya` integration is the main integration to integrate [Tuya Smart](https://www.tuya.com) related platforms, except the Zigbee hub. This includes devices linked with the Tuya, Smart Life, and Jinvoo Smart apps. You will need your account information (username, password and account country code) from one of these apps to discover and control devices which related to your account.
|
||||||
|
|
||||||
**Important**: Not all Tuya devices are supported by the `tuya API` used by this integration. For more details refer to [TuyaHA Library](https://github.com/PaulAnnekov/tuyaha).
|
**Important**: Not all Tuya devices are supported by the `tuya API` used by this integration. For more details refer to [TuyaHA Library](https://github.com/PaulAnnekov/tuyaha).
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
ha_release: 0.8
|
ha_release: 0.8
|
||||||
title: Webhook
|
title: Webhook
|
||||||
ha_domain: webhook
|
ha_domain: webhook
|
||||||
|
ha_quality_scale: internal
|
||||||
ha_iot_class:
|
ha_iot_class:
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -93,15 +93,15 @@ state_color:
|
|||||||
default: false
|
default: false
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
description: Action taken on row tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||||
type: map
|
type: map
|
||||||
hold_action:
|
hold_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
description: Action taken on row tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||||
type: map
|
type: map
|
||||||
double_tap_action:
|
double_tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
description: Action taken on row double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||||
type: map
|
type: map
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
@ -171,15 +171,15 @@ action_name:
|
|||||||
default: "`Run`"
|
default: "`Run`"
|
||||||
tap_action:
|
tap_action:
|
||||||
required: true
|
required: true
|
||||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
description: Action taken on button tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||||
type: map
|
type: map
|
||||||
hold_action:
|
hold_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
description: Action taken on button tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||||
type: map
|
type: map
|
||||||
double_tap_action:
|
double_tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
description: Action taken on button double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||||
type: map
|
type: map
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
@ -226,15 +226,15 @@ entities:
|
|||||||
default: "true"
|
default: "true"
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
description: Action taken on button tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||||
type: map
|
type: map
|
||||||
hold_action:
|
hold_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
description: Action taken on button tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||||
type: map
|
type: map
|
||||||
double_tap_action:
|
double_tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
description: Action taken on button double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||||
type: map
|
type: map
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user