Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Oct 10, 2024
1 parent d865337 commit 3978ddb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
72 changes: 36 additions & 36 deletions components/tc_bus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,49 +33,49 @@
ReadMemoryTimeoutTrigger = tc_bus_ns.class_("ReadMemoryTimeoutTrigger", automation.Trigger.template())
ReceivedCommandTrigger = tc_bus_ns.class_("ReceivedCommandTrigger", automation.Trigger.template())

SettingType = tc_bus_ns.enum("Setting_Type")
SETTING_TYPE = tc_bus_ns.enum("SettingType")
SETTING_TYPES = {
"ringtone_floor_call": SettingType.SETTING_RINGTONE_FLOOR_CALL,
"ringtone_door_call": SettingType.SETTING_RINGTONE_DOOR_CALL,
"ringtone_internal_call": SettingType.SETTING_RINGTONE_INTERNAL_CALL,
"volume_ringtone": SettingType.SETTING_RINGTONE_VOLUME,
"volume_handset": SettingType.SETTING_HANDSET_VOLUME
"ringtone_floor_call": SETTING_TYPE.SETTING_RINGTONE_FLOOR_CALL,
"ringtone_door_call": SETTING_TYPE.SETTING_RINGTONE_DOOR_CALL,
"ringtone_internal_call": SETTING_TYPE.SETTING_RINGTONE_INTERNAL_CALL,
"volume_ringtone": SETTING_TYPE.SETTING_RINGTONE_VOLUME,
"volume_handset": SETTING_TYPE.SETTING_HANDSET_VOLUME
}

