Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2020-03-18 11:59:21 +01:00
commit 605e6b10ad
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
7 changed files with 117 additions and 58 deletions

View File

@ -19,7 +19,7 @@ So given the importance of Automation, what should Automation allow us to do? I
In my opinion, Home Assistant accomplishes the majority of these very well with a combination of Automations, Scripts and Templates, and its Restful API.
So why `AppDaemon`? AppDaemon is not meant to replace Home Assistant Automations and Scripts, rather complement them. For a lot of things, automations work well and can be very succinct. However, there is a class of more complex automations for which they become harder to use, and appdeamon then comes into its own. It brings quite a few things to the table:
So why `AppDaemon`? AppDaemon is not meant to replace Home Assistant Automations and Scripts, rather complement them. For a lot of things, automations work well and can be very succinct. However, there is a class of more complex automations for which they become harder to use, and AppDaemon then comes into its own. It brings quite a few things to the table:
- New paradigm - some problems require a procedural and/or iterative approach, and `AppDaemon` Apps are a much more natural fit for this. Recent enhancements to Home Assistant scripts and templates have made huge strides, but for the most complex scenarios, Apps can do things that Automations can't
- Ease of use - AppDaemon's API is full of helper functions that make programming as easy and natural as possible. The functions and their operation are as "Pythonic" as possible, experienced Python programmers should feel right at home.

View File

