diff --git a/Gemfile.lock b/Gemfile.lock index a0893d5887c..f7f220a2818 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,7 +5,7 @@ GEM public_suffix (>= 2.0.2, < 5.0) chunky_png (1.4.0) colorator (1.1.0) - commonmarker (0.21.1) + commonmarker (0.21.2) ruby-enum (~> 0.5) compass (1.0.3) chunky_png (~> 1.2) @@ -29,7 +29,7 @@ GEM ffi (1.14.2-x64-mingw32) forwardable-extended (2.6.0) http_parser.rb (0.6.0) - i18n (1.8.8) + i18n (1.8.9) concurrent-ruby (~> 1.0) jekyll (4.2.0) addressable (~> 2.4) diff --git a/_config.yml b/_config.yml index b7a22d6845d..885cb1d09f8 100644 --- a/_config.yml +++ b/_config.yml @@ -81,6 +81,10 @@ collections: # 3rd Party Settings # # ----------------------- # +#Search +algolia: + api_key: "ae96d94b201c5444c8a443093edf3efb" + # Twitter twitter_user: balloob twitter_tweet_button: true @@ -133,7 +137,7 @@ defaults: footer: true sharing: true sidebar: true - # Enable table of contents for integrations + # Enable table of contents for integrations and installations # # To set toc as a default value, we need to set the scope with an empty path # and the collection as type @@ -144,6 +148,20 @@ defaults: type: integrations values: toc: true + - scope: + path: "installation/*" + values: + toc: true + no_toc: true + - scope: + path: "common-tasks/*" + values: + toc: true + - scope: + path: "hassio/*" + values: + toc: true + # Support for files Jekyll will normally exclude include: @@ -156,3 +174,45 @@ include: toc: min_level: 2 # default: 1 max_level: 3 # default: 6 + + +# Configuration for installation pages +installation: + versions: + os: "5.11" + python: "3.8" + types: + odroid: + board: ODROID + installation_media: "eMMC module/SD card" + variants: + - name: "ODROID-N2" + key: "odroid-n2" + - name: "ODROID-N2+" + key: "odroid-n2" + - name: "ODROID-C2" + key: "odroid-c2" + - name: "ODROID-C4" + key: "odroid-c4" + - name: "ODROID-XU4" + key: "odroid-xu4" + + raspberrypi: + board: Raspberry Pi + installation_media: "SD card" + variants: + - name: "Raspberry Pi 4 64-bit" + key: "rpi4-64" + - name: "Raspberry Pi 4 32-bit" + key: "rpi4" + - name: "Raspberry Pi 3 64-bit" + key: "rpi3-64" + - name: "Raspberry Pi 3 32-bit" + key: "rpi3" + + tinkerboard: + board: ASUS Tinkerboard + installation_media: "eMMC module/SD card" + variants: + - name: "ASUS Tinkerboard" + key: "tinker" diff --git a/package-lock.json b/package-lock.json index 2bb3d6a9641..631b1bc547b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3064,4 +3064,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index f6e9fe9fab1..9024bd4959a 100644 --- a/package.json +++ b/package.json @@ -22,4 +22,4 @@ "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" } -} +} \ No newline at end of file diff --git a/plugins/tabbed_block.rb b/plugins/tabbed_block.rb new file mode 100644 index 00000000000..508dbf54940 --- /dev/null +++ b/plugins/tabbed_block.rb @@ -0,0 +1,63 @@ +require 'securerandom' + +module Jekyll + class TabbedBlock < Liquid::Block + + def slug(key) + key.downcase.strip.gsub(' ', '-').gsub(/[^\w\-]/, '') + end + + def render_tabbed_block(vars:, converter:, classes: nil, parent_type: nil) + block = Array.new + tabs = Array.new + tabContent = Array.new + uuid = "id" + SecureRandom.hex(10) + + tabs << "
" + vars.map do |entry| + tabs << "" + tabContent << "
#{converter.convert(entry['content'].to_s)}
" + end + tabs << "
" + block << tabs.join + block << tabContent.join + block.join + end + + def render(context) + contents = super(context) + vars = SafeYAML.load(contents) + + site = context.registers[:site] + converter = site.find_converter_instance(::Jekyll::Converters::Markdown) + + <<~MARKUP + +
+ #{render_tabbed_block(vars: vars, converter: converter)} +
+ MARKUP + end + end +end + +Liquid::Template.register_tag('tabbed_block', Jekyll::TabbedBlock) \ No newline at end of file diff --git a/sass/custom/_getting_started.scss b/sass/custom/_getting_started.scss new file mode 100644 index 00000000000..9cab303af76 --- /dev/null +++ b/sass/custom/_getting_started.scss @@ -0,0 +1,150 @@ +#getting_started { + .intro { + padding-bottom: 16px; + } + + .installations { + + h2 { + font-size: 0; + margin: 0; + } + + .installations-card { + text-decoration: none !important; + color: black !important; + + .material-card { + display: flex; + flex-direction: row; + justify-content: space-between; + margin: 8px 0; + + .content-container { + display: flex; + + div:first-of-type { + margin-right: 24px; + + img, svg { + max-width: 170px; + max-height: 170px; + min-width: 170px; + min-height: 170px; + padding: 32px; + border-radius: 3px; + box-shadow: rgba(0,0,0,0.06) 0 0 10px; + vertical-align: middle; + border: 5px solid #fff; + } + } + + div:last-of-type { + + b { + font-size: 28px; + } + + p { + font-size: 0.8em; + margin: 0; + } + + ul { + font-size: 0.8em; + margin-left: 24px; + margin-top: 1rem; + + li { + margin: 0; + } + } + } + } + svg { + height: 42px; + max-width: 42px; + min-width: 42px; + align-self: center; + } + } + } + } + + .compare-installations td,.compare-installations th { + text-align: center; + } + + table.compare-installations { + background-color: #ffffff !important; + border-radius: 2px !important; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), + 0 1px 5px 0 rgba(0,0,0,0.12), + 0 3px 1px -2px rgba(0,0,0,0.2) !important; + + td, th { + text-align: center; + } + + tr { + td:first-of-type { + text-align: left; + } + } + + tr:nth-child(even) { + background-color: #fafafa; + } + } +} + +.link-card { + text-decoration: none !important; + color: black !important; + div { + margin: 32px 0; + height: 64px; + display: flex; + justify-content: space-between; + svg { + height: 32px; + width: 32px; + max-width: 32px; + } + p { + margin: 0; + align-self: center; + } + } +} +.next-step { + p { + text-transform: uppercase; + } +} + +@media only screen and (max-width: $palm-end) { + #getting_started { + .installations { + .installations-card { + .material-card { + .content-container { + flex-flow: wrap; + svg { + display: block; + } + div:first-of-type { + width: 100%; + display: flex; + justify-content: center; + margin-bottom: 16px; + } + } + svg { + display: none; + } + } + } + } + } +} \ No newline at end of file diff --git a/sass/custom/_paulus.scss b/sass/custom/_paulus.scss index 6f4dbb2eb8b..44308282321 100644 --- a/sass/custom/_paulus.scss +++ b/sass/custom/_paulus.scss @@ -634,3 +634,39 @@ code { border-radius: 0.4em; padding: 0.1em 0.4em; } + + +@media only screen and (max-width: $menu-collapse) { + #not_found { + .page { + text-align: center; + + .search404-container { + margin-bottom: 32px; + + } + } + } +} + +@media only screen and (min-width: $menu-collapse) { + #not_found { + .page { + text-align: center; + margin-bottom: 300px; + + .search404-container { + margin-bottom: 32px; + + #search404 { + width: 420px; + } + } + } + footer { + position: absolute; + bottom: 0; + width: 100%; + } + } +} \ No newline at end of file diff --git a/sass/custom/_tabbed_block.scss b/sass/custom/_tabbed_block.scss new file mode 100644 index 00000000000..818276e63f3 --- /dev/null +++ b/sass/custom/_tabbed_block.scss @@ -0,0 +1,48 @@ +.tabbed-content-block { + background-color: #FAFAFA; + margin: 16px 0; + overflow: hidden; + border-radius: 10px; + box-shadow: -1px 0px 0px 0px #dfdfdf, 0px 0px 0px 1px #dfdfdf; + box-sizing: border-box; + + .tabbed-content-block-tabs { + overflow: hidden; + padding: 0 8px; + + label { + input{ + display:none; + } + input:checked + div{ + opacity: 1; + border-bottom: 2px solid $primary-color; + } + + div{ + float:left; + padding: 8px; + cursor: pointer; + opacity: 0.7; + transition: 0.3s; + border-bottom: 2px solid transparent; + font-size: 0.8em; + } + + div:hover { + opacity: 1; + } + } + } + + .tabbed-content-block-content { + padding: 8px 16px 0; + display: none; + animation: fadeEffect .5s; + } + + @keyframes fadeEffect{ + 0%{opacity:0} + 100%{opacity:1} + } +} \ No newline at end of file diff --git a/sass/oscailte/base/_navigation.scss b/sass/oscailte/base/_navigation.scss index fd48dc63717..695c6730b08 100644 --- a/sass/oscailte/base/_navigation.scss +++ b/sass/oscailte/base/_navigation.scss @@ -7,23 +7,70 @@ Functional Styles (Required) ---------------------------------*/ /* Tim Pietrusky advanced checkbox hack (Android <= 4.1.2) */ -body{ -webkit-animation: bugfix infinite 1s; } -@-webkit-keyframes bugfix { from {padding:0;} to {padding:0;} } +body { + -webkit-animation: bugfix infinite 1s; +} +@-webkit-keyframes bugfix { + from { + padding: 0; + } + to { + padding: 0; + } +} -.header { position: relative; } -#toggle, .toggle { display: none; } -.menu li { list-style: none; float:left; } +.header { + position: relative; +} +#toggle, +.toggle { + display: none; +} +.menu li { + list-style: none; + float: left; +} $menu-collapse: 944px; // @media only screen and (max-width: $lap-end){ -@media only screen and (max-width: $menu-collapse){ - .menu { display: none; opacity: 0; width: 100%; position: absolute; right: 0; } - .menu li { display: block; width: 100%; margin: 0; } - .menu li a { display: block; width: 100%; text-decoration: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } - .menu li a .icon { display: none; } - .toggle { display: block; position: relative; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } - #toggle:checked ~ .menu { display: block; opacity: 1; z-index: 999; } +@media only screen and (max-width: $menu-collapse) { + .menu { + display: none; + opacity: 0; + width: 100%; + position: absolute; + right: 0; + } + .menu li { + display: block; + width: 100%; + margin: 0; + } + .menu li a { + display: block; + width: 100%; + text-decoration: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .menu li a .icon { + display: none; + } + .toggle { + display: block; + position: relative; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; + } + #toggle:checked ~ .menu { + display: block; + opacity: 1; + z-index: 999; + } } /* support for submenus */ @@ -51,8 +98,10 @@ ul.menu li { a { display: block; padding: 20px 10px; + min-width: 150px; - &:hover, &:focus { + &:hover, + &:focus { background: $grayLighter; } } @@ -72,7 +121,7 @@ header .grid { top: 138px; } -.menu li a{ +.menu li a { @include box-sizing(border-box); @include transition(all 0.25s linear); display: block; @@ -83,7 +132,8 @@ header .grid { line-height: 1; } -.menu > li > a:hover, .menu > li > a:focus{ +.menu > li > a:hover, +.menu > li > a:focus { background: $site-background; box-shadow: inset 0px 5px $navigation-color; color: $navigation-color; @@ -91,26 +141,29 @@ header .grid { padding-bottom: 24px; } -.toggle{ +.toggle { z-index: 20; } -@media only screen and (max-width: $menu-collapse){ - .menu{ +@media only screen and (max-width: $menu-collapse) { + .menu { background: $white; - border-top: 1px solid $navigation-color; + border-top: 1px solid $navigation-color; border-bottom: 4px solid $navigation-color; } - .menu, .menu li, .menu li a{ + .menu, + .menu li, + .menu li a { height: auto; } - .menu li a{ + .menu li a { padding: 15px 15px !important; } - .menu li a:hover, .menu li a:focus{ + .menu li a:hover, + .menu li a:focus { background: $grayLighter; box-shadow: inset 5px 0px $navigation-color; padding: 15px 15px 15px 25px; @@ -146,11 +199,11 @@ header .grid { white-space: nowrap; } - .toggle:hover::after{ + .toggle:hover::after { background: darken($navigation-color, 7%); } - #toggle:checked + .toggle::after{ + #toggle:checked + .toggle::after { content: attr(data-close); } diff --git a/sass/screen.scss b/sass/screen.scss index dda71c2daa4..13ef2c23179 100644 --- a/sass/screen.scss +++ b/sass/screen.scss @@ -6,4 +6,6 @@ @import 'custom/syntax'; @import 'custom/details'; @import 'custom/print'; -@import 'custom/layout'; \ No newline at end of file +@import 'custom/layout'; +@import 'custom/getting_started'; +@import 'custom/tabbed_block'; \ No newline at end of file diff --git a/source/404.html b/source/404.html new file mode 100644 index 00000000000..2be0d311b63 --- /dev/null +++ b/source/404.html @@ -0,0 +1,31 @@ +--- +layout: page +permalink: /404.html +sidebar: false +feedback: false +body_id: not_found +--- +

