Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.isy994.helpers Namespace Reference

Functions

None _add_backlight_if_supported (IsyData isy_data, Node node)
 
None _categorize_nodes (IsyData isy_data, Nodes nodes, str ignore_identifier, str sensor_identifier)
 
None _categorize_programs (IsyData isy_data, Programs programs)
 
bool _check_for_insteon_type (IsyData isy_data, Group|Node node, Platform|None single_platform=None)
 
bool _check_for_node_def (IsyData isy_data, Group|Node node, Platform|None single_platform=None)
 
bool _check_for_states_in_uom (IsyData isy_data, Group|Node node, Platform|None single_platform=None, list[str]|None states_list=None)
 
bool _check_for_uom_id (IsyData isy_data, Group|Node node, Platform|None single_platform=None, list[str]|None uom_list=None)
 
bool _check_for_zwave_cat (IsyData isy_data, Group|Node node, Platform|None single_platform=None)
 
DeviceInfo _generate_device_info (Node node)
 
bool _is_sensor_a_binary_sensor (IsyData isy_data, Group|Node node)
 
float|int|None convert_isy_value_to_hass (float|None value, str|None uom, int|str precision, int|None fallback_precision=None)
 

Variables

list BINARY_SENSOR_ISY_STATES = ["on", "off"]
 
list BINARY_SENSOR_UOMS = ["2", "78"]
 
dictionary ROOT_AUX_CONTROLS
 
dictionary SKIP_AUX_PROPS = {PROP_BUSY, PROP_COMMS_ERROR, PROP_STATUS, *ROOT_AUX_CONTROLS}
 

Detailed Description

Sorting helpers for ISY device classifications.

Function Documentation

◆ _add_backlight_if_supported()

None homeassistant.components.isy994.helpers._add_backlight_if_supported ( IsyData  isy_data,
Node  node 
)
private
Check if a node supports setting a backlight and add entity.

Definition at line 283 of file helpers.py.

◆ _categorize_nodes()

None homeassistant.components.isy994.helpers._categorize_nodes ( IsyData  isy_data,
Nodes  nodes,
str  ignore_identifier,
str   sensor_identifier 
)
private
Sort the nodes to their proper platforms.

Definition at line 332 of file helpers.py.

◆ _categorize_programs()

None homeassistant.components.isy994.helpers._categorize_programs ( IsyData  isy_data,
Programs  programs 
)
private
Categorize the ISY programs.

Definition at line 394 of file helpers.py.

◆ _check_for_insteon_type()

bool homeassistant.components.isy994.helpers._check_for_insteon_type ( IsyData  isy_data,
Group | Node  node,
Platform | None   single_platform = None 
)
private
Check if the node matches the Insteon type for any platforms.

This is for (presumably) every version of the ISY firmware, but only
works for Insteon device. "Node Server" (v5+) and Z-Wave and others will
not have a type.

Definition at line 90 of file helpers.py.

◆ _check_for_node_def()

bool homeassistant.components.isy994.helpers._check_for_node_def ( IsyData  isy_data,
Group | Node  node,
Platform | None   single_platform = None 
)
private
Check if the node matches the node_def_id for any platforms.

This is only present on the 5.0 ISY firmware, and is the most reliable
way to determine a device's type.

Definition at line 67 of file helpers.py.

◆ _check_for_states_in_uom()

bool homeassistant.components.isy994.helpers._check_for_states_in_uom ( IsyData  isy_data,
Group | Node  node,
Platform | None   single_platform = None,
list[str] | None   states_list = None 
)
private
Check if a list of uoms matches two possible filters.

This is for versions of the ISY firmware that report uoms as a list of all
possible "human readable" states. This filter passes if all of the possible
states fit inside the given filter.

Definition at line 217 of file helpers.py.

◆ _check_for_uom_id()

bool homeassistant.components.isy994.helpers._check_for_uom_id ( IsyData  isy_data,
Group | Node  node,
Platform | None   single_platform = None,
list[str] | None   uom_list = None 
)
private
Check if a node's uom matches any of the platforms uom filter.

This is used for versions of the ISY firmware that report uoms as a single
ID. We can often infer what type of device it is by that ID.

Definition at line 182 of file helpers.py.

◆ _check_for_zwave_cat()

bool homeassistant.components.isy994.helpers._check_for_zwave_cat ( IsyData  isy_data,
Group | Node  node,
Platform | None   single_platform = None 
)
private
Check if the node matches the ISY Z-Wave Category for any platforms.

This is for (presumably) every version of the ISY firmware, but only
works for Z-Wave Devices with the devtype.cat property.

Definition at line 154 of file helpers.py.

◆ _generate_device_info()

DeviceInfo homeassistant.components.isy994.helpers._generate_device_info ( Node  node)
private
Generate the device info for a root node device.

Definition at line 293 of file helpers.py.

◆ _is_sensor_a_binary_sensor()

bool homeassistant.components.isy994.helpers._is_sensor_a_binary_sensor ( IsyData  isy_data,
Group | Node  node 
)
private
Determine if the given sensor node should be a binary_sensor.

Definition at line 254 of file helpers.py.

◆ convert_isy_value_to_hass()

float | int | None homeassistant.components.isy994.helpers.convert_isy_value_to_hass ( float | None  value,
str | None  uom,
int | str  precision,
int | None   fallback_precision = None 
)
Fix ISY Reported Values.

ISY provides float values as an integer and precision component.
Correct by shifting the decimal place left by the value of precision.
(e.g. value=2345, prec="2" == 23.45)

Insteon Thermostats report temperature in 0.5-deg precision as an int
by sending a value of 2 times the Temp. Correct by dividing by 2 here.

Definition at line 433 of file helpers.py.

Variable Documentation

◆ BINARY_SENSOR_ISY_STATES

list homeassistant.components.isy994.helpers.BINARY_SENSOR_ISY_STATES = ["on", "off"]

Definition at line 59 of file helpers.py.

◆ BINARY_SENSOR_UOMS

list homeassistant.components.isy994.helpers.BINARY_SENSOR_UOMS = ["2", "78"]

Definition at line 58 of file helpers.py.

◆ ROOT_AUX_CONTROLS

dictionary homeassistant.components.isy994.helpers.ROOT_AUX_CONTROLS
Initial value:
1 = {
2  PROP_ON_LEVEL,
3  PROP_RAMP_RATE,
4 }

Definition at line 60 of file helpers.py.

◆ SKIP_AUX_PROPS

dictionary homeassistant.components.isy994.helpers.SKIP_AUX_PROPS = {PROP_BUSY, PROP_COMMS_ERROR, PROP_STATUS, *ROOT_AUX_CONTROLS}

Definition at line 64 of file helpers.py.