Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Use serial protocol of Acer projector to obtain state of the projector."""
2 
3 from __future__ import annotations
4 
5 from typing import Final
6 
7 from homeassistant.const import STATE_OFF, STATE_ON
8 
9 CONF_WRITE_TIMEOUT: Final = "write_timeout"
10 
11 DEFAULT_NAME: Final = "Acer Projector"
12 DEFAULT_TIMEOUT: Final = 1
13 DEFAULT_WRITE_TIMEOUT: Final = 1
14 
15 ECO_MODE: Final = "ECO Mode"
16 
17 ICON: Final = "mdi:projector"
18 
19 INPUT_SOURCE: Final = "Input Source"
20 
21 LAMP: Final = "Lamp"
22 LAMP_HOURS: Final = "Lamp Hours"
23 
24 MODEL: Final = "Model"
25 
26 # Commands known to the projector
27 CMD_DICT: Final[dict[str, str]] = {
28  LAMP: "* 0 Lamp ?\r",
29  LAMP_HOURS: "* 0 Lamp\r",
30  INPUT_SOURCE: "* 0 Src ?\r",
31  ECO_MODE: "* 0 IR 052\r",
32  MODEL: "* 0 IR 035\r",
33  STATE_ON: "* 0 IR 001\r",
34  STATE_OFF: "* 0 IR 002\r",
35 }