Functions | |
| str|None | get_port (str dev_path) |
| list[str] | list_ports_as_str (list[ListPortInfo] serial_ports, bool no_usb_option=True) |
| int | map_from_to (int val, int in_min, int in_max, int out_min, int out_max) |
Helper functions for the Crownstone integration.
| str | None homeassistant.components.crownstone.helpers.get_port | ( | str | dev_path | ) |
Get the port that the by-id link points to.
Definition at line 45 of file helpers.py.
| list[str] homeassistant.components.crownstone.helpers.list_ports_as_str | ( | list[ListPortInfo] | serial_ports, |
| bool | no_usb_option = True |
||
| ) |
Represent currently available serial ports as string. Adds option to not use usb on top of the list, option to use manual path or refresh list at the end.
Definition at line 14 of file helpers.py.
| int homeassistant.components.crownstone.helpers.map_from_to | ( | int | val, |
| int | in_min, | ||
| int | in_max, | ||
| int | out_min, | ||
| int | out_max | ||
| ) |
Map a value from a range to another.
Definition at line 58 of file helpers.py.