Home Assistant Entity Types Reference
This document provides detailed information about common Home Assistant entity types, their states, attributes, and services.
Table of Contents
- Light
- Switch
- Climate
- Cover
- Lock
- Media Player
- Sensor
- Binary Sensor
- Camera
- Fan
- Alarm Control Panel
- Person
- Device Tracker
- Input Helpers
---
Light
Entity ID Pattern: light.*
States
on- Light is onoff- Light is offunavailable- Light is unreachable
Common Attributes
brightness(0-255) - Current brightness levelcolor_temp(int) - Color temperature in miredsrgb_color([r, g, b]) - RGB color values (0-255)xy_color([x, y]) - CIE 1931 color space coordinateshs_color([h, s]) - Hue (0-360) and saturation (0-100)effect(string) - Current light effectsupported_features(int) - Bitmask of supported featuresfriendly_name(string) - Display namesupported_color_modes(list) - Available color modescolor_mode(string) - Current color mode
Services
turn_on
{
"entity_id": "light.kitchen",
"brightness": 200,
"rgb_color": [255, 128, 0],
"transition": 2
}
Parameters:
entity_id- Target light(s)brightness(0-255) - Brightness levelbrightness_pct(0-100) - Brightness percentagergb_color- RGB valuescolor_temp- Color temperaturekelvin- Color temperature in Kelvinhs_color- Hue and saturationxy_color- XY colorcolor_name- Named color (e.g., "red", "blue")transition- Transition time in secondseffect- Light effect nameflash- Flash mode ("short" or "long")
turn_off
{
"entity_id": "light.kitchen",
"transition": 2
}
toggle
{
"entity_id": "light.kitchen"
}
---
Switch
Entity ID Pattern: switch.*
States
on- Switch is onoff- Switch is offunavailable- Switch is unreachable
Common Attributes
friendly_name(string) - Display nameicon(string) - Icon identifierassumed_state(bool) - Whether state is assumeddevice_class(string) - Type of switch (outlet, switch)
Services
turn_on, turn_off, toggle
{
"entity_id": "switch.coffee_maker"
}
---
Climate
Entity ID Pattern: climate.*
States
off- Climate device is offheat- Heating modecool- Cooling modeheat_cool- Auto heating/coolingauto- Automatic modedry- Dehumidification modefan_only- Fan only modeunavailable- Device is unreachable
Common Attributes
current_temperature(float) - Current temperaturetemperature(float) - Target temperaturetarget_temp_high(float) - High target for heat_cool modetarget_temp_low(float) - Low target for heat_cool modecurrent_humidity(float) - Current humidity percentagehumidity(float) - Target humidityfan_mode(string) - Current fan modefan_modes(list) - Available fan modeshvac_action(string) - Current action (heating, cooling, idle, off)hvac_modes(list) - Available HVAC modespreset_mode(string) - Current presetpreset_modes(list) - Available presetsswing_mode(string) - Current swing settingswing_modes(list) - Available swing modesmin_temp(float) - Minimum settable temperaturemax_temp(float) - Maximum settable temperature
Services
set_temperature
{
"entity_id": "climate.living_room",
"temperature": 22,
"target_temp_high": 24,
"target_temp_low": 20,
"hvac_mode": "heat_cool"
}
set_hvac_mode
{
"entity_id": "climate.living_room",
"hvac_mode": "heat"
}
set_preset_mode
{
"entity_id": "climate.living_room",
"preset_mode": "away"
}
set_fan_mode
{
"entity_id": "climate.living_room",
"fan_mode": "auto"
}
set_humidity
{
"entity_id": "climate.living_room",
"humidity": 50
}
---
Cover
Entity ID Pattern: cover.*
States
open- Cover is openopening- Cover is openingclosed- Cover is closedclosing- Cover is closingunavailable- Cover is unreachable
Common Attributes
current_position(0-100) - Current position percentagecurrent_tilt_position(0-100) - Current tilt percentagesupported_features(int) - Bitmask of featuresdevice_class(string) - Type (blind, curtain, damper, door, garage, gate, shade, shutter, window)
Services
open_cover, close_cover, stop_cover
{
"entity_id": "cover.garage_door"
}
set_cover_position
{
"entity_id": "cover.living_room_blinds",
"position": 50
}
set_cover_tilt_position
{
"entity_id": "cover.bedroom_blinds",
"tilt_position": 45
}
---
Lock
Entity ID Pattern: lock.*
States
locked- Lock is lockedunlocked- Lock is unlockedlocking- Lock is lockingunlocking- Lock is unlockingjammed- Lock is jammedunavailable- Lock is unreachable
Common Attributes
code_format(string) - Regular expression for valid codeschanged_by(string) - Who last changed the locklock_low_battery(bool) - Low battery indicator
Services
lock
{
"entity_id": "lock.front_door",
"code": "1234"
}
unlock
{
"entity_id": "lock.front_door",
"code": "1234"
}
open (for locks with latch)
{
"entity_id": "lock.smart_lock",
"code": "1234"
}
---
Media Player
Entity ID Pattern: media_player.*
States
off- Device is offon- Device is onplaying- Currently playingpaused- Playback pausedidle- Device is idlebuffering- Content is bufferingunavailable- Device is unreachable
Common Attributes
volume_level(0.0-1.0) - Current volumeis_volume_muted(bool) - Mute statusmedia_content_id(string) - Current media IDmedia_content_type(string) - Type of mediamedia_duration(int) - Total duration in secondsmedia_position(int) - Current position in secondsmedia_title(string) - Title of current mediamedia_artist(string) - Artist namemedia_album_name(string) - Album namemedia_album_art(string) - URL to album artsource(string) - Current input sourcesource_list(list) - Available input sourcessound_mode(string) - Current sound modesound_mode_list(list) - Available sound modesshuffle(bool) - Shuffle statusrepeat(string) - Repeat mode
Services
turn_on, turn_off, toggle
{
"entity_id": "media_player.living_room_tv"
}
play_media
{
"entity_id": "media_player.speaker",
"media_content_id": "https://example.com/music.mp3",
"media_content_type": "music"
}
media_play, media_pause, media_stop
{
"entity_id": "media_player.speaker"
}
media_next_track, media_previous_track
{
"entity_id": "media_player.speaker"
}
volume_set
{
"entity_id": "media_player.speaker",
"volume_level": 0.5
}
volume_mute
{
"entity_id": "media_player.speaker",
"is_volume_muted": true
}
select_source
{
"entity_id": "media_player.receiver",
"source": "HDMI 1"
}
---
Sensor
Entity ID Pattern: sensor.*
States
Varies by sensor type (numeric values, strings, etc.)
Common Attributes
unit_of_measurement(string) - Unit (°C, %, W, etc.)device_class(string) - Type of sensorfriendly_name(string) - Display nameicon(string) - Icon identifierstate_class(string) - measurement, total, total_increasing
Device Classes
temperature- Temperature sensorshumidity- Humidity sensorspressure- Pressure sensorsbattery- Battery levelpower- Power consumptionenergy- Energy consumptioncurrent- Electrical currentvoltage- Voltageilluminance- Light levelpm25- Particulate matter 2.5µmpm10- Particulate matter 10µmco2- CO2 concentrationtimestamp- Timestampmonetary- Money/costsignal_strength- Signal strength (dBm, %)
No Services
Sensors are read-only and have no controllable services.
---
Binary Sensor
Entity ID Pattern: binary_sensor.*
States
on- Sensor is triggered/detectedoff- Sensor is clear/not detectedunavailable- Sensor is unreachable
Common Attributes
device_class(string) - Type of binary sensorfriendly_name(string) - Display name
Device Classes
battery- Battery status (low/normal)battery_charging- Charging statuscold- Cold detectedconnectivity- Connected/disconnecteddoor- Door open/closedgarage_door- Garage door open/closedgas- Gas detectedheat- Heat detectedlight- Light detectedlock- Locked/unlockedmoisture- Moisture detectedmotion- Motion detectedmoving- Device movingoccupancy- Occupancy detectedopening- Opening detectedplug- Plugged in/unpluggedpower- Power on/offpresence- Presence detectedproblem- Problem detectedrunning- Running/not runningsafety- Unsafe/safesmoke- Smoke detectedsound- Sound detectedtamper- Tamperedupdate- Update availablevibration- Vibration detectedwindow- Window open/closed
No Services
Binary sensors are read-only.
---
Camera
Entity ID Pattern: camera.*
States
idle- Camera is idlerecording- Camera is recordingstreaming- Camera is streamingunavailable- Camera is unreachable
Common Attributes
access_token- Token for accessing camera streamentity_picture- URL to snapshotbrand- Camera brandmodel- Camera modelmotion_detection- Motion detection enabledfrontend_stream_type- Stream type (hls, web_rtc)
Services
enable_motion_detection, disable_motion_detection
{
"entity_id": "camera.front_door"
}
snapshot
{
"entity_id": "camera.front_door",
"filename": "/config/www/snapshots/front_door.jpg"
}
play_stream
{
"entity_id": "camera.front_door",
"media_player": "media_player.living_room_tv"
}
---
Fan
Entity ID Pattern: fan.*
States
on- Fan is onoff- Fan is offunavailable- Fan is unreachable
Common Attributes
percentage(0-100) - Fan speed percentagepreset_mode(string) - Current presetpreset_modes(list) - Available presetsoscillating(bool) - Oscillation statusdirection(string) - forward or reversesupported_features(int) - Bitmask of features
Services
turn_on
{
"entity_id": "fan.bedroom",
"percentage": 75,
"preset_mode": "auto"
}
turn_off
{
"entity_id": "fan.bedroom"
}
set_percentage
{
"entity_id": "fan.bedroom",
"percentage": 50
}
set_preset_mode
{
"entity_id": "fan.bedroom",
"preset_mode": "sleep"
}
oscillate
{
"entity_id": "fan.living_room",
"oscillating": true
}
set_direction
{
"entity_id": "fan.ceiling",
"direction": "reverse"
}
---
Alarm Control Panel
Entity ID Pattern: alarm_control_panel.*
States
disarmed- Alarm is disarmedarmed_home- Armed in home modearmed_away- Armed in away modearmed_night- Armed in night modearmed_vacation- Armed in vacation modearmed_custom_bypass- Armed with custom bypasspending- Pending state (arming/disarming)arming- Currently armingdisarming- Currently disarmingtriggered- Alarm has been triggered
Common Attributes
code_format(string) - Required code formatchanged_by(string) - User who made last changecode_arm_required(bool) - Code required to armsupported_features(int) - Bitmask of features
Services
alarm_disarm
{
"entity_id": "alarm_control_panel.home",
"code": "1234"
}
alarm_arm_home, alarm_arm_away, alarm_arm_night
{
"entity_id": "alarm_control_panel.home",
"code": "1234"
}
alarm_trigger
{
"entity_id": "alarm_control_panel.home"
}
---
Person
Entity ID Pattern: person.*
States
home- Person is homenot_home- Person is away<zone_name>- Person is in a named zoneunavailable- Location unknown
Common Attributes
source(string) - Entity providing locationlatitude(float) - Current latitudelongitude(float) - Current longitudegps_accuracy(int) - GPS accuracy in metersfriendly_name(string) - Person's nameentity_picture(string) - Profile picture URL
No Services
Person entities are managed through device trackers.
---
Device Tracker
Entity ID Pattern: device_tracker.*
States
home- Device is homenot_home- Device is away<zone_name>- Device is in a named zone
Common Attributes
source_type(string) - gps, router, bluetooth, etc.latitude(float) - Current latitudelongitude(float) - Current longitudegps_accuracy(int) - GPS accuracybattery(int) - Battery level percentage
Services
see (for some device trackers)
{
"dev_id": "my_phone",
"location_name": "home",
"gps": [51.5074, -0.1278],
"gps_accuracy": 50,
"battery": 85
}
---
Input Helpers
Input Boolean
Entity ID Pattern: input_boolean.*
States: on, off
Services: turn_on, turn_off, toggle
Input Number
Entity ID Pattern: input_number.*
States: Numeric value within min/max range
Services:
set_value- Set to specific valueincrement- Increase by stepdecrement- Decrease by step
Input Text
Entity ID Pattern: input_text.*
States: Text string
Services: set_value
Input Select
Entity ID Pattern: input_select.*
States: Currently selected option
Services:
select_option- Select specific optionselect_next- Select next option in listselect_previous- Select previous optionset_options- Update available options
Input Datetime
Entity ID Pattern: input_datetime.*
States: Date and/or time value
Services: set_datetime
---
Additional Resources
For the most up-to-date entity information:
- Check
GET /api/statesfor real-time entity data - Use
GET /api/servicesto discover all available services - Refer to Home Assistant documentation for integration-specific entities