CommandType = tc_bus_ns.enum("Command_Type")
COMMAND_TYPE = tc_bus_ns.enum("CommandType")
COMMAND_TYPES = {
"unknown": CommandType.COMMAND_TYPE_UNKNOWN,
"door_call": CommandType.COMMAND_TYPE_DOOR_CALL,
"floor_call": CommandType.COMMAND_TYPE_FLOOR_CALL,
"internal_call": CommandType.COMMAND_TYPE_INTERNAL_CALL,
"control_function": CommandType.COMMAND_TYPE_CONTROL_FUNCTION,
"start_talking_door_station": CommandType.COMMAND_TYPE_START_TALKING_DOOR_STATION,
"start_talking_ia": CommandType.COMMAND_TYPE_START_TALKING_IA,
"stop_talking_door_station": CommandType.COMMAND_TYPE_STOP_TALKING_DOOR_STATION,
"stop_talking_ia": CommandType.COMMAND_TYPE_STOP_TALKING_IA,
"open_door": CommandType.COMMAND_TYPE_OPEN_DOOR,
"light": CommandType.COMMAND_TYPE_LIGHT,
"door_opened": CommandType.COMMAND_TYPE_DOOR_OPENED,
"door_closed": CommandType.COMMAND_TYPE_DOOR_CLOSED,
"end_of_ringtone": CommandType.COMMAND_TYPE_END_OF_RINGTONE,
"end_of_door_readiness": CommandType.COMMAND_TYPE_END_OF_DOOR_READINESS,
"initialize_door_station": CommandType.COMMAND_TYPE_INITIALIZE_DOOR_STATION,
"reset": CommandType.COMMAND_TYPE_RESET,
"select_device_group": CommandType.COMMAND_TYPE_SELECT_DEVICE_GROUP,
"select_device_group_reset": CommandType.COMMAND_TYPE_SELECT_DEVICE_GROUP_RESET,
"search_devices": CommandType.COMMAND_TYPE_SEARCH_DEVICES,
"found_device": CommandType.COMMAND_TYPE_FOUND_DEVICE,
"found_device_subsystem": CommandType.COMMAND_TYPE_FOUND_DEVICE_SUBSYSTEM,
"programming_mode": CommandType.COMMAND_TYPE_PROGRAMMING_MODE,
"read_memory_block": CommandType.COMMAND_TYPE_READ_MEMORY_BLOCK,
"select_memory_page": CommandType.COMMAND_TYPE_SELECT_MEMORY_PAGE,
"write_memory": CommandType.COMMAND_TYPE_WRITE_MEMORY
"unknown": COMMAND_TYPE.COMMAND_TYPE_UNKNOWN,
"door_call": COMMAND_TYPE.COMMAND_TYPE_DOOR_CALL,
"floor_call": COMMAND_TYPE.COMMAND_TYPE_FLOOR_CALL,
"internal_call": COMMAND_TYPE.COMMAND_TYPE_INTERNAL_CALL,
"control_function": COMMAND_TYPE.COMMAND_TYPE_CONTROL_FUNCTION,
"start_talking_door_station": COMMAND_TYPE.COMMAND_TYPE_START_TALKING_DOOR_STATION,
"start_talking_ia": COMMAND_TYPE.COMMAND_TYPE_START_TALKING_IA,
"stop_talking_door_station": COMMAND_TYPE.COMMAND_TYPE_STOP_TALKING_DOOR_STATION,
"stop_talking_ia": COMMAND_TYPE.COMMAND_TYPE_STOP_TALKING_IA,
"open_door": COMMAND_TYPE.COMMAND_TYPE_OPEN_DOOR,
"light": COMMAND_TYPE.COMMAND_TYPE_LIGHT,
"door_opened": COMMAND_TYPE.COMMAND_TYPE_DOOR_OPENED,
"door_closed": COMMAND_TYPE.COMMAND_TYPE_DOOR_CLOSED,
"end_of_ringtone": COMMAND_TYPE.COMMAND_TYPE_END_OF_RINGTONE,
"end_of_door_readiness": COMMAND_TYPE.COMMAND_TYPE_END_OF_DOOR_READINESS,
"initialize_door_station": COMMAND_TYPE.COMMAND_TYPE_INITIALIZE_DOOR_STATION,
"reset": COMMAND_TYPE.COMMAND_TYPE_RESET,
"select_device_group": COMMAND_TYPE.COMMAND_TYPE_SELECT_DEVICE_GROUP,
"select_device_group_reset": COMMAND_TYPE.COMMAND_TYPE_SELECT_DEVICE_GROUP_RESET,
"search_devices": COMMAND_TYPE.COMMAND_TYPE_SEARCH_DEVICES,
"found_device": COMMAND_TYPE.COMMAND_TYPE_FOUND_DEVICE,
"found_device_subsystem": COMMAND_TYPE.COMMAND_TYPE_FOUND_DEVICE_SUBSYSTEM,
"programming_mode": COMMAND_TYPE.COMMAND_TYPE_PROGRAMMING_MODE,
"read_memory_block": COMMAND_TYPE.COMMAND_TYPE_READ_MEMORY_BLOCK,
"select_memory_page": COMMAND_TYPE.COMMAND_TYPE_SELECT_MEMORY_PAGE,
"write_memory": COMMAND_TYPE.COMMAND_TYPE_WRITE_MEMORY
}

Model = tc_bus_ns.enum("Model")
MODEL = tc_bus_ns.enum("Model")
MODELS = {
"none": Model.MODEL_NONE,
"ish_3030": Model.MODEL_ISH_3030,
"none": MODEL.MODEL_NONE,
"ish_3030": MODEL.MODEL_ISH_3030,
}

CONF_TC_ID = "tc_bus"
Expand Down
4 changes: 2 additions & 2 deletions firmware/addons/memory-utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ number:
min_value: 0
max_value: 7
step: 1
lambda: !lambda "return id(tc_bus_intercom)->get_setting(SETTING_RINGTONE_VOLUME);"
lambda: !lambda "return id(tc_bus_intercom)->get_setting(SETTING_VOLUME_RINGTONE);"
update_interval: 1s
set_action:
- tc_bus.update_setting:
Expand All @@ -38,7 +38,7 @@ number:
min_value: 0
max_value: 7
step: 1
lambda: !lambda "return id(tc_bus_intercom)->get_setting(SETTING_HANDSET_VOLUME);"
lambda: !lambda "return id(tc_bus_intercom)->get_setting(SETTING_VOLUME_HANDSET);"
update_interval: 1s
set_action:
- tc_bus.update_setting:
Expand Down

0 comments on commit 3978ddb

Please sign in to comment.