diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3b14fa350b9..cbec4dd560d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,7 +10,7 @@ ## Type of change diff --git a/CODEOWNERS b/CODEOWNERS index 81f5c90ef38..c03eef60b5d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -237,7 +237,6 @@ source/_integrations/openuv.markdown @bachya source/_integrations/openweathermap.markdown @fabaff source/_integrations/orangepi_gpio.markdown @pascallj source/_integrations/oru.markdown @bvlaicu -source/_integrations/owlet.markdown @oblogic7 source/_integrations/panel_custom.markdown @home-assistant/frontend source/_integrations/panel_iframe.markdown @home-assistant/frontend source/_integrations/pcal9535a.markdown @Shulyaka diff --git a/_config.yml b/_config.yml index cca4f990d00..87aff5aacea 100644 --- a/_config.yml +++ b/_config.yml @@ -100,9 +100,9 @@ social: # Home Assistant release details current_major_version: 0 -current_minor_version: 104 -current_patch_version: 3 -date_released: 2020-01-21 +current_minor_version: 105 +current_patch_version: 0 +date_released: 2020-02-05 # Either # or the anchor link to latest release notes in the blog post. # Must be prefixed with a # and have double quotes around it. diff --git a/source/_docs/automation/examples.markdown b/source/_docs/automation/examples.markdown index c27aeeb0286..820ea637c34 100644 --- a/source/_docs/automation/examples.markdown +++ b/source/_docs/automation/examples.markdown @@ -63,7 +63,6 @@ automation: # Send a notification via Pushover with the event of a Xiaomi cube. Custom event from the Xiaomi component. - alias: 'Xiaomi Cube Action' - hide_entity: false initial_state: false trigger: platform: event diff --git a/source/_docs/configuration/group_visibility.markdown b/source/_docs/configuration/group_visibility.markdown deleted file mode 100644 index e42969e4517..00000000000 --- a/source/_docs/configuration/group_visibility.markdown +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: "Group Visibility" -description: "Instructions on how to change group visibility using automations." -redirect_from: /topics/group_visibility/ ---- - -After filling Home Assistant with all your precious home automation devices, you usually end up with a cluttered interface and lots of groups that are not interesting in your current context. What if you just want to show groups that are interesting _now_ and hide the rest? That's when group visibility comes to play. - -## Changing visibility of a group - -To change visibility of a group, use the service `group.set_visibility`, pass the group name as `entity_id` and use `visible` to decide whether the group should be shown or hidden. - -```yaml -service: group.set_visibility -entity_id: group.basement -data: - visible: false -``` - -
-If a sensor belongs to only one group and that group is hidden, the sensor will "jump" to the top of the web interface. Add the sensor to an additional (visible) group if you do not want this to happen. -
- -## Automations - -First you should decide under which circumstances a group should be visible or not. Depending on the complexity, you might have to write two automations: one that hides the group and another that shows it. - -In this example, the group `group.basement` is hidden when the sun sets and shown again when it rises: - -```yaml -automation: - trigger: - platform: sun - event: sunset - action: - service: group.set_visibility - entity_id: group.basement - data: - visible: false - -automation 2: - trigger: - platform: sun - event: sunrise - action: - service: group.set_visibility - entity_id: group.basement - data: - visible: true -``` - -## Easier automations - -One of the most common uses cases are to show groups during certain times of day, maybe commuting information during a work day morning or light switches when it is getting dark. The complexity of automations needed to make this happen will quickly get out of hand. So, one way to make the automations easier is to create a sensor that alters its state depending on time of day. One way of doing that is using a `command_line` sensor and a script: - -```python -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -from datetime import time, datetime - - -def mk_occasion(name, start, end, days=None): - s = start.split(":") - e = end.split(":") - return { - "name": name, - "start": time(int(s[0]), int(s[1]), int(s[2])), - "end": time(int(e[0]), int(e[1]), int(e[2])), - "days": days, - } - - -# Matching is done from top to bottom -OCCASIONS = [ - # More specific occasions - mk_occasion("work_morning", "06:00:00", "07:10:00", range(5)), - # General matching - mk_occasion("weekday", "00:00:00", "23:59:59", range(5)), - mk_occasion("weekend", "00:00:00", "23:59:59", [5, 6]), -] - - -def get_current_occasion(occasion_list, default_occasion="normal"): - now = datetime.now() - for occasion in OCCASIONS: - if occasion["start"] <= now.time() <= occasion["end"] and ( - occasion["days"] is None or now.weekday() in occasion["days"] - ): - return occasion["name"] - return default_occasion - - -if __name__ == "__main__": - print(get_current_occasion(OCCASIONS)) -``` - -This script will output "work_morning" from 06:00-07:10 during weekdays (Monday-Friday), "weekday" during all other time from Monday-Friday and "weekend" on Saturdays and Sundays. Adjust according to your needs. To create the sensor, just add it like this: - -```yaml -sensor: - - platform: command_line - name: Occasion - command: "python3 occasion.py" -``` -
-If you are using docker to run Home Assistant then the occasion.py script will be placed under /config. Your command should instead be: command: "python3 /config/occasion.py" -
- - -To simplify things, we create a Home Assistant script that changes the visibility of a group, but also verifies that an entity is in a specific state: - -```yaml -script: - group_visibility: - sequence: - - service: group.set_visibility - data_template: - entity_id: '{% raw %}{{ entity_id }}{% endraw %}' - visible: '{% raw %}{{ is_state(cond, visible_state) }}{% endraw %}' -``` - -The last part is writing an automation that hides or shows the group: - -```yaml -automation: - - alias: Work morning - trigger: - - platform: state - entity_id: sensor.occasion - - platform: homeassistant - event: start - action: - service: script.group_visibility - data: - entity_id: group.work_sensors - cond: sensor.occasion - visible_state: 'work_morning' -``` - -Our previously defined script will be called if `sensor.occasion` changes state OR when Home Assistant has started. The group `group.work_sensors` will be shown when `sensor.occasion` changes state to "work_morning" and hidden otherwise. - -### The complete example - -```yaml -group: - default_view: - entities: - - group.work_sensors - - # Only visible when it's time to go to work - work_sensors: - name: Time to go to work - entities: - - sensor.something1 - - sensor.something2 - -sensor: - - platform: command_line - name: Occasion - command: "python3 occasion.py" - -script: - group_visibility: - sequence: - - service: group.set_visibility - data_template: - entity_id: '{% raw %}{{ entity_id }}{% endraw %}' - visible: '{% raw %}{{ is_state(cond, visible_state) }}{% endraw %}' - -automation: - - alias: Work morning - trigger: - - platform: state - entity_id: sensor.occasion - - platform: homeassistant - event: start - action: - service: script.group_visibility - data: - entity_id: group.work_sensors - cond: sensor.occasion - visible_state: 'work_morning' -``` diff --git a/source/_docs/mqtt/service.markdown b/source/_docs/mqtt/service.markdown index 5ad15fa9dbf..218a5a8ec1d 100644 --- a/source/_docs/mqtt/service.markdown +++ b/source/_docs/mqtt/service.markdown @@ -37,7 +37,7 @@ payload_template: {{ states('device_tracker.paulus') }} ```yaml topic: home-assistant/light/1/state payload: "{\"Status\":\"off\", \"Data\":\"something\"}" -``` +``` Example of how to use `qos` and `retain`: @@ -47,3 +47,16 @@ payload: on qos: 2 retain: true ``` + +### Service `mqtt.dump` + +Listen to the specified topic matcher and dumps all received messages within a specific duration into the file `mqtt_dump.txt` in your config folder. This is useful when debugging a problem. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `topic` | no | Topic to dump. Can contain a wildcard (`#` or `+`). +| `duration` | no | Duration in seconds that we will listen for messages. Default is 5 seconds. + +```yaml +topic: openzwave/# +``` diff --git a/source/_includes/asides/docs_navigation.html b/source/_includes/asides/docs_navigation.html index 5cd250206f8..a09f631f603 100644 --- a/source/_includes/asides/docs_navigation.html +++ b/source/_includes/asides/docs_navigation.html @@ -54,10 +54,6 @@ {% active_link /docs/configuration/secrets/ Storing Secrets %}
  • {% active_link /docs/configuration/templating/ Templating %}
  • -
  • - {% active_link /docs/configuration/group_visibility/ Group - Visibility %} -
  • {% active_link /docs/configuration/platform_options/ Entity component platform options %} diff --git a/source/_includes/asides/lovelace_navigation.html b/source/_includes/asides/lovelace_navigation.html index 8f9a1cd3b10..705cd522a49 100644 --- a/source/_includes/asides/lovelace_navigation.html +++ b/source/_includes/asides/lovelace_navigation.html @@ -14,6 +14,7 @@

    Advanced