home-assistant.io/source/_posts/2016-03-12-z-wave-pep257-templated-service-calls.markdown
2016-03-16 18:32:19 -07:00

3.2 KiB

layout, title, description, date, date_formatted, author, author_twitter, comments, categories
layout title description date date_formatted author author_twitter comments categories
post 0.15: Unforked Open Z-Wave, templated service calls, extended scene support and PEP257 compliance. Home Assistant 0.15 has arrived. 2016-03-12 10:55:00 -0800 March 12, 2016 Paulus Schoutsen balloob true Release-Notes

Two weeks has past so here is 0.15! We have been focussing a lot on quality. Making sure the system is more stable and reliable. I usually try to highlight one cool thing in the release notes but this release has 4 exciting announcements!

  • @fabaff has upgraded the codebase to follow the PEP257 documentation standard.
  • @partofthething has migrated us to use the main Python Open Z-Wave library instead of our forked version.
  • To make our automations more powerful, @persandstrom added the option to use templates to dynamically create service calls. This works for automation, Alexa, universal media player, template switch. Learn more.
  • @MartinHjelmare has upgraded our scene support to now support all built-in services and components.

Besides bug fixes, this release also brings:

# Example using templates for service and data in service call.
# Works for automation, Alexa, universal media player, template switch.
automation:
  - trigger:
      - platform: state
        entity_id: switch.bathroom
    action:
      service_template: >
        {% raw %}{% if is_state('switch.bathroom', 'on') %}
          switch.turn_on
        {% else %}
          switch.turn_off
        {% endif %}{% endraw %}
      data_template:
        entity_id: switch.{% raw %}{{ states('input_select.is') }}{% endraw %}

Breaking Changes

  • Media Player: Attributes to call service play_media has been renamed to media_content_type and media_content_id, to match the corresponding media player state attributes. This change affects automations, scripts and scenes.