Franck Nijhof 6ca14d3efc
Rename 'service' to 'action' in automations and scripts (#34023)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2024-07-31 14:37:02 +02:00

2.1 KiB

title, description, ha_category, ha_release, ha_quality_scale, ha_codeowners, ha_domain, ha_integration_type, related
title description ha_category ha_release ha_quality_scale ha_codeowners ha_domain ha_integration_type related
Valve Instructions on how to integrate valves into Home Assistant.
Valve
2024.1 internal
@home-assistant/core
valve entity
docs title
/docs/configuration/customizing-devices/ Customizing devices
docs title
/dashboards/ Dashboard

The valve entity in Home Assistant provides an interface to control valves such as water, gas, or air valves.

{% include integrations/building_block_integration.md %}

Device class

{% include integrations/device_class_intro.md %}

The following device classes are supported for valves:

  • None: Generic valve. This is the default and doesn't need to be set.
  • water: Valve that controls the flow of water through a system.
  • gas: Valve that controls the flow of gas through a system.

Actions

Valve control actions

All valves respond to valve.open, valve.close, and valve.toggle. Valves that allow setting a specific position may also be controlled with valve.set_position and valve.stop.

Data attribute Optional Description
entity_id yes String or list of strings that point at entity_id's of valves. Use entity_id: all to target all.

Automation example

automation:
  trigger:
    platform: time
    at: "07:15:00"
  action:
    - action: valve.close
      target:
        entity_id: valve.demo

Action valve.set_position

Set the position of one or multiple valves if they support setting a specific position.

Data attribute Optional Description
entity_id yes String or list of strings that point at entity_id's of valves. Use entity_id: all to target all.
position no Integer between 0 (fully closed) and 100 (fully open).

Automation example

automation:
  trigger:
    platform: time
    at: "07:15:00"
  action:
    - action: valve.set_position
      target:
        entity_id: valve.demo
      data:
        position: 50