Home Assistant

class nirahmq.components.AlarmControlPanel[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(value: AlarmControlPanelState) None[source]
code: str | AlarmControlPanelCode
code_disarm_required: bool
command_callback: ComponentCallback[AlarmControlPanel]
command_template: str
command_topic: CommandTopic
core_armed_required: bool
core_trigger_required: bool
payload_arm_away: str
payload_arm_custom_bypass: str
payload_arm_home: str
payload_arm_night: str
payload_arm_vacation: str
payload_disarm: str
payload_trigger: str
platform: Annotated[Platform, Required]
retain: bool
state_topic: StateTopic
supported_features: list[AlarmControlPanelFeature]
value_template: str
class nirahmq.components.BinarySensor[source]

Bases: StatefulComponent, EntityBase

set_state(state: bool) None[source]
device_class: BinarySensorClass | None
expire_after: int
force_update: bool
off_delay: int
payload_off: str
payload_on: str
platform: Annotated[Platform, Required]
state_topic: StateTopic
value_template: str
class nirahmq.components.Button[source]

Bases: CallableComponent, EntityBase

command_callback: ComponentCallback[Button]
command_template: str
command_topic: CommandTopic
device_class: ButtonClass | None
payload_press: str
platform: Annotated[Platform, Required]
retain: bool
class nirahmq.components.Camera[source]

Bases: StatefulComponent, EntityBase

set_image(data: str | bytes | bytearray) None[source]
image_encoding: ImageEncoding
platform: Annotated[Platform, Required]
topic: StateTopic
class nirahmq.components.Cover[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_position(position: int) None[source]
set_state(state: CoverState) None[source]
set_tilt(tilt: int) None[source]
command_callback: ComponentCallback[Cover]
command_topic: CommandTopic
device_class: CoverClass | None
optimistic: bool
payload_close: str
payload_open: str
payload_stop: str
payload_stop_tilt: str
platform: Annotated[Platform, Required]
position_closed: int
position_open: int
position_template: str
position_topic: StateTopic
retain: bool
set_position_callback: ComponentCallback[Cover]
set_position_template: str
set_position_topic: CommandTopic
state_closed: str
state_closing: str
state_open: str
state_opening: str
state_stopped: str
state_topic: StateTopic
tilt_closed_value: int
tilt_command_callback: ComponentCallback[Cover]
tilt_command_template: str
tilt_command_topic: CommandTopic
tilt_max: int
tilt_min: int
tilt_opened_value: int
tilt_optimistic: bool
tilt_status_template: str
tilt_status_topic: StateTopic
value_template: str
class nirahmq.components.DeviceTracker[source]

Bases: StatefulComponent, BareEntityBase

set_state(state: bool) None[source]
payload_home: str
payload_not_home: str
payload_reset: str
platform: Annotated[Platform, Required]
source_type: DeviceTrackerSource
state_topic: StateTopic
value_template: str
class nirahmq.components.DeviceTrigger[source]

Bases: StatefulComponent, ComponentBase

trigger(payload: str) None[source]
automation_type: Annotated[str, Required]
payload: str
platform: Annotated[Platform, Required]
qos: QoS
subtype: DeviceTriggerSubtype | str
topic: StateTopic
type: DeviceTriggerType | str
value_template: str
class nirahmq.components.Event[source]

Bases: StatefulComponent, EntityBase

trigger(type_: str, attr: dict[str, Any] | None = None) None[source]
device_class: EventClass
event_types: list[str]
platform: Annotated[Platform, Required]
state_topic: StateTopic
value_template: str
class nirahmq.components.Fan[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_direction(direction: bool) None[source]
set_mode(mode: str) None[source]
set_oscillation(oscillation: bool) None[source]
set_percentage(percentage: int) None[source]
set_state(state: bool) None[source]
command_callback: ComponentCallback[Fan]
command_template: str
command_topic: CommandTopic
direction_command_callback: ComponentCallback[Fan]
direction_command_template: str
direction_command_topic: CommandTopic
direction_state_topic: StateTopic
direction_value_template: str
optimistic: bool
oscillation_command_callback: ComponentCallback[Fan]
oscillation_command_template: str
oscillation_command_topic: CommandTopic
oscillation_state_topic: StateTopic
oscillation_value_template: str
payload_off: str
payload_on: str
payload_oscillation_off: str
payload_oscillation_on: str
payload_reset_percentage: str
payload_reset_preset_mode: str
percentage_command_callback: ComponentCallback[Fan]
percentage_command_template: str
percentage_command_topic: CommandTopic
percentage_state_topic: StateTopic
percentage_value_template: str
platform: Annotated[Platform, Required]
preset_mode_command_callback: ComponentCallback[Fan]
preset_mode_command_template: str
preset_mode_command_topic: CommandTopic
preset_mode_state_topic: StateTopic
preset_mode_value_template: str
preset_modes: list[str]
retain: bool
speed_range_max: int
speed_range_min: int
state_topic: StateTopic
state_value_template: str
class nirahmq.components.HVAC[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_action(action: HVACAction) None[source]
set_current_humidity(humidity: float) None[source]
set_current_temperature(temperature: float) None[source]
set_fan_mode(mode: HVACFanMode | str) None[source]
set_high_temperature(temperature: float) None[source]
set_low_temperature(temperature: float) None[source]
set_mode(mode: HVACMode) None[source]
set_preset_mode(mode: HVACPresetMode | str) None[source]
set_swing_horizontal_mode(mode: str) None[source]
set_swing_mode(mode: str) None[source]
set_target_humidity(humidity: float) None[source]
set_target_temperature(temperature: float) None[source]
action_template: str
action_topic: StateTopic
current_humidity_template: str
current_humidity_topic: StateTopic
current_temperature_template: str
current_temperature_topic: StateTopic
fan_mode_command_callback: ComponentCallback[HVAC]
fan_mode_command_template: str
fan_mode_command_topic: CommandTopic
fan_mode_state_template: str
fan_mode_state_topic: StateTopic
fan_modes: list[HVACFanMode | str]
initial: float
max_humidity: float
max_temp: float
min_humidity: float
min_temp: float
mode_command_callback: ComponentCallback[HVAC]
mode_command_template: str
mode_command_topic: CommandTopic
mode_state_template: str
mode_state_topic: StateTopic
modes: list[HVACMode]
optimistic: bool
payload_off: str
payload_on: str
platform: Annotated[Platform, Required]
power_command_callback: ComponentCallback[HVAC]
power_command_template: str
power_command_topic: CommandTopic
precision: Precision
preset_mode_command_callback: ComponentCallback[HVAC]
preset_mode_command_template: str
preset_mode_command_topic: CommandTopic
preset_mode_state_topic: StateTopic
preset_mode_value_template: str
preset_modes: list[HVACPresetMode | str]
retain: bool
swing_horizontal_mode_command_callback: ComponentCallback[HVAC]
swing_horizontal_mode_command_template: str
swing_horizontal_mode_command_topic: CommandTopic
swing_horizontal_mode_state_template: str
swing_horizontal_mode_state_topic: StateTopic
swing_horizontal_modes: list[str]
swing_mode_command_callback: ComponentCallback[HVAC]
swing_mode_command_template: str
swing_mode_command_topic: CommandTopic
swing_mode_state_template: str
swing_mode_state_topic: StateTopic
swing_modes: list[str]
target_humidity_command_callback: ComponentCallback[HVAC]
target_humidity_command_template: str
target_humidity_command_topic: CommandTopic
target_humidity_state_template: str
target_humidity_state_topic: StateTopic
temp_step: float
temperature_command_callback: ComponentCallback[HVAC]
temperature_command_template: str
temperature_command_topic: CommandTopic
temperature_high_command_callback: ComponentCallback[HVAC]
temperature_high_command_template: str
temperature_high_command_topic: CommandTopic
temperature_high_state_template: str
temperature_high_state_topic: StateTopic
temperature_low_command_callback: ComponentCallback[HVAC]
temperature_low_command_template: str
temperature_low_command_topic: CommandTopic
temperature_low_state_template: str
temperature_low_state_topic: StateTopic
temperature_state_template: str
temperature_state_topic: StateTopic
temperature_unit: TemperatureUnit
value_template: str
class nirahmq.components.Humidifier[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_action(action: HumidifierAction) None[source]
set_current_humidity(humidity: float) None[source]
set_mode(mode: HumidifierMode | str) None[source]
set_state(state: bool) None[source]
set_target_humidity(humidity: float) None[source]
action_template: str
action_topic: StateTopic
command_callback: ComponentCallback[Humidifier]
command_template: str
command_topic: CommandTopic
current_humidity_template: str
current_humidity_topic: StateTopic
device_class: HumidifierClass | None
max_humidity: float
min_humidity: float
mode_command_callback: ComponentCallback[Humidifier]
mode_command_template: str
mode_command_topic: CommandTopic
mode_state_template: str
mode_state_topic: StateTopic
modes: list[HumidifierMode | str]
optimistic: bool
payload_off: str
payload_on: str
payload_reset_humidity: str
payload_reset_mode: str
platform: Annotated[Platform, Required]
retain: bool
state_topic: StateTopic
state_value_template: str
target_humidity_command_callback: ComponentCallback[Humidifier]
target_humidity_command_template: str
target_humidity_command_topic: CommandTopic
target_humidity_state_template: str
target_humidity_state_topic: StateTopic
class nirahmq.components.Image[source]

Bases: StatefulComponent, EntityBase

set_image(data: str | bytes | bytearray) None[source]
set_url(url: AnyUrl) None[source]
content_type: str
image_encoding: ImageEncoding
image_topic: StateTopic
platform: Annotated[Platform, Required]
url_template: str
url_topic: StateTopic
class nirahmq.components.LawnMower[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(state: LawnMowerState) None[source]
activity_state_topic: StateTopic
activity_value_template: str
dock_command_callback: ComponentCallback[LawnMower]
dock_command_template: str
dock_command_topic: CommandTopic
optimistic: bool
pause_command_callback: ComponentCallback[LawnMower]
pause_command_template: str
pause_command_topic: CommandTopic
platform: Annotated[Platform, Required]
retain: bool
start_mowing_command_callback: ComponentCallback[LawnMower]
start_mowing_command_topic: CommandTopic
start_mowing_template: str
class nirahmq.components.Light[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(state: bool, color_mode: LightColorMode | None = None, color: tuple[int | float, ...] | None = None, brightness: int | None = None, color_temp: int | None = None, effect: str | None = None) None[source]
brightness: bool
brightness_scale: int
color_temp_kelvin: bool
command_callback: ComponentCallback[Light]
command_topic: CommandTopic
effect: bool
effect_list: list[str] | str
flash_time_long: int
flash_time_short: int
max_kelvin: int
max_mireds: int
min_kelvin: int
min_mireds: int
optimistic: bool
platform: Annotated[Platform, Required]
retain: bool
schema_: Annotated[str, FieldInfo(annotation=NoneType, required=True, alias_priority=2, serialization_alias='schema'), Required]
state_topic: StateTopic
supported_color_modes: list[LightColorMode]
white_scale: int
class nirahmq.components.Lock[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(state: LockState) None[source]
code_format: str
command_callback: ComponentCallback[Lock]
command_template: str
command_topic: CommandTopic
optimistic: bool
payload_lock: str
payload_open: str
payload_reset: str
payload_unlock: str
platform: Annotated[Platform, Required]
retain: bool
state_jammed: str
state_locked: str
state_locking: str
state_topic: StateTopic
state_unlocked: str
state_unlocking: str
value_template: str
class nirahmq.components.Notify[source]

Bases: CallableComponent, EntityBase

command_callback: ComponentCallback[Notify]
command_template: str
command_topic: CommandTopic
platform: Annotated[Platform, Required]
retain: bool
class nirahmq.components.Number[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_number(value: float | int) None[source]
command_callback: ComponentCallback[Number]
command_template: str
command_topic: CommandTopic
device_class: NumberClass | None
max: float
min: float
mode: NumberMode
optimistic: bool
payload_reset: str
platform: Annotated[Platform, Required]
retain: bool
state_topic: StateTopic
step: float
unit_of_measurement: str | None
value_template: str
class nirahmq.components.Scene[source]

Bases: CallableComponent, EntityBase

command_callback: ComponentCallback[Scene]
command_topic: CommandTopic
payload_on: str
platform: Annotated[Platform, Required]
retain: bool
class nirahmq.components.Select[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_index(index: int) None[source]
set_option(value: str) None[source]
command_callback: ComponentCallback[Select]
command_template: str
command_topic: CommandTopic
optimistic: bool
options: list[str]
platform: Annotated[Platform, Required]
retain: bool
state_topic: StateTopic
value_template: str
class nirahmq.components.Sensor[source]

Bases: StatefulComponent, EntityBase

set_value(value: float | int | str) None[source]
device_class: SensorClass | None
expire_after: int
force_update: bool
last_reset_value_template: str
options: Annotated[list[str], Len(min_length=1, max_length=None)]
platform: Annotated[Platform, Required]
state_class: SensorStateClass
state_topic: StateTopic
suggested_display_precision: int
unit_of_measurement: str | None
value_template: str
class nirahmq.components.Siren[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(state: bool, tone: str | None = None, duration: int | None = None, volume: float | None = None) None[source]
available_tones: list[str]
command_callback: ComponentCallback[Siren]
command_off_template: str
command_template: str
command_topic: CommandTopic
optimistic: bool
payload_off: str
payload_on: str
platform: Annotated[Platform, Required]
retain: bool
state_off: str
state_on: str
state_topic: StateTopic
state_value_template: str
support_duration: bool
support_volume_set: bool
class nirahmq.components.Switch[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(state: bool) None[source]
command_callback: ComponentCallback[Switch]
command_template: str
command_topic: CommandTopic
device_class: SwitchClass | None
optimistic: bool
payload_off: str
payload_on: str
platform: Annotated[Platform, Required]
retain: bool
state_off: str
state_on: str
state_topic: StateTopic
value_template: str
class nirahmq.components.TagScanner[source]

Bases: StatefulComponent, ComponentBase

set_state(data: str) None[source]
platform: Annotated[Platform, Required]
topic: StateTopic
value_template: str
class nirahmq.components.Text[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_text(text: str) None[source]
command_callback: ComponentCallback[Text]
command_template: str
command_topic: CommandTopic
max: int
min: int
mode: TextMode
pattern: Regex
platform: Annotated[Platform, Required]
retain: bool
state_topic: StateTopic
value_template: str
class nirahmq.components.Update[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_state(installed: str, latest: str | None = None, title: str | None = None, summary: str | None = None, url: AnyUrl | None = None, picture: AnyUrl | None = None, in_progress: bool | None = None, percentage: float | None = None) None[source]
command_callback: ComponentCallback[Update]
command_topic: CommandTopic
device_class: UpdateClass | None
display_precision: int
latest_version_template: str
latest_version_topic: StateTopic
payload_install: str
platform: Annotated[Platform, Required]
release_summary: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=255, pattern=None)]
release_url: AnyUrl
retain: bool
state_topic: StateTopic
title: str
value_template: str
class nirahmq.components.Vacuum[source]

Bases: StatefulComponent, CallableComponent, BareEntityBase

set_state(state: VacuumState, battery_level: int | None = None, fan_speed: VacuumFanSpeed | None = None) None[source]
command_callback: ComponentCallback[Vacuum]
command_topic: CommandTopic
encoding: str
fan_speed_list: list[str] | str
payload_clean_spot: str
payload_locate: str
payload_pause: str
payload_return_to_base: str
payload_start: str
payload_stop: str
platform: Annotated[Platform, Required]
retain: bool
send_command_callback: ComponentCallback[Vacuum]
send_command_topic: CommandTopic
set_fan_speed_callback: ComponentCallback[Vacuum]
set_fan_speed_topic: CommandTopic
state_topic: StateTopic
supported_features: list[VacuumFeature] | VacuumFeature
class nirahmq.components.Valve[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_position(position: int, state: Literal[ValveState.OPENING, ValveState.CLOSING] | None = None) None[source]
set_state(state: ValveState) None[source]
command_callback: ComponentCallback[Valve]
command_template: str
command_topic: CommandTopic
device_class: ValveClass | None
optimistic: bool
payload_close: str | None
payload_open: str | None
payload_stop: str
platform: Annotated[Platform, Required]
position_closed: int
position_open: int
reports_position: bool
retain: bool
state_closed: str
state_closing: str
state_open: str
state_opening: str
state_topic: StateTopic
value_template: str
class nirahmq.components.WaterHeater[source]

Bases: StatefulComponent, CallableComponent, EntityBase

set_current_temperature(temperature: float) None[source]
set_mode(mode: WaterHeaterMode) None[source]
set_target_temperature(temperature: float) None[source]
current_temperature_template: str
current_temperature_topic: StateTopic
initial: int
max_temp: float
min_temp: float
mode_command_callback: ComponentCallback[WaterHeater]
mode_command_template: str
mode_command_topic: CommandTopic
mode_state_template: str
mode_state_topic: StateTopic
modes: list[WaterHeaterMode]
optimistic: bool
payload_off: str
payload_on: str
platform: Annotated[Platform, Required]
power_command_callback: ComponentCallback[WaterHeater]
power_command_template: str
power_command_topic: CommandTopic
precision: Precision
retain: bool
temperature_command_callback: ComponentCallback[WaterHeater]
temperature_command_template: str
temperature_command_topic: CommandTopic
temperature_state_template: str
temperature_state_topic: StateTopic
temperature_unit: TemperatureUnit
value_template: str