Oh no! This page does not exist ๐Ÿ˜ž

+ +
+
+ + + +
+
+ + + \ No newline at end of file diff --git a/source/_cookbook/automation_enocean_phue.markdown b/source/_cookbook/automation_enocean_phue.markdown index e522d0ceca6..2d5f60b6436 100644 --- a/source/_cookbook/automation_enocean_phue.markdown +++ b/source/_cookbook/automation_enocean_phue.markdown @@ -24,7 +24,7 @@ binary_sensor: name: living_room_switch automation: - - alias: Turn on living room light + - alias: "Turn on living room light" trigger: platform: event event_type: button_pressed @@ -33,9 +33,10 @@ automation: devname: living_room_switch action: service: light.turn_on - entity_id: light.hue_color_lamp_3 + target: + entity_id: light.hue_color_lamp_3 - - alias: Turn off living room light + - alias: "Turn off living room light" trigger: platform: event event_type: button_pressed @@ -44,5 +45,6 @@ automation: devname: living_room_switch action: service: light.turn_off - entity_id: light.hue_color_lamp_3 + target: + entity_id: light.hue_color_lamp_3 ``` diff --git a/source/_cookbook/automation_first_light.markdown b/source/_cookbook/automation_first_light.markdown index b7d6b18799c..e31a5db69ea 100644 --- a/source/_cookbook/automation_first_light.markdown +++ b/source/_cookbook/automation_first_light.markdown @@ -23,29 +23,31 @@ input_boolean: automation: #turns it on at 5am - - alias: Enable First Morning Trigger + - alias: "Enable First Morning Trigger" trigger: - platform: time at: "05:00:00" action: service: homeassistant.turn_on - entity_id: input_boolean.trigger_first_morning + target: + entity_id: input_boolean.trigger_first_morning # turns it off an hour after sunrise - - alias: Disable First Morning Trigger + - alias: "Disable First Morning Trigger" trigger: - platform: sun event: sunrise offset: "01:00:00" action: service: homeassistant.turn_off - entity_id: input_boolean.trigger_first_morning + 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 + - alias: "First Morning Motion" trigger: platform: state entity_id: binary_sensor.livingroom_motion @@ -60,7 +62,8 @@ automation: # turn off the "waiting" boolean regardless of whether lights will turn on # so that this happens only once - service: homeassistant.turn_off - entity_id: input_boolean.trigger_first_morning + 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 @@ -84,7 +87,8 @@ automation: # Trigger a scene # You could add as many services or scenes as you'd like - service: scene.turn_on - entity_id: scene.morning_first_motion + target: + entity_id: scene.morning_first_motion ``` {% endraw %} diff --git a/source/_cookbook/automation_flashing_lights.markdown b/source/_cookbook/automation_flashing_lights.markdown index d285e3e3d4a..1ecce435d1d 100644 --- a/source/_cookbook/automation_flashing_lights.markdown +++ b/source/_cookbook/automation_flashing_lights.markdown @@ -29,7 +29,8 @@ automation: # start alarm on movement if alarm activated # and the alarm is not triggered service: script.turn_on - entity_id: script.alarm_room1 + target: + entity_id: script.alarm_room1 - alias: "flash_room1_start" trigger: @@ -38,7 +39,8 @@ automation: to: "on" action: service: script.turn_on - entity_id: script.flash_room1 + target: + entity_id: script.flash_room1 - alias: "flash_room1_stop" trigger: @@ -51,60 +53,61 @@ automation: state: "off" action: service: script.turn_off - entity_id: script.flash_room1 + target: + entity_id: script.flash_room1 script: alarm_room1: - alias: Alarm room1 + alias: "Alarm room1" sequence: - - alias: Alarm Room1 Start + - alias: "Alarm Room1 Start" service: homeassistant.turn_on - data: + target: entity_id: switch.AlmSnd1 - - alias: Set Ack Room1 + - alias: "Set Ack Room1" service: homeassistant.turn_on - data: + target: entity_id: input_boolean.ack1 - - alias: email_Room1 + - 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 + - alias: "Alarm Room1 Stop" service: homeassistant.turn_off - data: + target: entity_id: switch.AlmSnd1 flash_room1: - alias: Flash Room1 On + alias: "Flash Room1 On" sequence: - - alias: Light Room1 On + - alias: "Light Room1 On" service: homeassistant.turn_on - data: + target: entity_id: switch.REL1 - delay: # time for flash light on seconds: 1 - - alias: Light Room1 Off + - alias: "Light Room1 Off" service: homeassistant.turn_off - data: + target: entity_id: switch.REL1 - - alias: loop_room1 + - alias: "loop_room1" service: script.turn_on - data: + target: entity_id: script.flash_loop flash_loop: - alias: Flash loop + alias: "Flash loop" sequence: - delay: # time for flash light off seconds: 1 - - alias: loop_room1 + - alias: "loop_room1" service: script.turn_on - data: + target: entity_id: script.flash_room1 ``` diff --git a/source/_cookbook/automation_for_rainy_days.markdown b/source/_cookbook/automation_for_rainy_days.markdown index b29dcafa266..4a481e30015 100644 --- a/source/_cookbook/automation_for_rainy_days.markdown +++ b/source/_cookbook/automation_for_rainy_days.markdown @@ -24,7 +24,8 @@ automation: before: "23:00" action: service: light.turn_on - entity_id: light.couch_lamp + 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. @@ -41,6 +42,7 @@ And then of course turn off the lamp when it stops raining but only if it's with after_offset: "-01:00:00" action: service: light.turn_off - entity_id: light.couch_lamp + target: + entity_id: light.couch_lamp ``` diff --git a/source/_cookbook/automation_sun.markdown b/source/_cookbook/automation_sun.markdown index eaa9630eabb..959a580de4d 100644 --- a/source/_cookbook/automation_sun.markdown +++ b/source/_cookbook/automation_sun.markdown @@ -18,7 +18,8 @@ automation: state: home action: service: light.turn_on - entity_id: group.living_room_lights + target: + entity_id: group.living_room_lights ``` #### Natural wake up light @@ -32,7 +33,8 @@ automation: at: "07:15:00" action: service: light.turn_on - entity_id: light.bedroom + target: + entity_id: light.bedroom data: # 900 seconds = 15 minutes transition: 900 @@ -79,7 +81,8 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s below: 3.5 action: service: scene.turn_on - entity_id: scene.background_lights + target: + entity_id: scene.background_lights - alias: "Turn more lights on as the sun gets dimmer" trigger: @@ -89,7 +92,8 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s below: 1.5 action: service: scene.turn_on - entity_id: scene.more_lights + target: + entity_id: scene.more_lights - alias: "Close blind at dusk" trigger: @@ -99,7 +103,8 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s below: -2.5 action: service: switch.turn_off - entity_id: switch.blind + target: + entity_id: switch.blind ``` {% endraw %} \ No newline at end of file diff --git a/source/_cookbook/automation_using_timeinterval_inputboolean.markdown b/source/_cookbook/automation_using_timeinterval_inputboolean.markdown index 7307f890f96..070399ddded 100644 --- a/source/_cookbook/automation_using_timeinterval_inputboolean.markdown +++ b/source/_cookbook/automation_using_timeinterval_inputboolean.markdown @@ -27,7 +27,8 @@ automation: state: "on" action: service: light.turn_on - entity_id: light.woonkamer_livingcolors + target: + entity_id: light.woonkamer_livingcolors data: effect: random transition: 5 diff --git a/source/_cookbook/dim_and_brighten_lights.markdown b/source/_cookbook/dim_and_brighten_lights.markdown index 350a5a4746e..160d30db7b6 100644 --- a/source/_cookbook/dim_and_brighten_lights.markdown +++ b/source/_cookbook/dim_and_brighten_lights.markdown @@ -23,7 +23,8 @@ automation: entity_id: zwave.YOUR_REMOTE action: - service: script.turn_on - entity_id: script.ramp_light + target: + entity_id: script.ramp_light data: variables: direction: up @@ -39,7 +40,8 @@ automation: entity_id: zwave.YOUR_REMOTE action: - service: script.turn_on - entity_id: script.ramp_light + target: + entity_id: script.ramp_light data: variables: direction: down @@ -60,7 +62,8 @@ automation: entity_id: zwave.YOUR_REMOTE action: - service: script.turn_off - entity_id: script.ramp_light + 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. @@ -107,7 +110,7 @@ Now the script. ```yaml script: ramp_light: - alias: Ramp Light Brightness + alias: "Ramp Light Brightness" description: Ramp light brightness up or down fields: direction: @@ -129,8 +132,9 @@ script: direction == 'down' and br > mn }} sequence: - service: light.turn_on - data: + target: entity_id: "{{ light }}" + data: brightness: > {% set br = state_attr(light, 'brightness')|int(0) %} {% set mn = states('input_number.light_minimum')|int %} diff --git a/source/_cookbook/dim_lights_when_playing_media.markdown b/source/_cookbook/dim_lights_when_playing_media.markdown index da90ecb3763..45231c140fc 100644 --- a/source/_cookbook/dim_lights_when_playing_media.markdown +++ b/source/_cookbook/dim_lights_when_playing_media.markdown @@ -53,7 +53,8 @@ automation: state: "below_horizon" action: service: scene.turn_on - entity_id: scene.livingroom_normal + target: + entity_id: scene.livingroom_normal - alias: "Media player playing" trigger: @@ -67,6 +68,7 @@ automation: state: "below_horizon" action: service: scene.turn_on - entity_id: scene.livingroom_dim + target: + entity_id: scene.livingroom_dim ``` diff --git a/source/_cookbook/foscam_away_mode_PTZ.markdown b/source/_cookbook/foscam_away_mode_PTZ.markdown index f9d73a4c66d..7cdaaffdc9a 100644 --- a/source/_cookbook/foscam_away_mode_PTZ.markdown +++ b/source/_cookbook/foscam_away_mode_PTZ.markdown @@ -46,17 +46,17 @@ script: foscam_off: sequence: - service: switch.turn_off - data: + target: entity_id: switch.foscam_motion - service: shell_command.foscam_turn_off foscam_on: sequence: - service: switch.turn_off - data: + target: entity_id: switch.foscam_motion - service: shell_command.foscam_turn_on - service: switch.turn_on - data: + target: entity_id: switch.foscam_motion ``` @@ -64,14 +64,14 @@ To automate Foscam being set to "on" (facing the correct way with motion sensor ```yaml automation: - - alias: Set Foscam to Away Mode when I leave home + - 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 + - alias: "Set Foscam to Home Mode when I arrive Home" trigger: platform: state entity_id: group.family diff --git a/source/_cookbook/notify.mqtt.markdown b/source/_cookbook/notify.mqtt.markdown index edf29132a2f..527f9e1622b 100644 --- a/source/_cookbook/notify.mqtt.markdown +++ b/source/_cookbook/notify.mqtt.markdown @@ -46,7 +46,7 @@ Use as [`script`](/integrations/script/) in automations. {% raw %} ```yaml automation: - alias: Send me a message when I get home + alias: "Send me a message when I get home" trigger: platform: state entity_id: device_tracker.me diff --git a/source/_cookbook/notify_if__new_ha_release.markdown b/source/_cookbook/notify_if__new_ha_release.markdown index 76a731db903..c4fcedf70cd 100644 --- a/source/_cookbook/notify_if__new_ha_release.markdown +++ b/source/_cookbook/notify_if__new_ha_release.markdown @@ -15,7 +15,7 @@ notify: recipient: recipient@jabber.org automation: - - alias: Update notification + - alias: "Update notification" trigger: - platform: state entity_id: binary_sensor.updater @@ -38,7 +38,7 @@ notify: name: pushbullet automation: - - alias: Update notification + - alias: "Update notification" trigger: - platform: state entity_id: binary_sensor.updater diff --git a/source/_cookbook/notify_if_over_threshold.markdown b/source/_cookbook/notify_if_over_threshold.markdown index f34c9d5a940..9ac53100330 100644 --- a/source/_cookbook/notify_if_over_threshold.markdown +++ b/source/_cookbook/notify_if_over_threshold.markdown @@ -15,7 +15,7 @@ notify me: name: mypushbullet automation: - - alias: FanOn + - alias: "FanOn" trigger: platform: numeric_state entity_id: sensor.furnace @@ -34,7 +34,7 @@ If you also want a notification when it drops back down below that limit, you co {% raw %} ```yaml - - alias: FanOff + - alias: "FanOff" trigger: platform: numeric_state entity_id: sensor.furnace diff --git a/source/_cookbook/perform_actions_based_on_input_select.markdown b/source/_cookbook/perform_actions_based_on_input_select.markdown index f8436cfe8ff..cf4f4b764c9 100644 --- a/source/_cookbook/perform_actions_based_on_input_select.markdown +++ b/source/_cookbook/perform_actions_based_on_input_select.markdown @@ -26,7 +26,7 @@ media_player: automation: # If you select "Rain", play the "rain.mp3" file - - alias: Play Rain Lullaby + - alias: "Play Rain Lullaby" trigger: platform: state @@ -35,14 +35,15 @@ automation: action: service: media_player.play_media - data: + 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 + - alias: "Play Babbling Brook Lullaby" trigger: platform: state @@ -51,13 +52,14 @@ automation: action: service: media_player.play_media - data: + 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 + - alias: "Stop the Lullaby" trigger: platform: state @@ -66,7 +68,7 @@ automation: action: service: media_player.turn_off - data: + 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. @@ -100,7 +102,7 @@ input_select: icon: mdi:airplay automation: - - alias: Stop Streaming Radio + - alias: "Stop Streaming Radio" trigger: - platform: state entity_id: input_select.radio_station @@ -125,7 +127,7 @@ automation: none {% endif %} - - alias: Stream Radio - Template + - alias: "Stream Radio - Template" trigger: - platform: state entity_id: input_select.radio_station diff --git a/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown b/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown index cf9347b9df8..f315c64d9b4 100644 --- a/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown +++ b/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown @@ -55,7 +55,7 @@ script: data: message: "WeMo not found, restarting HA" - service: switch.turn_on - data: + target: entity_id: switch.killhass automation: @@ -73,7 +73,8 @@ automation: state: "off" action: service: homeassistant.turn_on - entity_id: script.restarthawemo + target: + entity_id: script.restarthawemo - alias: "Stop HA" trigger: - platform: state @@ -91,7 +92,8 @@ automation: state: "on" action: service: homeassistant.turn_off - entity_id: script.restarthawemo + target: + entity_id: script.restarthawemo ``` {% endraw %} diff --git a/source/_cookbook/send_a_reminder.markdown b/source/_cookbook/send_a_reminder.markdown index 0e1c9236692..9b4509bbf83 100644 --- a/source/_cookbook/send_a_reminder.markdown +++ b/source/_cookbook/send_a_reminder.markdown @@ -21,7 +21,7 @@ and automation part to your `configuration.yaml` file. ```yaml automation: - - alias: Send message at a given time + - alias: "Send message at a given time" trigger: platform: time at: "12:15:00" diff --git a/source/_cookbook/sonos_say.markdown b/source/_cookbook/sonos_say.markdown index 478b0c54f02..4d25186ac8d 100644 --- a/source/_cookbook/sonos_say.markdown +++ b/source/_cookbook/sonos_say.markdown @@ -16,22 +16,22 @@ script: alias: "Sonos TTS script" sequence: - service: sonos.snapshot - data: + target: entity_id: "{{ sonos_entity }}" - service: sonos.unjoin - data: + target: entity_id: "{{ sonos_entity }}" - service: media_player.volume_set - data: + target: entity_id: "{{ sonos_entity }}" volume_level: "{{ volume }}" - service: tts.voicerss_say - data: + target: entity_id: "{{ sonos_entity }}" message: "{{ message }}" - delay: "{{ delay }}" - service: sonos.restore - data: + target: entity_id: "{{ sonos_entity }}" ``` diff --git a/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown b/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown index 9b46804f285..07a929ebda9 100644 --- a/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown +++ b/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown @@ -10,16 +10,17 @@ This recipe will turn on a light when there is motion and turn off the light whe ```yaml automation: -- alias: Turn on kitchen light when there is movement +- alias: "Turn on kitchen light when there is movement" trigger: platform: state entity_id: sensor.motion_sensor to: "on" action: service: light.turn_on - entity_id: light.kitchen_light + target: + entity_id: light.kitchen_light -- alias: Turn off kitchen light 10 minutes after last movement +- alias: "Turn off kitchen light 10 minutes after last movement" trigger: platform: state entity_id: sensor.motion_sensor @@ -28,29 +29,30 @@ automation: minutes: 10 action: service: light.turn_off - entity_id: light.kitchen_light + 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 +- 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 - data: + target: entity_id: - light.hallway_0 - light.hallway_1 - service: timer.start - data: + target: entity_id: timer.hallway -- alias: Turn off hallway lights 10 minutes after trigger +- alias: "Turn off hallway lights 10 minutes after trigger" trigger: platform: event event_type: timer.finished @@ -58,7 +60,7 @@ automation: entity_id: timer.hallway action: service: light.turn_off - data: + target: entity_id: - light.hallway_0 - light.hallway_1 @@ -71,7 +73,7 @@ timer: 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 +- alias: "Motion Sensor Lights On" trigger: platform: state entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor @@ -82,12 +84,13 @@ You can also restrict lights from turning on based on time of day and implement before: "23:30" action: service: homeassistant.turn_on - entity_id: group.office_lights + target: + entity_id: group.office_lights data: transition: 15 -- alias: Motion Sensor Lights Off +- alias: "Motion Sensor Lights Off" trigger: - platform: state entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor @@ -96,7 +99,8 @@ You can also restrict lights from turning on based on time of day and implement minutes: 15 action: - service: homeassistant.turn_off - entity_id: group.office_lights + target: + entity_id: group.office_lights data: transition: 160 ``` diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index bb725c6ca29..04e7bc51363 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -334,7 +334,8 @@ automation: seconds: "{{ states('input_number.lock_sec')|int }}" action: service: lock.lock - entity_id: lock.my_place + target: + entity_id: lock.my_place ``` {% endraw %} @@ -390,7 +391,8 @@ automation: below: -4.0 action: service: switch.turn_on - entity_id: switch.exterior_lighting + target: + entity_id: switch.exterior_lighting ``` {% endraw %} @@ -519,9 +521,11 @@ automation: to: "on" action: - service: climate.turn_on - entity_id: climate.office + target: + entity_id: climate.office - service: input_datetime.set_datetime - entity_id: input_datetime.turn_off_ac + target: + entity_id: input_datetime.turn_off_ac data: datetime: > {{ (now().timestamp() + 2*60*60) @@ -532,7 +536,8 @@ automation: at: input_datetime.turn_off_ac action: service: climate.turn_off - entity_id: climate.office + target: + entity_id: climate.office ``` {% endraw %} @@ -548,7 +553,8 @@ automation: at: sensor.phone_next_alarm action: service: light.turn_on - entity_id: light.bedroom + target: + entity_id: light.bedroom ``` #### Multiple Times diff --git a/source/_docs/automation/yaml.markdown b/source/_docs/automation/yaml.markdown index 3422ba0a7ad..2efe894ad7e 100644 --- a/source/_docs/automation/yaml.markdown +++ b/source/_docs/automation/yaml.markdown @@ -111,7 +111,7 @@ At startup, automations by default restore their last state of when Home Assista ```yaml automation: -- alias: Automation Name +- alias: "Automation Name" initial_state: false trigger: - platform: ... @@ -126,7 +126,7 @@ If you want to migrate your manual automations to use the editor, you'll have to ```yaml # Example automations.yaml entry. Note, automations.yaml is always a list! - id: my_unique_id # <-- Required for editor to work, for automations created with the editor the id will be automatically generated. - alias: Hello world + alias: "Hello world" trigger: - platform: state entity_id: sun.sun diff --git a/source/_docs/configuration.markdown b/source/_docs/configuration.markdown index b3ef7f15199..2c3567903d1 100644 --- a/source/_docs/configuration.markdown +++ b/source/_docs/configuration.markdown @@ -24,7 +24,7 @@ If you run into trouble while configuring Home Assistant, have a look at the [co
- Test any changes to your configuration files from the command line with `hass --script check_config`. This script allows you to test changes without the need to restart Home Assistant. Remember to run this as the user you run Home Assistant as. + Test any changes to your configuration files from the command line with `hass --script check_config`. This script allows you to test changes without the need to restart Home Assistant. Remember to run this as the user you run Home Assistant as. Configuration changes can also be tested using the UI by navigating to Configuration, Server Controls and clicking "Check Configuration".
@@ -34,14 +34,16 @@ There are many ways you can edit `configuration.yaml`. Here are three options to The simplest is to use the "File Editor" add-on. This will allow you to edit your configuration from within Home Assistant itself. -You can also use Samba (you may need to install the "Samba" add-on) and your favorite file editor. +Perhaps the most robust option is to load the Visual Studio Code add-on. VS Code offers live syntax checking and auto-fill of various Home Assistant entities. + +You can use Samba file share (you need to install the "Samba" add-on) and your favorite file editor. The most basic is to use SSH to connect to the system (you may need to install the SSH add-on) and then use `nano` (or `vim`) to edit the file. ## Reloading changes You will have to restart Home Assistant for most changes to `configuration.yaml` to take effect. -You can load changes to [automations](/docs/automation/), [core (customize)](/docs/configuration/customizing-devices/), [groups](/integrations/group/), [history stats](/integrations/history_stats/), [HomeKit](/integrations/homekit/), [input_booleans](/integrations/input_boolean/), [input_datetimes](/integrations/input_datetime/), [input_numbers](/integrations/input_number/), [input_selects](/integrations/input_select/), [input_texts](/integrations/input_text/), [MQTT](/integrations/mqtt/), [persons](/integrations/person/), [scenes](/integrations/scene/), [scripts](/integrations/script/), [statistics](/integrations/statistics/), [template sensors](/integrations/template/), [timers](/integrations/timer/), [zones](/integrations/zone/), and more without restarting. +You can load changes to the following components without restarting, by using the UI. Navigate to Configuration, Server Controls and scrolling down to the YAML configuration reloading: [automations](/docs/automation/), [core (customize)](/docs/configuration/customizing-devices/), [groups](/integrations/group/), [history stats](/integrations/history_stats/), [HomeKit](/integrations/homekit/), [input_booleans](/integrations/input_boolean/), [input_datetimes](/integrations/input_datetime/), [input_numbers](/integrations/input_number/), [input_selects](/integrations/input_select/), [input_texts](/integrations/input_text/), [MQTT](/integrations/mqtt/), [persons](/integrations/person/), [scenes](/integrations/scene/), [scripts](/integrations/script/), [statistics](/integrations/statistics/), [template sensors](/integrations/template/), [timers](/integrations/timer/), [zones](/integrations/zone/), and more without restarting.
diff --git a/source/_docs/configuration/splitting_configuration.markdown b/source/_docs/configuration/splitting_configuration.markdown index 33bf5480b9a..642048da29f 100644 --- a/source/_docs/configuration/splitting_configuration.markdown +++ b/source/_docs/configuration/splitting_configuration.markdown @@ -231,22 +231,24 @@ These work recursively. As an example using `!include_dir_* automation`, will in ```yaml automation: - - alias: Automation 1 + - alias: "Automation 1" trigger: platform: state entity_id: device_tracker.iphone to: "home" action: service: light.turn_on - entity_id: light.entryway - - alias: Automation 2 + target: + entity_id: light.entryway + - alias: "Automation 2" trigger: platform: state entity_id: device_tracker.iphone from: "home" action: service: light.turn_off - entity_id: light.entryway + target: + entity_id: light.entryway ``` can be turned into: @@ -260,27 +262,29 @@ automation: !include_dir_list automation/presence/ `automation/presence/automation1.yaml` ```yaml -alias: Automation 1 +alias: "Automation 1" trigger: platform: state entity_id: device_tracker.iphone to: "home" action: service: light.turn_on - entity_id: light.entryway + target: + entity_id: light.entryway ``` `automation/presence/automation2.yaml` ```yaml -alias: Automation 2 +alias: "Automation 2" trigger: platform: state entity_id: device_tracker.iphone from: "home" action: service: light.turn_off - entity_id: light.entryway + target: + entity_id: light.entryway ``` It is important to note that each file must contain only **one** entry when using `!include_dir_list`. @@ -370,22 +374,24 @@ speech: ```yaml automation: - - alias: Automation 1 + - alias: "Automation 1" trigger: platform: state entity_id: device_tracker.iphone to: "home" action: service: light.turn_on - entity_id: light.entryway - - alias: Automation 2 + target: + entity_id: light.entryway + - alias: "Automation 2" trigger: platform: state entity_id: device_tracker.iphone from: "home" action: service: light.turn_off - entity_id: light.entryway + target: + entity_id: light.entryway ``` can be turned into: @@ -399,22 +405,24 @@ automation: !include_dir_merge_list automation/ `automation/presence.yaml` ```yaml -- alias: Automation 1 +- alias: "Automation 1" trigger: platform: state entity_id: device_tracker.iphone to: "home" action: service: light.turn_on - entity_id: light.entryway -- alias: Automation 2 + target: + entity_id: light.entryway +- alias: "Automation 2" trigger: platform: state entity_id: device_tracker.iphone from: "home" action: service: light.turn_off - entity_id: light.entryway + target: + entity_id: light.entryway ``` It is important to note that when using `!include_dir_merge_list`, you must include a list in each file (each list item is denoted with a hyphen [-]). Each file may contain one or more entries. diff --git a/source/_docs/configuration/yaml.markdown b/source/_docs/configuration/yaml.markdown index 9acbe1125e9..1bf3d3d238c 100644 --- a/source/_docs/configuration/yaml.markdown +++ b/source/_docs/configuration/yaml.markdown @@ -5,7 +5,7 @@ description: "Details about YAML to configure Home Assistant." Home Assistant uses the [YAML](https://yaml.org/) syntax for configuration. YAML might take a while to get used to but is really powerful in allowing you to express complex configurations. -For integrations that you want to use in Home Assistant, you add code in your `configuration.yaml` file to specify its settings. This especially applies to integrations that are not yet available to configure through the UI. +While more and more integrations are configured through the UI, for some, you will add code in your `configuration.yaml` file to specify its settings. The following example entry assumes that you would like to set up the [notify integration](/integrations/notify) with the [pushbullet platform](/integrations/pushbullet). diff --git a/source/_docs/installation.markdown b/source/_docs/installation.markdown deleted file mode 100644 index 8ba3c999d4b..00000000000 --- a/source/_docs/installation.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "Installation of Home Assistant" -description: "Instructions on how to install Home Assistant to launch on start." ---- - -
- -Beginners should check our [Getting started guide](/getting-started/) first. - -
- -Home Assistant provides multiple ways to be installed. The first start may take up to 20 minutes because the required packages will be downloaded and installed. The web interface will be served on `http://ip.add.re.ss:8123/`. Replace `ip.add.re.ss` with the IP of the computer you installed it on. - -
- - Please remember to [secure your installation](/docs/configuration/securing/) once you've finished with the installation process. - -
- -## Hardware - -Below is a list of **minimum** requirements - -Type | Minimum --- | -- -Storage | 32 GB -Memory | 1 GB -Network | 100 Mb/s wired -Power (if Pi) | At least 2.5A - -### Performance expectations - -This is a list of popular platforms and what to expect from them. - -Platform | Notes --- | -- -Raspberry Pi Zero/Pi 2 | **Only** use these for testing -Raspberry Pi 3/3+/4 | This is a good starting point, and depending on the amount of devices you integrate this can be enough - use an [A2 class SD](https://amzn.to/2X0Z2di) card if possible. -NUC i3 | This is if you need a little more power over a Pi -NUC i5 | This will allow you to run multiple services without any issues, perfect for a homelab -NUC i7/i9 | Pure power, you should not have *any* performance issues - -## Recommended - -These install options are fully supported by Home Assistant's documentation. For example, if an integration requires that you install something to make it work on one of these methods then the integration page will document the steps required. - -
- -The only installation methods that allow you to use Home Assistant Add-ons is using the Home Assistant image. All other methods only install the base Home Assistant packages, however the software from the add-ons may still usually be installed manually like any other program. - -
- -**Method**|**You have**|**Recommended for** -:-----|:-----|:----- -[Home Assistant OS](/hassio/installation/)|[A supported platform](/hassio/installation/)|Anybody -[Home Assistant Container](/docs/installation/docker/)|Docker|Anybody already running Docker - -## Alternative installs - -If you use these install methods, we assume that you know how to manage and administer the operating system you're using. Due to the range of platforms on which these install methods can be used, integration documentation may only tell you what you have to install, not how to install it. - -**Method**|**You have**|**Recommended for** -:-----|:-----|:----- -[Home Assistant Core](/docs/installation/raspberry-pi/)|Any Linux, Python 3.8 or later|Those familiar with their operating system -[Home Assistant Supervised](https://github.com/home-assistant/supervised-installer) | [Requirements](https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md#supported-operating-system-system-dependencies-and-versions) | Those very familiar with their operating system -[venv
(as your user)](/docs/installation/virtualenv/)|Any Python 3.8 or later|**Developers** - -## Community provided guides - -Additional installation guides can be found on our [Community Forum](https://community.home-assistant.io/tags/c/community-guides/51/installation). - -These Community Guides are provided as-is. Some of these install methods are more limited than the methods above. Some integrations may not work due to limitations of the platform. diff --git a/source/_docs/installation/docker.markdown b/source/_docs/installation/docker.markdown deleted file mode 100644 index b92b6a7f736..00000000000 --- a/source/_docs/installation/docker.markdown +++ /dev/null @@ -1,317 +0,0 @@ ---- -title: "Installation on Docker" -description: "Instructions to install Home Assistant on a Docker." ---- - -
- -These below instructions are for an installation of Home Assistant Core running in your own Docker environment, which you manage yourself. - -Note that Docker command line option `--net=host` or the compose file equivalent `network_mode: host` must be used to put Home Assistant on the host's network, otherwise certain functionality - including mDNS and UPnP - will break. The `-p` command line option or the compose file equivalent `ports:` is not compatible with host networking mode and must not be used. - -
- -## Platform Installation - -Installation with Docker is straightforward. Adjust the following command so that `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration and run it: - -## Autostart using Docker - -
- -Do not try to combine Docker `restart` policies with host-level process managers (such as `systemd`), because this creates conflicts. - -
- -Add `--restart=always` to your `docker run` command before homeassistant/home-assistant:stable. See [the Docker autostart documentation](https://docs.docker.com/config/containers/start-containers-automatically/) for details and more options. - -### Linux - -```bash -docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable -``` - -Updating: - -```bash -docker pull homeassistant/home-assistant:stable # if this returns "Image is up to date" then you can stop here -docker stop home-assistant # stop the running container -docker rm home-assistant # remove it from Docker's list of containers -docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable # finally, start a new one -``` - -### Raspberry Pi 3/4 (Raspberry Pi OS) - -Raspberry Pi 3: -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /PATH_TO_YOUR_CONFIG:/config --net=host homeassistant/raspberrypi3-homeassistant:stable -``` - -Raspberry Pi 4: -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /PATH_TO_YOUR_CONFIG:/config --net=host homeassistant/raspberrypi4-homeassistant:stable -``` - -You need to replace `/PATH_TO_YOUR_CONFIG` with your path to the configuration. For example, if you choose your configuration path to be `/home/pi/homeassistant`, the command for **Raspberry Pi 3** would be: - -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /home/pi/homeassistant:/config --net=host homeassistant/raspberrypi3-homeassistant:stable -``` - -### macOS - -When using `docker-ce` (or `boot2docker`) on macOS, you are unable to map the local timezone to your Docker container ([Docker issue](https://github.com/docker/for-mac/issues/44)). Instead of `-v /etc/localtime:/etc/localtime:ro`, just pass in the timezone environment variable when you launch the container, e.g, `-e "TZ=America/Los_Angeles"`. Replace "America/Los_Angeles" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v /PATH_TO_YOUR_CONFIG:/config -p 8123:8123 homeassistant/home-assistant:stable -``` - -Alternatively, `docker-compose` works with any recent release of Docker CE on macOS. Note the `/dev/tty*` device name used by your Arduino etc. devices will differ from the Linux example, so the compose `mount:` may require updates. - -### Windows - -Docker containers are completely isolated from its Windows host system. So when you delete a container, all the changes you made to that container are also removed. If you want to have configuration files or other assets remain persistent, try mounting Windows folders on containers. - -Before proceeding, make sure you have shared out a drive for Docker to mount to. This will allow the saving of configuration files to persist on the local machine rather than in the Docker container (which may be destroyed when upgraded). - - - - -```powershell -docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v /PATH_TO_YOUR_CONFIG:/config -p 8123:8123 homeassistant/home-assistant:stable -``` - -Itโ€™s easier to understand the trick when put into practice. Here we would like to mount a current working directory (something like `C:\Users\\homeassistant` make sure this exists first) into the `homeassistant/home-assistant:stable` image at the `/config` location in the container. We would do that as so: - -```powershell -docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v //c/Users//homeassistant:/config -p 8123:8123 homeassistant/home-assistant:stable -``` - -Host networking is not supported on Windows so we have to forward the port 8123. This will let you access your Home Assistant portal from `http://localhost:8123`, and if you forward port 8123 on your router to your machine IP, the traffic will be forwarded on through to the Docker container. - -### Synology NAS - -As Synology within DSM now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see - -The steps would be: - -- Install "Docker" package on your Synology NAS -- Launch Docker-app and move to "Registry"-section -- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag. -- Wait for some time until your NAS has pulled the image -- Move to the "Image"-section of the Docker-app -- Click on "Launch" -- Choose a container-name you want (e.g., "homeassistant") -- Click on "Advanced Settings" -- Set "Enable auto-restart" if you like -- Within "Volume" click on "Add Folder" and choose either an existing folder or add a new folder. The "mount path" has to be "/config", so that Home Assistant will use it for the configs and logs. It is therefore recommended that the folder you choose should be named "config" or "homeassistant/config" to avoid confusion when referencing it within service calls. -- Within "Network" select "Use same network as Docker Host" -- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) -- Confirm the "Advanced Settings" -- Click on "Next" and then "Apply" -- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Synology NAS IP address - for example `http://192.168.1.10:8123`) - -If you are using the built-in firewall, you must also add the port 8123 to allowed list. This can be found in "Control Panel -> Security" and then the Firewall tab. Click "Edit Rules" besides the Firewall Profile dropdown box. Create a new rule and select "Custom" for Ports and add 8123. Edit Source IP if you like or leave it at default "All". Action should stay at "Allow". - -To use a Z-Wave USB stick for Z-Wave control, the HA Docker container needs extra configuration to access to the USB stick. While there are multiple ways to do this, the least privileged way of granting access can only be performed via the Terminal, at the time of writing. See this page for configuring Terminal acces to your Synology NAS: - - - -See this page for accessing the Terminal via SSH: - - - -Adjust the following Terminal command as follows : - -- Replace `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration -- Replace `/PATH_TO_YOUR_USB_STICK` matches the path for your USB stick (e.g., `/dev/ttyACM0` for most Synology users) -- Replace "Australia/Melbourne" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) - -Run it in Terminal. - -```bash -sudo docker run --restart always -d --name="homeassistant" -v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK -e TZ=Australia/Melbourne --net=host homeassistant/home-assistant:stable -``` - -Complete the remainder of the Z-Wave configuration by [following the instructions here.](/docs/z-wave/installation) - -Remark: to update your Home Assistant on your Docker within Synology NAS, you just have to do the following: - -- Go to the Docker-app and move to "Registry"-section -- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag. -- Wait until the system-message/-notification comes up, that the download is finished (there is no progress bar) -- Move to "Container"-section -- Stop your container if it's running -- Right-click on it and select "Action"->"Clear". You won't lose any data, as all files are stored in your configuration-directory -- Start the container again - it will then boot up with the new Home Assistant image - -Remark: to restart your Home Assistant within Synology NAS, you just have to do the following: - -- Go to the Docker-app and move to "Container"-section -- Right-click on it and select "Action"->"Restart". - -
- -If you want to use a USB Bluetooth adapter or Z-Wave USB Stick with Home Assistant on Synology Docker these instructions do not correctly configure the container to access the USB devices. To configure these devices on your Synology Docker Home Assistant you can follow the instructions provided [here](https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/) by Phil Hawthorne. - -
- -### QNAP NAS - -As QNAP within QTS now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see - -The steps would be: - -- Install "Container Station" package on your Qnap NAS -- Launch Container Station and move to "Create Container"-section -- Search image "homeassistant/home-assistant" with Docker Hub and click on "Install" - Make attention to CPU architecture of your NAS. For ARM CPU types the correct image is "homeassistant/armhf-homeassistant" -- Choose "stable" version and click next -- Choose a container-name you want (e.g., "homeassistant") -- Click on "Advanced Settings" -- Within "Shared Folders" click on "Volume from host" > "Add" and choose either an existing folder or add a new folder. The "mount point has to be `/config`, so that Home Assistant will use it for the configuration and logs. -- Within "Network" and select Network Mode to "Host" -- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) -- Click on "Create" -- Wait for some time until your NAS has created the container -- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Qnap NAS IP address - for example `http://192.xxx.xxx.xxx:8123`) - -Remark: To update your Home Assistant on your Docker within Qnap NAS, you just remove container and image and do steps again (Don't remove "config" folder). - -If you want to use a USB Bluetooth adapter or Z-Wave USB stick with Home Assistant on Qnap Docker, follow those steps: - -#### Z-Wave - -- Connect to your NAS over SSH -- Load cdc-acm kernel module(when NAS restart need to run this command) - `insmod /usr/local/modules/cdc-acm.ko` -- Find USB devices attached. Type command: - `ls /dev/tty*` - The above command should show you any USB devices plugged into your NAS. If you have more than one, you may get multiple items returned. Like : `ttyACM0` - -- Run Docker command: - - ```bash - docker run --init --name home-assistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London --device /dev/ttyACM0 homeassistant/home-assistant:stable - ``` - - `-v` is your configuration path - `-e` is set timezone - -- Edit `configuration.yaml` - -```yaml -zwave: - usb_path: /dev/ttyACM0 -``` - -That will tell Home Assistant where to look for our Z-Wave radio. - -#### Bluetooth - -- Connect to your NAS over SSH -- Run Docker command: - - ```bash - docker run --init --name home-assistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London -v /dev/bus/usb:/dev/bus/usb -v /var/run/dbus:/var/run/dbus homeassistant/home-assistant:stable - ``` - - First `-v` is your configuration path - `-e` is set timezone - -- Edit the `configuration.yaml` file - -```yaml -device_tracker: - - platform: bluetooth_tracker -``` - -## Restart - -If you change the configuration you have to restart the server. To do that you have 2 options. - - 1. You can go to the **Developer Tools** -> **Services**, select the service `homeassistant.restart` and click "Call Service". - 2. Or you can restart it from a terminal by running `docker restart home-assistant` - -## Docker Compose - -As the Docker command becomes more complex, switching to `docker-compose` can be preferable and support automatically restarting on failure or system restart. Create a `docker-compose.yml` file: - -```yaml - version: "3" - services: - homeassistant: - container_name: home-assistant - image: homeassistant/home-assistant:stable - volumes: - - /PATH_TO_YOUR_CONFIG:/config - environment: - - TZ=America/New_York - restart: always - network_mode: host -``` - -Then start the container with: - -```bash -docker-compose up -d -``` - -To restart Home Assistant when you have changed configuration: - -```bash -docker-compose restart -``` - -To update your docker-compose image to the latest version and restart: - -```bash -docker-compose pull homeassistant -docker-compose up -d -``` - -Note: the above will fetch the latest matching image for the `homeassistant` service only. To fetch all matching images for all services defined in the same `docker-compose.yaml` file, omit the service name from the first command. - -## Exposing Devices - -In order to use Z-Wave, Zigbee or other integrations that require access to devices, you need to map the appropriate device into the container. Ensure the user that is running the container has the correct privileges to access the `/dev/tty*` file, then add the device mapping to your Docker command: - -```bash -$ docker run --init -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config \ - -e "TZ=Australia/Melbourne" --device /dev/ttyUSB0:/dev/ttyUSB0 \ - --net=host homeassistant/home-assistant:stable -``` - -or in a `docker-compose.yml` file: - -```yaml - version: "3" - services: - homeassistant: - container_name: home-assistant - image: homeassistant/home-assistant:stable - volumes: - - /PATH_TO_YOUR_CONFIG:/config - devices: - - /dev/ttyUSB0:/dev/ttyUSB0 - - /dev/ttyUSB1:/dev/ttyUSB1 - - /dev/ttyACM0:/dev/ttyACM0 - environment: - - TZ=America/New_York - restart: always - network_mode: host -``` - -
- -On Mac, USB devices are [not passed through](https://github.com/docker/for-mac/issues/900) by default. Follow the instructions in [Using USB with Docker for Mac](https://dev.to/rubberduck/using-usb-with-docker-for-mac-3fdd) by Christopher McClellan if your device is not showing up. - -
- -## Optimizations - -The Home Assistant Container is using an alternative memory allocation library [jemalloc](http://jemalloc.net/) for better memory management and Python runtime speedup. - -As jemalloc can cause issues on certain hardware, it can be disabled by passing the environment variable `DISABLE_JEMALLOC` with any value, for example: `-e "DISABLE_JEMALLOC=true"`. - -The error message `: Unsupported system page size` is one known indicator. diff --git a/source/_docs/installation/raspberry-pi.markdown b/source/_docs/installation/raspberry-pi.markdown deleted file mode 100644 index 1c6cef6a41d..00000000000 --- a/source/_docs/installation/raspberry-pi.markdown +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: "Manual installation on a Raspberry Pi" -description: "Instructions to install Home Assistant Core on a Raspberry Pi running Raspberry Pi OS Lite." ---- - -This installation of Home Assistant Core requires the Raspberry Pi to run [Raspberry Pi OS Lite](https://www.raspberrypi.org/downloads/raspberry-pi-os/). The installation will be installed in a [Virtual Environment](/docs/installation/virtualenv) with minimal overhead. Instructions assume this is a new installation of Raspberry Pi OS Lite. - -You must have Python 3.8 or later installed (including the package `python3-dev`) which is *not* the case for Raspberry Pi OS and you will need to install Python manually. - -
-Although these installation steps specifically mention a Raspberry Pi, you can go ahead and proceed on any Linux install as well. This guide is also referred to as the "Advanced Guide" for a virtual environment install. -
- -
- -Please remember to ensure you're using an [appropriate power supply](https://www.raspberrypi.org/documentation/faqs/#pi-power) with your Pi. Mobile chargers may not be suitable, since some are designed to only provide the full power with that manufacturer's handsets. USB ports on your computer also will not supply enough power and must not be used. - -
- -Connect to the Raspberry Pi over SSH. Default password is `raspberry`. -You will need to enable SSH access. The Raspberry Pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/). - -```bash -ssh pi@ipaddress -``` - -Changing the default password is encouraged. - -```bash -passwd -``` - -Update the system. - -```bash -sudo apt-get update -sudo apt-get upgrade -y -``` - -Install the dependencies. - -```bash -sudo apt-get install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 -``` - -Add an account for Home Assistant Core called `homeassistant`. -Since this account is only for running Home Assistant Core the extra arguments of `-rm` is added to create a system account and create a home directory. The arguments `-G dialout,gpio,i2c` adds the user to the `dialout`, `gpio` and the `i2c` group. The first is required for using Z-Wave and Zigbee controllers, while the second is required to communicate with Raspberry's GPIO. - -```bash -sudo useradd -rm homeassistant -G dialout,gpio,i2c -``` - -Next we will create a directory for the installation of Home Assistant Core and change the owner to the `homeassistant` account. - -```bash -cd /srv -sudo mkdir homeassistant -sudo chown homeassistant:homeassistant homeassistant -``` - -Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the `homeassistant` account. - -```bash -sudo -u homeassistant -H -s -cd /srv/homeassistant -python3.8 -m venv . -source bin/activate -``` - -Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required Python package. - -```bash -python3 -m pip install wheel -``` - -Once you have installed the required Python package it is now time to install Home Assistant Core! - -```bash -pip3 install homeassistant -``` - -Start Home Assistant Core for the first time. This will complete the installation for you, automatically creating the `.homeassistant` configuration directory in the `/home/homeassistant` directory, and installing any basic dependencies. - -```bash -hass -``` - -You can now reach your installation on your Raspberry Pi over the web interface on `http://ipaddress:8123`. - -
- -When you run the `hass` command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get "site cannot be reached" error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster. - -
- -## Updating - -To update to the latest version of Home Assistant Core follow these simple steps: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install --upgrade homeassistant -``` - -Once the last command executes, restart the Home Assistant Core service to apply the latest updates. Please keep in mind that some updates may take longer to start up than others. If Home Assistant Core fails to start, make sure you check the **Breaking Changes** from the [Release Notes](https://www.home-assistant.io/latest-release-notes/). - -## Run a specific version - -In the event that a Home Assistant Core version doesn't play well with your hardware setup, you can downgrade to a previous release. For example: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install homeassistant==0.XX.X -``` - -## Run the beta version - -If you would like to test next release before anyone else, you can install the beta version released every two weeks, for example: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install --pre --upgrade homeassistant -``` - -## Run the development version - -If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to `dev`. - -
- The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption. -
- -For example: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev -``` - -## Activating the virtual environment - -When instructions tell you to activate the virtual environment, the following commands will do this: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -``` diff --git a/source/_docs/installation/updating.markdown b/source/_docs/installation/updating.markdown deleted file mode 100644 index 5352fdbc3ea..00000000000 --- a/source/_docs/installation/updating.markdown +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "Updating Home Assistant" -description: "Step to update Home Assistant." ---- - -
- -The upgrade process differs depending on the installation you have, so please review the documentation that is specific to your install: [Home Assistant](/hassio/) or [Home Assistant Core](/docs/installation/virtualenv/#upgrade). - -
- -Check what's new in the latest version and potentially impacts your system in the [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). It is good practice to review these release notes and pay close attention to the **Breaking Changes** that are listed there. If you haven't done an update for a while, you should also check previous release notes as they can also contain relevant **Breaking Changes**. These **Breaking Changes** may require configuration updates for your components. If you missed this and Home Assistant refuses to start, check the log file in the [configuration](/docs/configuration/) directory, e.g., `.homeassistant/home-assistant.log`, for details about broken components. - -
- -To avoid permission errors, the upgrade must be run as the same user as was used during the initial installation, again review the documentation specific to your install [Home Assistant](/hassio/) or [Home Assistant Core](/docs/installation/virtualenv). - -
- -The default way to update Home Assistant to the latest release, when available, is: - -```bash -pip3 install --upgrade homeassistant -``` - -For a Docker container, simply pull the latest stable one: - -```bash -sudo docker pull homeassistant/home-assistant:stable -``` - -For a Raspberry Pi Docker container, simply pull the latest stable one: - -```bash -sudo docker pull homeassistant/raspberrypi3-homeassistant:stable -``` - -After updating, you must start/restart Home Assistant for the changes to take effect. This means that you will have to restart `hass` itself. -Startup can take a considerable amount of time (i.e., minutes) depending on your device. This is because all requirements are updated as well. - -[BRUH automation](https://www.bruhautomation.io/) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant. - -## Run a specific version - -In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release: - -```bash -pip3 install homeassistant==0.XX.X -``` - -## Run the beta version - -If you would like to test the next release before anyone else, you can install the beta version released every two weeks: - -```bash -pip3 install --pre --upgrade homeassistant -``` - -## Run the development version - -If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`. - -
- The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption. -
- -```bash -pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev -``` - -## Update Home Assistant installation - -Best practice for updating a Home Assistant installation: - -1. Backup your installation, using the snapshot functionality Home Assistant offers. -2. Check the release notes for breaking changes on [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f`) and search for **Breaking Changes**. -3. Check your configuration using the [Check Home Assistant configuration](/addons/check_config/) add-on. -4. If the check passes, you can safely update. If not, update your configuration accordingly. -5. Update Home Assistant. diff --git a/source/_docs/installation/virtualenv.markdown b/source/_docs/installation/virtualenv.markdown deleted file mode 100644 index 3676ecf1b26..00000000000 --- a/source/_docs/installation/virtualenv.markdown +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: "Installation in Python virtual environment" -description: "How to install Home Assistant in a Python virtual environment." ---- - -If you already have Python 3.8 or later installed, you can easily give Home Assistant a spin. - -It's recommended when installing Python packages that you use a [virtual environment](https://docs.python.org/3.8/library/venv.html#module-venv). This will make sure that your Python installation and Home Assistant installation won't impact one another. The following steps will work on most UNIX like systems. - -
- -This is a generic guide for running Home Assistant under Python. We recommend to use [our recommended installation guides](/docs/installation/#recommended). The steps below may be shorter but some users find difficulty when applying updates and may run into issues. - -Before you begin the guide below, ensure that you have a *so-called standard* build environment that includes things like `make`, `gcc`, `python3`, including Python 3 `setuptools` and `pip` modules. Less obvious is the need to install `libssl-dev` (for opensslv.h), `libffi-dev` (for cffi.h) for things to build later on, `libjpeg-dev`, `zlib1g-dev`, `libopenjp2-7` and `libtiff5` needed for the frontend. - -
- -{% comment %} -This page describes installation instructions for a pure Python installation. -It should not contain any OS specific instructions. -{% endcomment %} - -### Install - - 1. Create a virtual environment in your current directory: - ```bash - python3.8 -m venv homeassistant - ``` - 2. Open the virtual environment: - ```bash - cd homeassistant - ``` - 3. Activate the virtual environment: - ```bash - source bin/activate - ``` - 4. Install Home Assistant: - ```bash - python3 -m pip install homeassistant - ``` - 5. Run Home Assistant: - ```bash - hass --open-ui - ``` - 6. You can now reach the web interface on `http://ipaddress:8123/` - the first start may take a couple of minutes before the web interface is available. This can take longer if you're using lower-end hardware like a Raspberry Pi Zero. - -### Upgrade - - 1. Stop Home Assistant - - 2. Open the directory where the virtual environment is located, activate the virtual environment, then upgrade Home Assistant: - ```bash - cd homeassistant - source bin/activate - python3 -m pip install --upgrade homeassistant - ``` - 3. Start Home Assistant - 4. You can now reach the web interface on `http://ipaddress:8123/` - the first start may take some time before the web interface is available, depending on how many integrations need to be upgraded. - -### Run a specific version - -In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release. For example: - -```bash -cd homeassistant -source bin/activate -pip3 install homeassistant==0.XX.X -``` - -#### Run the beta version - -If you would like to test next release before anyone else, you can install the beta version, for example: - -```bash -cd homeassistant -source bin/activate -pip3 install --pre --upgrade homeassistant -``` - -#### Run the development version - -If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`. - -
- The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption. -
- -For example: - -```bash -cd homeassistant -source bin/activate -pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev -``` - -### Notes - -- In the future, if you want to start Home Assistant manually again, follow step 2, 3 and 5. -- It's recommended to run Home Assistant as a dedicated user. - -
- -Looking for more advanced guides? Check our [Raspberry Pi OS guide](/docs/installation/raspberry-pi/) or the [other installation guides](/docs/installation/). - -
- -### After upgrading Python - -If you've upgraded Python (for example, you were running 3.8.1 and now you've installed 3.8.6) then you'll need to build a new virtual environment. Simply rename your existing virtual environment directory: - -```bash -mv homeassistant homeassistant.old -``` - -Then follow the [Install](#install) steps again, being sure to use the newly installed version of Python. diff --git a/source/_docs/scene.markdown b/source/_docs/scene.markdown index 8275f5a0103..c2ede2d14ca 100644 --- a/source/_docs/scene.markdown +++ b/source/_docs/scene.markdown @@ -55,7 +55,8 @@ automation: to: "home" action: service: scene.turn_on - entity_id: scene.romantic + target: + entity_id: scene.romantic ``` ## Applying a scene without defining it @@ -101,8 +102,9 @@ automation: to: "home" action: service: scene.turn_on - data: + target: entity_id: scene.romantic + data: transition: 2.5 ``` diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index b00bcdbc380..508e9341b1c 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -16,7 +16,7 @@ script: sequence: # This is written using the Script Syntax - service: light.turn_on - data: + target: entity_id: light.ceiling - service: notify.notify data: @@ -47,10 +47,11 @@ script: The most important one is the action to call a service. This can be done in various ways. For all the different possibilities, have a look at the [service calls page]. ```yaml -- alias: Bedroom lights on +- alias: "Bedroom lights on" service: light.turn_on - data: + target: entity_id: group.bedroom + data: brightness: 100 ``` @@ -74,10 +75,11 @@ The variables action allows you to set/override variables that will be accessibl - light.kitchen - light.living_room brightness: 100 -- alias: Control lights +- alias: "Control lights" service: light.turn_on - data: + target: entity_id: "{{ entities }}" + data: brightness: "{{ brightness }}" ``` @@ -234,16 +236,18 @@ This can be used to take different actions based on whether or not the condition - service: script.door_did_not_open default: - service: script.turn_on - entity_id: - - script.door_did_open - - script.play_fanfare + target: + entity_id: + - script.door_did_open + - script.play_fanfare # Wait a total of 10 seconds. - wait_template: "{{ is_state('binary_sensor.door_1', 'on') }}" timeout: 10 continue_on_timeout: false - service: switch.turn_on - entity_id: switch.some_light + target: + entity_id: switch.some_light - wait_for_trigger: - platform: state entity_id: binary_sensor.door_2 @@ -252,7 +256,8 @@ This can be used to take different actions based on whether or not the condition timeout: "{{ wait.remaining }}" continue_on_timeout: false - service: switch.turn_off - entity_id: switch.some_light + target: + entity_id: switch.some_light ``` {% endraw %} @@ -290,7 +295,7 @@ The `event_data` accepts templates. The following automation example shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation. ```yaml -- alias: Fire Event +- alias: "Fire Event" trigger: - platform: state entity_id: switch.kitchen @@ -306,7 +311,7 @@ The following automation example shows how to capture the custom event `event_li {% raw %} ```yaml -- alias: Capture Event +- alias: "Capture Event" trigger: - platform: event event_type: event_light_state_changed @@ -336,14 +341,14 @@ script: mode: restart sequence: - service: light.turn_on - data: + target: entity_id: "light.{{ light }}" - repeat: count: "{{ count|int * 2 - 1 }}" sequence: - delay: 2 - service: light.toggle - data: + target: entity_id: "light.{{ light }}" flash_hallway_light: sequence: @@ -367,7 +372,7 @@ script: do_something: sequence: - service: script.get_ready_for_something - - alias: Repeat the sequence AS LONG AS the conditions are true + - alias: "Repeat the sequence AS LONG AS the conditions are true" repeat: while: - condition: state @@ -415,7 +420,7 @@ automation: state: "off" mode: single action: - - alias: Repeat the sequence UNTIL the conditions are true + - alias: "Repeat the sequence UNTIL the conditions are true" repeat: sequence: # Run command that for some reason doesn't always work @@ -486,7 +491,8 @@ automation: data: duration: 60 - service: light.turn_on - entity_id: all + target: + entity_id: all ``` ```yaml @@ -504,13 +510,15 @@ automation: value_template: "{{ trigger.to_state.state == 'on' }}" sequence: - service: script.turn_on - entity_id: - - script.slowly_turn_on_front_lights - - script.announce_someone_at_door + target: + entity_id: + - script.slowly_turn_on_front_lights + - script.announce_someone_at_door # ELSE (i.e., motion stopped) default: - service: light.turn_off - entity_id: light.front_lights + target: + entity_id: light.front_lights ``` ```yaml @@ -535,16 +543,19 @@ automation: value_template: "{{ now().hour < 18 }}" sequence: - service: light.turn_off - entity_id: light.living_room + target: + entity_id: light.living_room - service: script.sim_day # ELSE night default: - service: light.turn_off - entity_id: light.kitchen + target: + entity_id: light.kitchen - delay: minutes: "{{ range(1, 11)|random }}" - service: light.turn_off - entity_id: all + target: + entity_id: all ``` {% endraw %} @@ -573,7 +584,8 @@ automation: is_state('binary_sensor.all_clear', 'off') }} sequence: - service: script.turn_on - entity_id: script.flash_lights + target: + entity_id: script.flash_lights - service: script.arrive_home data: ok: false diff --git a/source/_docs/tools/benchmark.markdown b/source/_docs/tools/benchmark.markdown deleted file mode 100644 index 94fd3b30fdf..00000000000 --- a/source/_docs/tools/benchmark.markdown +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "benchmark" -description: "Script to perform benchmarking of Home Assistant" ---- - -For testing the performance of Home Assistant the Benchmark script runs until you exit using Control+C. - -Firing and handling of a million events. - -```bash -hass --script benchmark async_million_events -``` diff --git a/source/_docs/tools/dev-tools.markdown b/source/_docs/tools/dev-tools.markdown index 3e874923cb1..c876f1a0120 100644 --- a/source/_docs/tools/dev-tools.markdown +++ b/source/_docs/tools/dev-tools.markdown @@ -65,7 +65,7 @@ state: on If there is an automation that handles that event, it will be automatically triggered. See below: ```yaml -- alias: Capture Event +- alias: "Capture Event" trigger: platform: event event_type: event_light_state_changed diff --git a/source/_docs/installation/troubleshooting.markdown b/source/_docs/troubleshooting.markdown similarity index 97% rename from source/_docs/installation/troubleshooting.markdown rename to source/_docs/troubleshooting.markdown index 991ab732d6c..a6a0d70ec53 100644 --- a/source/_docs/installation/troubleshooting.markdown +++ b/source/_docs/troubleshooting.markdown @@ -46,7 +46,7 @@ iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere ### System freezes -On small systems (such as a Pi2), not directly sypported by binaries (Python Wheels) you may run out of memory. +On small systems (such as a Pi2), not directly supported by binaries (Python Wheels) you may run out of memory. Upon the first run or after an upgrade, Home Assistant uses a lot of resources to (re)compile all the integrations. If you run out of memory and/or swap memory, your system will freeze. Increasing swap memory can help: diff --git a/source/_docs/z-wave/device-specific.markdown b/source/_docs/z-wave/device-specific.markdown index d13dda84b68..aba1a59adf2 100644 --- a/source/_docs/z-wave/device-specific.markdown +++ b/source/_docs/z-wave/device-specific.markdown @@ -214,7 +214,7 @@ For Inovelli LZW30-SN and LZW31-SN switches with a third button for configuratio Once this is complete, `zwave.scene_activated` events will fire according to which button press you perform. For information on what button press corresponds to what scene_id and scene_data in the event, see [Inovelli Knowledge Base > How To: Setting Up Scenes In Home Assistant](https://support.inovelli.com/portal/en/kb/articles/how-to-setting-up-scenes-in-home-assistant). -### Zooz Scene Capable On/Off and Dimmer Wall Switches (Zen21v3 & Zen22v2 - Firmware 3.0+, Zen26 & Zen27 - Firmware 2.0+, Zen30 Double Switch) +### Zooz Scene Capable On/Off and Dimmer Wall Switches (Zen21v3 & Zen22v2 - Firmware 3.0+, Zen26 & Zen27 - Firmware 2.0+, Zen30 Double Switch, Zen34 Remote Switch) Many Zooz switches that have been sold do not have the latest firmwares. Contact Zooz to obtain the over the air firmware update instructions and new user manual for the switches. @@ -746,7 +746,39 @@ Zen30 (Double Switch): ``` +Zen34 Remote Switch: +```xml + + + Choose the LED indicator mode for your Remote Switch + + + + + + + Choose the LED indicator color for the upper paddle remote controle triggers + + + + + + + + + + Choose the LED indicator color for the lower paddle remote control triggers + + + + + + + + + +``` For Zooz switches, you'll need to update (or possibly add) the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: ```xml @@ -791,6 +823,46 @@ Held on|2|7800 Released off|1|7740 Released on|2|7740 +The Zooz ZEN34 Remote Switch has shown inverted `scene_id` values compared to other Zooz switches as well as different `scene_data` values depending on production run: + +Recent production runs have appeared with: + +**Action**|**scene\_id**|**scene\_data** +:-----:|:-----:|:-----: +1x tap on|1|7680 +1x tap off|2|7680 +2x tap on|1|7860 +2x tap off|2|7860 +3x tap on|1|7920 +3x tap off|2|7920 +4x tap on|1|7980 +4x tap off|2|7980 +5x tap on|1|8040 +5x tap off|2|8040 +Held on|1|7800 +Held off|2|7800 +Released on|1|7740 +Released off|2|7740 + +Early production runs have appeared with: + +**Action**|**scene\_id**|**scene\_data** +:-----:|:-----:|:-----: +1x tap on|1|0 +1x tap off|2|0 +2x tap on|1|3 +2x tap off|2|3 +3x tap on|1|4 +3x tap off|2|4 +4x tap on|1|5 +4x tap off|2|5 +5x tap on|1|6 +5x tap off|2|6 +Held on|1|2 +Held off|2|2 +Released on|1|1 +Released off|2|1 + ### HomeSeer Switches For the HomeSeer devices specifically, you may need to update the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: @@ -1081,7 +1153,7 @@ Let's see how this works in an automation for a Scene Master that's assigned as ```yaml - id: "1234567890" - alias: Double-press Button 2 to toggle all lights + alias: "Double-press Button 2 to toggle all lights" trigger: - platform: event event_type: zwave.scene_activated @@ -1093,7 +1165,8 @@ Let's see how this works in an automation for a Scene Master that's assigned as action: - data: service: light.toggle - entity_id: group.all_lights + target: + entity_id: group.all_lights ``` ### RFWDC Cooper 5-button Scene Control Keypad @@ -1130,7 +1203,7 @@ Here is an example configuration needed for the scene controller: ```yaml automation: - - alias: Sync the indicator value on button events + - alias: "Sync the indicator value on button events" trigger: - platform: event event_type: zwave.scene_activated @@ -1320,7 +1393,7 @@ Button four release|4|7740 Example Event: ```yaml -- alias: MatrixButton2 +- alias: "MatrixButton2" trigger: - event_type: zwave.scene_activated platform: event @@ -1330,7 +1403,8 @@ Example Event: scene_data: 7680 action: - service: switch.toggle - entity_id: switch.office_fan + target: + entity_id: switch.office_fan ``` ### Zooz S2 MultiRelay (Zen16) @@ -1522,7 +1596,7 @@ Button two triple tap|2|4 Example Event: ```yaml -- alias: JascoButton1 +- alias: "JascoButton1" trigger: - event_type: zwave.scene_activated platform: event @@ -1532,7 +1606,8 @@ Example Event: scene_data: 0 action: - service: switch.toggle - entity_id: switch.office_fan + target: + entity_id: switch.office_fan ``` ### EATON On/Off & Dimmer (RF9501/RF9540-N/RF9640-N/RF9601-N) diff --git a/source/_docs/z-wave/events.markdown b/source/_docs/z-wave/events.markdown index 2568854a801..4ce3284e6fc 100644 --- a/source/_docs/z-wave/events.markdown +++ b/source/_docs/z-wave/events.markdown @@ -8,7 +8,7 @@ description: "Events generated by the Z-Wave component." Home Assistant will trigger an event when the Z-Wave network is complete, meaning all of the nodes on the network have been queried. This can take quite some time, depending on wakeup intervals on the battery-powered devices on the network. ```yaml - - alias: Z-Wave network is complete + - alias: "Z-Wave network is complete" trigger: platform: event event_type: zwave.network_complete @@ -19,7 +19,7 @@ Home Assistant will trigger an event when the Z-Wave network is complete, meanin Home Assistant will trigger an event when the Z-Wave network is complete, but some nodes are marked dead, meaning all of the nodes on the network have been queried. This can take quite some time, depending on wakeup intervals on the battery-powered devices on the network. ```yaml - - alias: Z-Wave network is complete some dead + - alias: "Z-Wave network is complete some dead" trigger: platform: event event_type: zwave.network_complete_some_dead @@ -30,7 +30,7 @@ Home Assistant will trigger an event when the Z-Wave network is complete, but so Home Assistant will trigger an event when the Z-Wave network is ready for use. Between `zwave.network_start` and `zwave.network_ready` Home Assistant will feel sluggish when trying to send commands to Z-Wave nodes. This is because the controller is requesting information from all of the nodes on the network. When this is triggered, all awake nodes have been queried and sleeping nodes will be queried when they awake. ```yaml - - alias: Z-Wave network is ready + - alias: "Z-Wave network is ready" trigger: platform: event event_type: zwave.network_ready @@ -41,7 +41,7 @@ Home Assistant will trigger an event when the Z-Wave network is ready for use. B Home Assistant will trigger an event when the Z-Wave network is set up to be started. ```yaml - - alias: Z-Wave network is starting + - alias: "Z-Wave network is starting" trigger: platform: event event_type: zwave.network_start @@ -52,7 +52,7 @@ Home Assistant will trigger an event when the Z-Wave network is set up to be sta Home Assistant will trigger an event when the Z-Wave network is stopping. ```yaml - - alias: Z-Wave network is stopping + - alias: "Z-Wave network is stopping" trigger: platform: event event_type: zwave.network_stop @@ -64,7 +64,7 @@ Home Assistant will trigger an event when command_class_basic changes value on a Example: ```yaml - - alias: Minimote Button Pressed + - alias: "Minimote Button Pressed" trigger: platform: event event_type: zwave.node_event @@ -82,7 +82,7 @@ Some devices can also trigger scene activation events, which can be used in auto ```yaml # Example configuration.yaml automation entry automation: - - alias: Turn on Desk light + - alias: "Turn on Desk light" trigger: platform: event event_type: zwave.scene_activated diff --git a/source/_faq/404.markdown b/source/_faq/404.markdown new file mode 100644 index 00000000000..9d141de0354 --- /dev/null +++ b/source/_faq/404.markdown @@ -0,0 +1,13 @@ +--- +title: "404 Client Error: Not Found ('no such image: homeassistant/...)" +ha_category: Home Assistant +--- + +This error indicates the image, whether for updating to Home Assistant or installing or updating an add-on, was not able to be pulled to your system. This is usually a situation where there is not enough space for the image to be downloaded. The first thing to check for is the available space on your system. + +Please note, if you are running the operating system as a virtual machine; the default VM image is only about 6GB. Many VM users run into this as they have not allocated enough storage. 32GB is the minimum recommended size. + +You will need to explore your own system to determine where space has gone. +Using `df -h` in the SSH add-on console to you can quickly check to see if you have space available. + +If there is plenty of space available then you might check to see if you are having network issues that are preventing images from being downloaded. \ No newline at end of file diff --git a/source/_faq/addon_not_starting.markdown b/source/_faq/addon_not_starting.markdown new file mode 100644 index 00000000000..296490979c1 --- /dev/null +++ b/source/_faq/addon_not_starting.markdown @@ -0,0 +1,8 @@ +--- +title: "Why does the start button for an add-on flash red when I click it?" +ha_category: Home Assistant +--- + +If you are looking for more information about add-ons, which won't start or install, navigate to Supervisor > System in the UI and check the logs. + +The logs on this page are the same you would see using `ha logs` in the custom CLI. diff --git a/source/_faq/rpi4_8gb.markdown b/source/_faq/rpi4_8gb.markdown new file mode 100644 index 00000000000..1be74dc1bf4 --- /dev/null +++ b/source/_faq/rpi4_8gb.markdown @@ -0,0 +1,6 @@ +--- +title: "Is the Raspberry Pi 4 with 8GB RAM supported?" +ha_category: Home Assistant +--- + +The Raspberry Pi 4 with 8GB RAM is supported with Home Assistant OS 5.5 and later using the 32-bit and 64-bit image. The 64-bit is the better tested option at this point. \ No newline at end of file diff --git a/source/_faq/sdcard_files.markdown b/source/_faq/sdcard_files.markdown new file mode 100644 index 00000000000..6004145dc7f --- /dev/null +++ b/source/_faq/sdcard_files.markdown @@ -0,0 +1,9 @@ +--- +title: "I'm trying to find my files on the host or SD card. Where are they?" +ha_category: Home Assistant +--- + +On a Home Assistant OS install, your files are on the data partition within `/mnt/data/supervisor/`. +On the SD itself, this is an EXT4 partition labeled `hassos-data`. + +On a Supervised install, they are in `/usr/share/hassio/`. \ No newline at end of file diff --git a/source/_faq/unique_id.markdown b/source/_faq/unique_id.markdown index 954f1e8c2ed..346000177c2 100644 --- a/source/_faq/unique_id.markdown +++ b/source/_faq/unique_id.markdown @@ -36,4 +36,4 @@ Typically, you'll see this when you create entities manually using YAML, but it If your user profile has the "Advanced Mode" activated, you will also see the second paragraph in the popup with a link to the [customization user interface](/docs/configuration/customizing-devices/#customization-using-the-ui) for this specific entity, which offers some customization options. -In case you want to read more about unique IDs, head over to this [developer documentation page](/docs/entity_registry_index/). +In case you want to read more about unique IDs, head over to this [developer documentation page](https://developers.home-assistant.io/docs/entity_registry_index/). diff --git a/source/_faq/usb_boot.markdown b/source/_faq/usb_boot.markdown new file mode 100644 index 00000000000..9b7dc3f364f --- /dev/null +++ b/source/_faq/usb_boot.markdown @@ -0,0 +1,8 @@ +--- +title: "Is USB Boot for the Raspberry Pi 4 supported?" +ha_category: Home Assistant +--- + +Due to the complexity of USB and the USB mass storage device class booting from a USB device is brittle. Since booting from a USB drive this process has to be done multiple times (firmware/boot loader and the operating system), there is a high chance that this process doesn't complete in one of these stages. In general, the Linux USB stack is solid. Due to this, it is recommended to boot Home Assistant OS from an SD card and use a USB attached flash drive as data partition only. The `datactl` command, available on the OS shell, allows moving of the data partition. + +That said, booting Home Assistant OS completely from a USB drive (SSD or any other USB mass storage device) works with *some* USB devices. USB Devices that are known to work with Raspberry Pi OS (check the Raspberry Pi Forum) are more likely to work with Home Assistant OS. However, because Home Assistant OS has also U-Boot in the boot chain, there are devices which are known to work with Raspberry Pi OS but do *not* work with Home Assistant OS. \ No newline at end of file diff --git a/source/_faq/usb_config.markdown b/source/_faq/usb_config.markdown new file mode 100644 index 00000000000..a3d100a6d77 --- /dev/null +++ b/source/_faq/usb_config.markdown @@ -0,0 +1,6 @@ +--- +title: "Do I need to leave the USB stick connected for Wi-Fi?" +ha_category: Home Assistant +--- + +No. The USB "CONFIG" stick is only used to import a network profile to `/etc/NetworkManager/system-connections/` and can be removed. \ No newline at end of file diff --git a/source/_includes/asides/common_tasks_navigation.html b/source/_includes/asides/common_tasks_navigation.html new file mode 100644 index 00000000000..92eb027cb99 --- /dev/null +++ b/source/_includes/asides/common_tasks_navigation.html @@ -0,0 +1,11 @@ +
+
+

Common Tasks

+ +
+
diff --git a/source/_includes/asides/component_navigation.html b/source/_includes/asides/component_navigation.html index a5e54266097..01975079f1e 100644 --- a/source/_includes/asides/component_navigation.html +++ b/source/_includes/asides/component_navigation.html @@ -67,11 +67,6 @@
{%- endif -%} - {%- unless page.no_toc -%} -
-

On this page

- {% toc %} - {%- endunless -%} diff --git a/source/_includes/asides/docs_navigation.html b/source/_includes/asides/docs_navigation.html index f70674aa17c..632e1dd4461 100644 --- a/source/_includes/asides/docs_navigation.html +++ b/source/_includes/asides/docs_navigation.html @@ -8,12 +8,12 @@ {% active_link /docs/glossary/ Glossary %}
  • - {% active_link /docs/installation/ Installation %} + {% active_link /getting-started Getting Started %} @@ -145,7 +145,6 @@
  • {% active_link /docs/tools/dev-tools/ Developer Tools %}
  • {% active_link /docs/tools/quick-bar/ Quick Bar %}
  • {% active_link /docs/tools/hass/ hass %}
  • -
  • {% active_link /docs/tools/benchmark/ benchmark %}
  • {% active_link /docs/tools/check_config/ check_config %}
  • {% active_link /docs/tools/credstash/ credstash %}
  • {% active_link /docs/tools/keyring/ keyring %}
  • diff --git a/source/_includes/asides/getting_started_navigation.html b/source/_includes/asides/getting_started_navigation.html index 32653342fad..2d70544e2df 100644 --- a/source/_includes/asides/getting_started_navigation.html +++ b/source/_includes/asides/getting_started_navigation.html @@ -2,7 +2,7 @@

    Getting Started