Fan
The Fan integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to control and monitor fan devices.
Building block integration
This fan is a building block integration that cannot be added to your Home Assistant directly but is used and provided by other integrations.
A building block integration differs from the typical integration that connects to a device or service. Instead, other integrations that do integrate a device or service into Home Assistant use this fan building block to provide entities, services, and other functionality that you can use in your automations or dashboards.
If one of your integrations features this building block, this page documents the functionality the fan building block offers.
The state of a fan entity
The state of a fan entity can be either On or Off.
In addition, the entity can have the following states:
- Unavailable: The entity is currently unavailable.
- Unknown: The state is not yet known.
Supported functionality
The Fan integration provides fan entities with these common features:
- Turning a fan on and off.
- Setting the speed as a percentage.
- Setting a preset mode.
- Turning oscillation on or off.
- Changing the rotation direction.
- Increasing or decreasing the speed in steps.
Not every fan supports every action. The actions available for a specific fan depend on the features exposed by that device.
List of triggers
The Fan integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following triggers. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.
-
Fan turned off (
fan.turned_off) Triggers after one or more fans turn off. -
Fan turned on (
fan.turned_on) Triggers after one or more fans turn on.
For an overview of every trigger across all integrations, see the triggers reference.
List of conditions
The Fan integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following conditions. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.
-
Fan is off (
fan.is_off) Tests if one or more fans are off. -
Fan is on (
fan.is_on) Tests if one or more fans are on.
For an overview of every condition across all integrations, see the conditions reference.
List of actions
The Fan integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.
-
Decrease fan speed (
fan.decrease_speed) Decrease the speed of a fan. -
Increase fan speed (
fan.increase_speed) Increase the speed of a fan. -
Oscillate fan (
fan.oscillate) Control the oscillation of a fan. -
Set fan direction (
fan.set_direction) Set a fan’s rotation direction. -
Set fan speed (
fan.set_percentage) Set the speed of a fan. -
Set fan preset mode (
fan.set_preset_mode) Set the preset mode of a fan. -
Toggle fan (
fan.toggle) Toggle a fan on or off. -
Turn off fan (
fan.turn_off) Turn off a fan. -
Turn on fan (
fan.turn_on) Turn on a fan. Optionally set the speed or preset mode at the same time.
For an overview of every action across all integrations, see the actions reference.
Fan automation examples
Automation: Turn on the bedroom fan at bedtime
Start the bedroom fan automatically when you usually go to bed.
automation:
- alias: "Turn on bedroom fan at bedtime"
triggers:
- trigger: time
at: "22:00:00"
actions:
- action: fan.turn_on
target:
entity_id: fan.bedroom
Automation: Notify when the bathroom fan has been left on
If the bathroom fan has been running for a while, send a reminder to turn it off after the room has cleared.
automation:
- alias: "Bathroom fan reminder"
triggers:
- trigger: fan.turned_on
target:
entity_id: fan.bathroom
options:
behavior: any
for: "00:20:00"
actions:
- action: notify.mobile_app_phone
data:
message: "The bathroom fan has been on for 20 minutes."