2019-08-07 00:32:15 +00:00
|
|
|
"""Abbreviations supported by MQTT discovery."""
|
|
|
|
|
|
|
|
ABBREVIATIONS = {
|
|
|
|
"act_t": "action_topic",
|
|
|
|
"act_tpl": "action_template",
|
2020-02-18 21:51:10 +00:00
|
|
|
"atype": "automation_type",
|
2019-08-07 00:32:15 +00:00
|
|
|
"aux_cmd_t": "aux_command_topic",
|
|
|
|
"aux_stat_tpl": "aux_state_template",
|
|
|
|
"aux_stat_t": "aux_state_topic",
|
2020-07-04 15:48:34 +00:00
|
|
|
"avty": "availability",
|
2021-01-11 15:04:22 +00:00
|
|
|
"avty_mode": "availability_mode",
|
2019-08-07 00:32:15 +00:00
|
|
|
"avty_t": "availability_topic",
|
|
|
|
"away_mode_cmd_t": "away_mode_command_topic",
|
|
|
|
"away_mode_stat_tpl": "away_mode_state_template",
|
|
|
|
"away_mode_stat_t": "away_mode_state_topic",
|
|
|
|
"b_tpl": "blue_template",
|
|
|
|
"bri_cmd_t": "brightness_command_topic",
|
|
|
|
"bri_scl": "brightness_scale",
|
|
|
|
"bri_stat_t": "brightness_state_topic",
|
|
|
|
"bri_tpl": "brightness_template",
|
|
|
|
"bri_val_tpl": "brightness_value_template",
|
|
|
|
"clr_temp_cmd_tpl": "color_temp_command_template",
|
|
|
|
"bat_lev_t": "battery_level_topic",
|
|
|
|
"bat_lev_tpl": "battery_level_template",
|
|
|
|
"chrg_t": "charging_topic",
|
|
|
|
"chrg_tpl": "charging_template",
|
2021-03-31 09:28:45 +00:00
|
|
|
"clrm": "color_mode",
|
2021-05-24 09:37:02 +00:00
|
|
|
"clrm_stat_t": "color_mode_state_topic",
|
|
|
|
"clrm_val_tpl": "color_mode_value_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"clr_temp_cmd_t": "color_temp_command_topic",
|
|
|
|
"clr_temp_stat_t": "color_temp_state_topic",
|
|
|
|
"clr_temp_tpl": "color_temp_template",
|
|
|
|
"clr_temp_val_tpl": "color_temp_value_template",
|
|
|
|
"cln_t": "cleaning_topic",
|
|
|
|
"cln_tpl": "cleaning_template",
|
|
|
|
"cmd_off_tpl": "command_off_template",
|
|
|
|
"cmd_on_tpl": "command_on_template",
|
|
|
|
"cmd_t": "command_topic",
|
|
|
|
"cmd_tpl": "command_template",
|
|
|
|
"cod_arm_req": "code_arm_required",
|
|
|
|
"cod_dis_req": "code_disarm_required",
|
|
|
|
"curr_temp_t": "current_temperature_topic",
|
|
|
|
"curr_temp_tpl": "current_temperature_template",
|
|
|
|
"dev": "device",
|
|
|
|
"dev_cla": "device_class",
|
|
|
|
"dock_t": "docked_topic",
|
|
|
|
"dock_tpl": "docked_template",
|
2021-03-29 22:09:14 +00:00
|
|
|
"en": "enabled_by_default",
|
2019-08-07 00:32:15 +00:00
|
|
|
"err_t": "error_topic",
|
|
|
|
"err_tpl": "error_template",
|
|
|
|
"fanspd_t": "fan_speed_topic",
|
|
|
|
"fanspd_tpl": "fan_speed_template",
|
|
|
|
"fanspd_lst": "fan_speed_list",
|
|
|
|
"flsh_tlng": "flash_time_long",
|
|
|
|
"flsh_tsht": "flash_time_short",
|
|
|
|
"fx_cmd_t": "effect_command_topic",
|
|
|
|
"fx_list": "effect_list",
|
|
|
|
"fx_stat_t": "effect_state_topic",
|
|
|
|
"fx_tpl": "effect_template",
|
|
|
|
"fx_val_tpl": "effect_value_template",
|
|
|
|
"exp_aft": "expire_after",
|
2021-01-26 15:12:33 +00:00
|
|
|
"fan_mode_cmd_tpl": "fan_mode_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"fan_mode_cmd_t": "fan_mode_command_topic",
|
|
|
|
"fan_mode_stat_tpl": "fan_mode_state_template",
|
|
|
|
"fan_mode_stat_t": "fan_mode_state_topic",
|
|
|
|
"frc_upd": "force_update",
|
|
|
|
"g_tpl": "green_template",
|
2021-01-26 15:12:33 +00:00
|
|
|
"hold_cmd_tpl": "hold_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"hold_cmd_t": "hold_command_topic",
|
|
|
|
"hold_stat_tpl": "hold_state_template",
|
|
|
|
"hold_stat_t": "hold_state_topic",
|
|
|
|
"hs_cmd_t": "hs_command_topic",
|
|
|
|
"hs_stat_t": "hs_state_topic",
|
|
|
|
"hs_val_tpl": "hs_value_template",
|
|
|
|
"ic": "icon",
|
|
|
|
"init": "initial",
|
2021-07-15 09:12:23 +00:00
|
|
|
"hum_cmd_t": "target_humidity_command_topic",
|
|
|
|
"hum_cmd_tpl": "target_humidity_command_template",
|
|
|
|
"hum_stat_t": "target_humidity_state_topic",
|
|
|
|
"hum_state_tpl": "target_humidity_state_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"json_attr": "json_attributes",
|
|
|
|
"json_attr_t": "json_attributes_topic",
|
|
|
|
"json_attr_tpl": "json_attributes_template",
|
2021-05-26 09:50:29 +00:00
|
|
|
"lrst_t": "last_reset_topic",
|
|
|
|
"lrst_val_tpl": "last_reset_value_template",
|
2021-05-21 15:35:27 +00:00
|
|
|
"max": "max",
|
|
|
|
"min": "min",
|
2021-07-15 09:12:23 +00:00
|
|
|
"max_hum": "max_humidity",
|
|
|
|
"min_hum": "min_humidity",
|
2020-05-10 07:34:48 +00:00
|
|
|
"max_mirs": "max_mireds",
|
|
|
|
"min_mirs": "min_mireds",
|
2019-08-07 00:32:15 +00:00
|
|
|
"max_temp": "max_temp",
|
|
|
|
"min_temp": "min_temp",
|
2021-01-26 15:12:33 +00:00
|
|
|
"mode_cmd_tpl": "mode_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"mode_cmd_t": "mode_command_topic",
|
|
|
|
"mode_stat_t": "mode_state_topic",
|
2021-07-15 09:12:23 +00:00
|
|
|
"mode_stat_tpl": "mode_state_template",
|
|
|
|
"modes": "modes",
|
2019-08-07 00:32:15 +00:00
|
|
|
"name": "name",
|
2021-11-08 13:02:18 +00:00
|
|
|
"obj_id": "object_id",
|
2019-08-07 00:32:15 +00:00
|
|
|
"off_dly": "off_delay",
|
|
|
|
"on_cmd_type": "on_command_type",
|
2021-06-24 15:09:06 +00:00
|
|
|
"ops": "options",
|
2019-08-07 00:32:15 +00:00
|
|
|
"opt": "optimistic",
|
|
|
|
"osc_cmd_t": "oscillation_command_topic",
|
2021-03-29 18:41:51 +00:00
|
|
|
"osc_cmd_tpl": "oscillation_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"osc_stat_t": "oscillation_state_topic",
|
|
|
|
"osc_val_tpl": "oscillation_value_template",
|
2021-03-26 07:37:47 +00:00
|
|
|
"pct_cmd_t": "percentage_command_topic",
|
2021-03-29 18:41:51 +00:00
|
|
|
"pct_cmd_tpl": "percentage_command_template",
|
2021-03-26 07:37:47 +00:00
|
|
|
"pct_stat_t": "percentage_state_topic",
|
|
|
|
"pct_val_tpl": "percentage_value_template",
|
2020-02-18 21:51:10 +00:00
|
|
|
"pl": "payload",
|
2019-08-07 00:32:15 +00:00
|
|
|
"pl_arm_away": "payload_arm_away",
|
|
|
|
"pl_arm_home": "payload_arm_home",
|
|
|
|
"pl_arm_nite": "payload_arm_night",
|
2021-08-24 11:22:49 +00:00
|
|
|
"pl_arm_vacation": "payload_arm_vacation",
|
2020-04-06 09:45:37 +00:00
|
|
|
"pl_arm_custom_b": "payload_arm_custom_bypass",
|
2019-08-07 00:32:15 +00:00
|
|
|
"pl_avail": "payload_available",
|
|
|
|
"pl_cln_sp": "payload_clean_spot",
|
|
|
|
"pl_cls": "payload_close",
|
|
|
|
"pl_disarm": "payload_disarm",
|
|
|
|
"pl_hi_spd": "payload_high_speed",
|
2019-10-18 00:51:27 +00:00
|
|
|
"pl_home": "payload_home",
|
2019-08-07 00:32:15 +00:00
|
|
|
"pl_lock": "payload_lock",
|
|
|
|
"pl_loc": "payload_locate",
|
|
|
|
"pl_lo_spd": "payload_low_speed",
|
|
|
|
"pl_med_spd": "payload_medium_speed",
|
|
|
|
"pl_not_avail": "payload_not_available",
|
2019-10-18 00:51:27 +00:00
|
|
|
"pl_not_home": "payload_not_home",
|
2019-08-07 00:32:15 +00:00
|
|
|
"pl_off": "payload_off",
|
|
|
|
"pl_off_spd": "payload_off_speed",
|
|
|
|
"pl_on": "payload_on",
|
|
|
|
"pl_open": "payload_open",
|
|
|
|
"pl_osc_off": "payload_oscillation_off",
|
|
|
|
"pl_osc_on": "payload_oscillation_on",
|
|
|
|
"pl_paus": "payload_pause",
|
2021-11-09 11:04:14 +00:00
|
|
|
"pl_prs": "payload_press",
|
2021-10-07 11:54:34 +00:00
|
|
|
"pl_rst": "payload_reset",
|
2021-07-15 09:12:23 +00:00
|
|
|
"pl_rst_hum": "payload_reset_humidity",
|
|
|
|
"pl_rst_mode": "payload_reset_mode",
|
2021-05-18 06:24:42 +00:00
|
|
|
"pl_rst_pct": "payload_reset_percentage",
|
|
|
|
"pl_rst_pr_mode": "payload_reset_preset_mode",
|
2019-08-07 00:32:15 +00:00
|
|
|
"pl_stop": "payload_stop",
|
|
|
|
"pl_strt": "payload_start",
|
|
|
|
"pl_stpa": "payload_start_pause",
|
|
|
|
"pl_ret": "payload_return_to_base",
|
|
|
|
"pl_toff": "payload_turn_off",
|
|
|
|
"pl_ton": "payload_turn_on",
|
|
|
|
"pl_unlk": "payload_unlock",
|
|
|
|
"pos_clsd": "position_closed",
|
|
|
|
"pos_open": "position_open",
|
|
|
|
"pow_cmd_t": "power_command_topic",
|
|
|
|
"pow_stat_t": "power_state_topic",
|
|
|
|
"pow_stat_tpl": "power_state_template",
|
2021-03-26 07:37:47 +00:00
|
|
|
"pr_mode_cmd_t": "preset_mode_command_topic",
|
2021-03-29 18:41:51 +00:00
|
|
|
"pr_mode_cmd_tpl": "preset_mode_command_template",
|
2021-03-26 07:37:47 +00:00
|
|
|
"pr_mode_stat_t": "preset_mode_state_topic",
|
|
|
|
"pr_mode_val_tpl": "preset_mode_value_template",
|
|
|
|
"pr_modes": "preset_modes",
|
2019-08-07 00:32:15 +00:00
|
|
|
"r_tpl": "red_template",
|
|
|
|
"ret": "retain",
|
|
|
|
"rgb_cmd_tpl": "rgb_command_template",
|
|
|
|
"rgb_cmd_t": "rgb_command_topic",
|
|
|
|
"rgb_stat_t": "rgb_state_topic",
|
|
|
|
"rgb_val_tpl": "rgb_value_template",
|
2021-05-24 09:37:02 +00:00
|
|
|
"rgbw_cmd_tpl": "rgbw_command_template",
|
|
|
|
"rgbw_cmd_t": "rgbw_command_topic",
|
|
|
|
"rgbw_stat_t": "rgbw_state_topic",
|
|
|
|
"rgbw_val_tpl": "rgbw_value_template",
|
|
|
|
"rgbww_cmd_tpl": "rgbww_command_template",
|
|
|
|
"rgbww_cmd_t": "rgbww_command_topic",
|
|
|
|
"rgbww_stat_t": "rgbww_state_topic",
|
|
|
|
"rgbww_val_tpl": "rgbww_value_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"send_cmd_t": "send_command_topic",
|
|
|
|
"send_if_off": "send_if_off",
|
|
|
|
"set_fan_spd_t": "set_fan_speed_topic",
|
|
|
|
"set_pos_tpl": "set_position_template",
|
|
|
|
"set_pos_t": "set_position_topic",
|
|
|
|
"pos_t": "position_topic",
|
2021-02-08 15:02:12 +00:00
|
|
|
"pos_tpl": "position_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"spd_cmd_t": "speed_command_topic",
|
|
|
|
"spd_stat_t": "speed_state_topic",
|
2021-03-26 07:37:47 +00:00
|
|
|
"spd_rng_min": "speed_range_min",
|
|
|
|
"spd_rng_max": "speed_range_max",
|
2019-08-07 00:32:15 +00:00
|
|
|
"spd_val_tpl": "speed_value_template",
|
|
|
|
"spds": "speeds",
|
2019-10-23 05:26:29 +00:00
|
|
|
"src_type": "source_type",
|
2021-05-21 15:37:26 +00:00
|
|
|
"stat_cla": "state_class",
|
2019-08-07 00:32:15 +00:00
|
|
|
"stat_clsd": "state_closed",
|
2020-01-30 20:14:46 +00:00
|
|
|
"stat_closing": "state_closing",
|
2019-08-07 00:32:15 +00:00
|
|
|
"stat_off": "state_off",
|
|
|
|
"stat_on": "state_on",
|
|
|
|
"stat_open": "state_open",
|
2020-01-30 20:14:46 +00:00
|
|
|
"stat_opening": "state_opening",
|
2021-02-08 15:02:12 +00:00
|
|
|
"stat_stopped": "state_stopped",
|
2019-12-31 14:24:09 +00:00
|
|
|
"stat_locked": "state_locked",
|
|
|
|
"stat_unlocked": "state_unlocked",
|
2019-08-07 00:32:15 +00:00
|
|
|
"stat_t": "state_topic",
|
|
|
|
"stat_tpl": "state_template",
|
|
|
|
"stat_val_tpl": "state_value_template",
|
2021-05-21 15:35:27 +00:00
|
|
|
"step": "step",
|
2020-02-18 21:51:10 +00:00
|
|
|
"stype": "subtype",
|
2019-08-07 00:32:15 +00:00
|
|
|
"sup_feat": "supported_features",
|
2021-03-31 09:28:45 +00:00
|
|
|
"sup_clrm": "supported_color_modes",
|
2021-01-26 15:12:33 +00:00
|
|
|
"swing_mode_cmd_tpl": "swing_mode_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"swing_mode_cmd_t": "swing_mode_command_topic",
|
|
|
|
"swing_mode_stat_tpl": "swing_mode_state_template",
|
|
|
|
"swing_mode_stat_t": "swing_mode_state_topic",
|
2021-01-26 15:12:33 +00:00
|
|
|
"temp_cmd_tpl": "temperature_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"temp_cmd_t": "temperature_command_topic",
|
2021-01-26 15:12:33 +00:00
|
|
|
"temp_hi_cmd_tpl": "temperature_high_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"temp_hi_cmd_t": "temperature_high_command_topic",
|
|
|
|
"temp_hi_stat_tpl": "temperature_high_state_template",
|
|
|
|
"temp_hi_stat_t": "temperature_high_state_topic",
|
2021-01-26 15:12:33 +00:00
|
|
|
"temp_lo_cmd_tpl": "temperature_low_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"temp_lo_cmd_t": "temperature_low_command_topic",
|
|
|
|
"temp_lo_stat_tpl": "temperature_low_state_template",
|
|
|
|
"temp_lo_stat_t": "temperature_low_state_topic",
|
|
|
|
"temp_stat_tpl": "temperature_state_template",
|
|
|
|
"temp_stat_t": "temperature_state_topic",
|
2020-05-02 17:59:23 +00:00
|
|
|
"temp_unit": "temperature_unit",
|
2019-08-07 00:32:15 +00:00
|
|
|
"tilt_clsd_val": "tilt_closed_value",
|
|
|
|
"tilt_cmd_t": "tilt_command_topic",
|
2021-02-08 15:02:12 +00:00
|
|
|
"tilt_cmd_tpl": "tilt_command_template",
|
2019-08-07 00:32:15 +00:00
|
|
|
"tilt_inv_stat": "tilt_invert_state",
|
|
|
|
"tilt_max": "tilt_max",
|
|
|
|
"tilt_min": "tilt_min",
|
|
|
|
"tilt_opnd_val": "tilt_opened_value",
|
|
|
|
"tilt_opt": "tilt_optimistic",
|
|
|
|
"tilt_status_t": "tilt_status_topic",
|
|
|
|
"tilt_status_tpl": "tilt_status_template",
|
|
|
|
"t": "topic",
|
|
|
|
"uniq_id": "unique_id",
|
|
|
|
"unit_of_meas": "unit_of_measurement",
|
|
|
|
"val_tpl": "value_template",
|
2021-06-22 09:59:20 +00:00
|
|
|
"whit_cmd_t": "white_command_topic",
|
|
|
|
"whit_scl": "white_scale",
|
2019-08-07 00:32:15 +00:00
|
|
|
"whit_val_cmd_t": "white_value_command_topic",
|
|
|
|
"whit_val_scl": "white_value_scale",
|
|
|
|
"whit_val_stat_t": "white_value_state_topic",
|
|
|
|
"whit_val_tpl": "white_value_template",
|
|
|
|
"xy_cmd_t": "xy_command_topic",
|
|
|
|
"xy_stat_t": "xy_state_topic",
|
|
|
|
"xy_val_tpl": "xy_value_template",
|
|
|
|
}
|
|
|
|
|
|
|
|
DEVICE_ABBREVIATIONS = {
|
|
|
|
"cns": "connections",
|
2021-10-24 09:35:46 +00:00
|
|
|
"cu": "configuration_url",
|
2019-08-07 00:32:15 +00:00
|
|
|
"ids": "identifiers",
|
|
|
|
"name": "name",
|
|
|
|
"mf": "manufacturer",
|
|
|
|
"mdl": "model",
|
|
|
|
"sw": "sw_version",
|
2021-03-15 19:02:02 +00:00
|
|
|
"sa": "suggested_area",
|
2019-08-07 00:32:15 +00:00
|
|
|
}
|