@ -80,6 +80,9 @@ Configuration variable names in the discovery payload may be abbreviated to cons
Supported abbreviations:
```txt
'act_t': 'action_topic',
'act_tpl': 'action_template',
'atype': 'automation_type',
'aux_cmd_t': 'aux_command_topic',
'aux_stat_tpl': 'aux_state_template',
'aux_stat_t': 'aux_state_topic',
@ -93,18 +96,23 @@ Supported abbreviations:
'bri_stat_t': 'brightness_state_topic',
'bri_tpl': 'brightness_template',
'bri_val_tpl': 'brightness_value_template',
'clr_temp_cmd_tpl': 'color_temp_command_template',
'bat_lev_t': 'battery_level_topic',
'bat_lev_tpl': 'battery_level_template',
'chrg_t': 'charging_topic',
'chrg_tpl': 'charging_template',
'clr_temp_cmd_t': 'color_temp_command_topic',
'clr_temp_stat_t': 'color_temp_state_topic',
'clr_temp_tpl': 'color_temp_template',
'clr_temp_val_tpl': 'color_temp_value_template',
'cln_t': 'cleaning_topic',
'cln_tpl': 'cleaning_template',
'cmd_off_tpl': 'command_off_template',
'cmd_on_tpl': 'command_on_template',
'cmd_t': 'command_topic',
'cmd_tpl': 'command_template',
'cod_arm_req': 'code_arm_required',
'cod_dis_req': 'code_disarm_required',
'curr_temp_t': 'current_temperature_topic',
'curr_temp_tpl': 'current_temperature_template',
'dev': 'device',
@ -116,6 +124,8 @@ Supported abbreviations:
'fanspd_t': 'fan_speed_topic',
'fanspd_tpl': 'fan_speed_template',
'fanspd_lst': 'fan_speed_list',
'flsh_tlng': 'flash_time_long',
'flsh_tsht': 'flash_time_short',
'fx_cmd_t': 'effect_command_topic',
'fx_list': 'effect_list',
'fx_stat_t': 'effect_state_topic',
@ -130,10 +140,14 @@ Supported abbreviations:
'hold_cmd_t': 'hold_command_topic',
'hold_stat_tpl': 'hold_state_template',
'hold_stat_t': 'hold_state_topic',
'hs_cmd_t': 'hs_command_topic',
'hs_stat_t': 'hs_state_topic',
'hs_val_tpl': 'hs_value_template',
'ic': 'icon',
'init': 'initial',
'json_attr': 'json_attributes',
'json_attr_t': 'json_attributes_topic',
'json_attr_tpl': 'json_attributes_template',
'max_temp': 'max_temp',
'min_temp': 'min_temp',
'mode_cmd_t': 'mode_command_topic',
@ -146,24 +160,41 @@ Supported abbreviations:
'osc_cmd_t': 'oscillation_command_topic',
'osc_stat_t': 'oscillation_state_topic',
'osc_val_tpl': 'oscillation_value_template',
'pl': 'payload',
'pl_arm_away': 'payload_arm_away',
'pl_arm_home': 'payload_arm_home',
'pl_arm_nite': 'payload_arm_night',
'pl_avail': 'payload_available',
'pl_cln_sp': 'payload_clean_spot',
'pl_cls': 'payload_close',
'pl_disarm': 'payload_disarm',
'pl_hi_spd': 'payload_high_speed',
'pl_home': 'payload_home',
'pl_lock': 'payload_lock',
'pl_loc': 'payload_locate',
'pl_lo_spd': 'payload_low_speed',
'pl_med_spd': 'payload_medium_speed',
'pl_not_avail': 'payload_not_available',
'pl_not_home': 'payload_not_home',
'pl_off': 'payload_off',
'pl_off_spd': 'payload_off_speed',
'pl_on': 'payload_on',
'pl_open': 'payload_open',
'pl_osc_off': 'payload_oscillation_off',
'pl_osc_on': 'payload_oscillation_on',
'pl_paus': 'payload_pause',
'pl_stop': 'payload_stop',
'pl_strt': 'payload_start',
'pl_stpa': 'payload_start_pause',
'pl_ret': 'payload_return_to_base',
'pl_toff': 'payload_turn_off',
'pl_ton': 'payload_turn_on',
'pl_unlk': 'payload_unlock',
'pos_clsd': 'position_closed',
'pos_open': 'position_open',
'pow_cmd_t': 'power_command_topic',
'pow_stat_t': 'power_state_topic',
'pow_stat_tpl': 'power_state_template',
'r_tpl': 'red_template',
'ret': 'retain',
'rgb_cmd_tpl': 'rgb_command_template',
@ -172,6 +203,7 @@ Supported abbreviations:
'rgb_val_tpl': 'rgb_value_template',
'send_cmd_t': 'send_command_topic',
'send_if_off': 'send_if_off',
'set_fan_spd_t': 'set_fan_speed_topic',
'set_pos_tpl': 'set_position_template',
'set_pos_t': 'set_position_topic',
'pos_t': 'position_topic',
@ -179,18 +211,30 @@ Supported abbreviations:
'spd_stat_t': 'speed_state_topic',
'spd_val_tpl': 'speed_value_template',
'spds': 'speeds',
'src_type': 'source_type',
'stat_clsd': 'state_closed',
'stat_closing': 'state_closing',
'stat_off': 'state_off',
'stat_on': 'state_on',
'stat_open': 'state_open',
'stat_opening': 'state_opening',
'stat_locked': 'state_locked',
'stat_unlocked': 'state_unlocked',
'stat_t': 'state_topic',
'stat_tpl': 'state_template',
'stat_val_tpl': 'state_value_template',
'stype': 'subtype',
'sup_feat': 'supported_features',
'swing_mode_cmd_t': 'swing_mode_command_topic',
'swing_mode_stat_tpl': 'swing_mode_state_template',
'swing_mode_stat_t': 'swing_mode_state_topic',
'temp_cmd_t': 'temperature_command_topic',
'temp_hi_cmd_t': 'temperature_high_command_topic',
'temp_hi_stat_tpl': 'temperature_high_state_template',
'temp_hi_stat_t': 'temperature_high_state_topic',
'temp_lo_cmd_t': 'temperature_low_command_topic',
'temp_lo_stat_tpl': 'temperature_low_state_template',
'temp_lo_stat_t': 'temperature_low_state_topic',
'temp_stat_tpl': 'temperature_state_template',
'temp_stat_t': 'temperature_state_topic',
'tilt_clsd_val': 'tilt_closed_value',
@ -199,8 +243,9 @@ Supported abbreviations:
'tilt_max': 'tilt_max',
'tilt_min': 'tilt_min',
'tilt_opnd_val': 'tilt_opened_value',
'tilt_status_opt': 'tilt_status_optimistic',
'tilt_opt': 'tilt_optimistic',
'tilt_status_t': 'tilt_status_topic',
'tilt_status_tpl': 'tilt_status_template',
't': 'topic',
'uniq_id': 'unique_id',
'unit_of_meas': 'unit_of_measurement',

View File

@ -235,7 +235,9 @@ condition:
```
Valid values for `weekday` are `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`.
Time condition windows can span across the midnight threshold. In the example above, the condition window is from 3pm to 2am.
Note that if only `before` key is used, the condition will be `true` *from midnight* until the specified time.
If only `after` key is used, the condition will be `true` from the specified time *until midnight*.
Time condition windows can span across the midnight threshold if **both** `after` and `before` keys are used. In the example above, the condition window is from 3pm to 2am.
<div class='note tip'>

