HomeAssistantApiClient.Types (HomeAssistantApiClient v0.1.0)

View Source

Shared types used across HomeAssistantApiClient, such as entity types and states.

Summary

Types

This types are for the state of this entity types Binary sensor: Use boolean true = "on" and false = "off". Input boolean: Use boolean. Switch: boolean: Boolean too because it can either be true or false. Automation: The state is a boolean because it either has on or off. Light: Boolean because the state has either on or off. Remote state: Remote control who either has on or off, thats why its a boolean. Input number state: Integer number. Timer: The states it has are either idle, active or paused. Cover: Open, closed, opening, closed, unavailable or unknown.

Types

alarm_control_panel_state()

@type alarm_control_panel_state() :: atom()

alarm_password_services()

@type alarm_password_services() ::
  :alarm_disarm
  | :alarm_arm_home
  | :alarm_arm_away
  | :alarm_arm_night
  | :alarm_arm_custom_bypass

alarm_state()

@type alarm_state() ::
  :disarmed
  | :arming
  | :arming_home
  | :arming_away
  | :arming_night
  | :arming_custom_bypass
  | :armed_home
  | :armed_away
  | :armed_night
  | :armed_vacation
  | :armed_custom_bypass
  | :triggered
  | :pending
  | :unknown
  | :unavailable

automation_state()

@type automation_state() :: boolean()

basic_service()

@type basic_service() :: :turn_on | :turn_off | :toggle

binary_sensor_state()

@type binary_sensor_state() :: boolean()

cover()

@type cover() :: :opening | :closing | :unavaible | :unknown | :open | :closed

domain_with_extra_args()

@type domain_with_extra_args() :: :weather | :mqtt | :input_text | :input_select

domain_without_extra_values()

@type domain_without_extra_values() ::
  :input_boolean
  | :input_number
  | :automation
  | :scene
  | :script
  | :homeassistant
  | :input_select

entity_id()

@type entity_id() :: String.t()

This types are for the state of this entity types Binary sensor: Use boolean true = "on" and false = "off". Input boolean: Use boolean. Switch: boolean: Boolean too because it can either be true or false. Automation: The state is a boolean because it either has on or off. Light: Boolean because the state has either on or off. Remote state: Remote control who either has on or off, thats why its a boolean. Input number state: Integer number. Timer: The states it has are either idle, active or paused. Cover: Open, closed, opening, closed, unavailable or unknown.

entity_ids()

@type entity_ids() :: entity_id() | [entity_id()]

entity_type()

@type entity_type() ::
  :conversation
  | :event
  | :sensor
  | :binary_sensor
  | :switch
  | :light
  | :tts
  | :zone
  | :person
  | :input_number
  | :input_select
  | :input_boolean
  | :alarm_control_panel
  | :input_text
  | :sun
  | :todo
  | :automation
  | :weather
  | :mqtt
  | :remote

home_assistant_services()

@type home_assistant_services() :: :restart | :stop

input_boolean_state()

@type input_boolean_state() :: boolean()

input_number_services()

@type input_number_services() :: :decrement | :increment | :reload | :set_value

input_number_state()

@type input_number_state() :: integer() | float()

input_select_services()

@type input_select_services() ::
  :select_option | :set_options | :select_first | :select_last | :reload

input_select_state()

@type input_select_state() :: atom()

input_text_services()

@type input_text_services() :: :set_value | :reload

input_text_state()

@type input_text_state() :: String.t() | number()

light_services()

@type light_services() :: :turn_on | :turn_off | :toggle

light_state()

@type light_state() :: boolean()

mqtt_services()

@type mqtt_services() :: :dump | :publish | :reload

person_state()

@type person_state() :: String.t() | atom()

remote_state()

@type remote_state() :: boolean()

sensor_state()

@type sensor_state() :: atom() | String.t() | number()

service()

@type service() :: atom()

sun_state()

@type sun_state() :: atom()

switch_services()

@type switch_services() :: :turn_on | :turn_off | :toggle

switch_state()

@type switch_state() :: boolean()

timer()

@type timer() :: :idle | :active | :paused

todo_state()

@type todo_state() :: integer()

tts_state()

@type tts_state() :: atom() | String.t()

weather()

@type weather() :: String.t()

weather_services()

@type weather_services() :: :get_forecasts

zone_state()

@type zone_state() :: String.t() | number()