View File

@ -1,7 +1,6 @@
---
title: DirecTV
description: Instructions on how to integrate DirecTV receivers into Home Assistant.
logo: directv.png
ha_category:
- Media Player
ha_release: 0.25

View File

@ -73,7 +73,7 @@ value_template:
description: The date and time the email was sent.
{% endconfiguration %}
## Example
## Example - keyword spotting
The following example shows the usage of the IMAP email content sensor to scan the subject of an email for text, in this case, an email from the APC SmartConnect service which tells whether the UPS is running on battery or not.
@ -98,3 +98,46 @@ sensor:
{% endraw %}
The same template structure can scan the date, body or sender for matching text before setting the state of the sensor.
## Example - extracting formatted text from an email using template sensors
This example shows how to extract numbers or other formatted data from an email to change the value of a template sensor to a value extracted from the email. In this example, we will be extracting energy use, cost, and billed amount from an email (from Georgia Power) and putting it into sensor values using a template sensor that runs against our IMAP email sensor already set up. A sample of the body of the email used is below:
```text
Yesterday's Energy Use: 76 kWh
Yesterday's estimated energy cost: $8
Monthly Energy use-to-date for 23 days: 1860 kWh
Monthly estimated energy cost-to-date for 23 days: $198
To view your account for details about your energy use, please click here.
```
Below is the template sensor which extracts the information from the body of the email in our IMAP email sensor (named sensor.energy_email) into 3 sensors for the energy use, daily cost, and billing cycle total.
{% raw %}
```yaml
sensor:
- platform: template
sensors:
previous_day_energy_use:
friendly_name: Previous Day Energy Use
unit_of_measurement: kWh
value_template: >
{{ state_attr('sensor.energy_email','body')
|regex_findall_index("\*Yesterday's Energy Use:\* ([0-9]+) kWh") }}
previous_day_cost:
friendly_name: Previous Day Cost
unit_of_measurement: $
value_template: >
{{ state_attr('sensor.energy_email', 'body')
|regex_findall_index("\*Yesterday's estimated energy cost:\* \$([0-9.]+)") }}
billing_cycle_total:
friendly_name: Billing Cycle Total
unit_of_measurement: $
value_template: >
{{ state_attr('sensor.energy_email', 'body')
|regex_findall_index("\ days:\* \$([0-9.]+)") }}
```
{% endraw %}
By making small changes to the regular expressions defined above, a similar structure can parse other types of data out of the body of other emails.

View File

@ -106,82 +106,59 @@ You can also install Home Assistant on a Linux operating system of choice, calle
Home Assistant Supervised, will still give you access to most features Home Assistant has to offer, including add-ons.
The packages you need to have available on your system needed to Home Assistant may vary.
### Supported systems and limitations
### Debian/Ubuntu
While Home Assistant Supervised can be run on practically any Linux systems,
the Home Assistant project limits support for this installation method.
- `apparmor-utils`
- `apt-transport-https`
- `avahi-daemon`
- `ca-certificates`
- `curl`
- `dbus`
- `jq`
- `socat`
- `software-properties-common`
Only the use of Debian or Ubuntu is supported. Other Linux-based system may work
but is not part of our testing and thus not supported.
Optional:
Furthermore, if you choose to run Home Assistant Supervised, the operating
system of your choosing (including Debian/Ubuntu) is **your** responsibility.
Both in terms of systems upgrade and system configuration.
- `network-manager`
Customizations to your custom operating system may interfere with Home Assistant.
For that reason, please be sure you have to knowledge to manage, configure and
maintain the operating system of your choosing.
<div class='note warning'>
Without the NetworkManager, you will be not able to control your host network setup over the UI. The `modemmanager` package will interfere with any Z-Wave or Zigbee stick and should be removed or disabled. Failure to do so will result in random failures of those integrations. For example, you can disable with `sudo systemctl disable ModemManager` and remove with `sudo apt-get purge modemmanager`
</div>
### Arch Linux
- `apparmor`
- `avahi`
- `ca-certificates`
- `curl`
- `dbus`
- `docker`
- `jq`
- `socat`
You also need to have Docker-CE installed. There are well-documented procedures for installing Docker on Ubuntu at [Docker.com](https://docs.docker.com/install/linux/docker-ce/ubuntu/), you can find installation steps for your Linux distribution in the menu on the left.
<div class='note warning'>
Some distributions, like Ubuntu, have a `docker.io` package available. Using that package will cause issues!
Be sure to install the official Docker-CE from the above-listed URL.
Docker is not always ready with a release when a new Ubuntu version is out. Check if your version of Ubuntu is supported by Docker [here](https://docs.docker.com/install/linux/docker-ce/ubuntu/).
</div>
When in doubt, we highly recommend using the regular installation of Home
Assistant as provided above. In that case, Home Assistant will manage and update
the Home Assistant Operating System for you.
### Preparation
To prepare your machine for the Home Assistant installation, run the following commands:
For Ubuntu:
If you run Ubuntu, first run this command:
```bash
add-apt-repository universe
sudo add-apt-repository universe
```
Debian/Ubuntu:
Next run the following commands (for both Debian and Ubuntu):
```bash
sudo -i
apt-get update
apt-get install -y software-properties-common apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
systemctl disable ModemManager
systemctl stop ModemManager
curl -fsSL get.docker.com | sh
```
### Installation of Home Assistant Supervised
The following script will then install Home Assistant on a variety of operating systems and machine types.
```bash
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s
```
Some installation types require flags to identify the computer type, for example, when using a Raspberry Pi 3, the flag `-- -m raspberrypi3` is required. The install script would then look like this:
Some installation types require flags to identify the computer type, for example, when using a Raspberry Pi 4, the flag `-- -m raspberrypi4` is required. The install script would then look like this:
```bash
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m raspberrypi3
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m raspberrypi4
```
#### Other machine types
@ -194,7 +171,7 @@ curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/mast
- `raspberrypi4`
- `raspberrypi4-64`
- `odroid-c2`
- `odroid-cu2`
- `odroid-n2`
- `odroid-xu`
- `tinker`
- `qemuarm`
@ -206,12 +183,6 @@ See the [hassio-installer](https://github.com/home-assistant/hassio-installer) G
If you can not find your machine type in the list, you should pick the `qemu` release. i.e., `qemux86-64` for a normal 64-bit Linux distribution, or `qemuarm-64` for most modern ARM-based target like Raspberry Pi clones, or TV boxes.
<div class='note'>
When you use this installation method, the core SSH add-on may not function correctly. If that happens, use the community SSH add-on. Some of the documentation might not work for your installation either.
</div>
A detailed guide about running Home Assistant as a virtual machine is available in the [blog][hassio-vm].
[balenaEtcher]: https://www.balena.io/etcher
[Virtual Appliance]: https://github.com/home-assistant/operating-system/blob/dev/Documentation/boards/ova.md
[hassos-network]: https://github.com/home-assistant/operating-system/blob/dev/Documentation/network.md
@ -235,5 +206,4 @@ A detailed guide about running Home Assistant as a virtual machine is available
[samba]: /addons/samba/
[ssh]: /addons/ssh/
[pi-power]: https://www.raspberrypi.org/help/faqs/#powerReqs
[hassio-vm]: /blog/2017/11/29/hassio-virtual-machine/
[configure]: /getting-started/configuration/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB