Skip to content

Commit

Permalink
Rearrange addons
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Jan 26, 2025
1 parent 3fe813e commit de9aa7e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
22 changes: 0 additions & 22 deletions firmware/addons/interactive-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,20 @@ switch:
sorting_group_id: sorting_group_system
sorting_weight: -19

button:
- platform: template
id: identify_indoor_station
name: "Identify Indoor Station"
icon: "mdi:identifier"
entity_category: CONFIG
disabled_by_default: true
on_press:
- tc_bus.identify:
web_server:
sorting_group_id: sorting_group_intercom_settings

# Extend TC:BUS Component
tc_bus:
on_identify_complete:
- if:
condition:
- switch.is_on: doorman_setup_mode
then:
- logger.log:
format: "Setup: Identified Hardware: %s (version %i), Firmware: %i.%i.%i"
args: [ 'model_to_string(x.model)', 'x.hardware_version', 'x.firmware_major', 'x.firmware_minor', 'x.firmware_patch' ]
# Read memory after identifying model
- if:
condition:
- lambda: return x.model != MODEL_NONE;
then:
- tc_bus.read_memory:
- script.execute: complete_setup

on_identify_timeout:
- if:
condition:
- switch.is_on: doorman_setup_mode
then:
- logger.log: "Setup: Unable to identify the Indoor Station, please select manually."
- script.execute: complete_setup

on_command:
Expand Down
26 changes: 25 additions & 1 deletion firmware/addons/intercom-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ tc_bus:
on_read_memory_timeout:
- logger.log: "Failed to read Memory"

on_identify_complete:
- logger.log:
format: "Identified Hardware: %s (version %i), Firmware: %i.%i.%i"
args: [ 'model_to_string(x.model)', 'x.hardware_version', 'x.firmware_major', 'x.firmware_minor', 'x.firmware_patch' ]
- if:
condition:
- lambda: return x.model != MODEL_NONE;
then:
- tc_bus.read_memory:

on_identify_timeout:
- logger.log: "Unable to identify the Indoor Station, please select manually."

select:
- platform: tc_bus
model:
Expand Down Expand Up @@ -107,4 +120,15 @@ button:
entity_category: CONFIG
disabled_by_default: true
web_server:
sorting_group_id: sorting_group_intercom_settings
sorting_group_id: sorting_group_intercom_settings

- platform: template
id: identify_indoor_station
name: "Identify Indoor Station"
icon: "mdi:identifier"
entity_category: CONFIG
disabled_by_default: true
on_press:
- tc_bus.identify:
web_server:
sorting_group_id: sorting_group_intercom_settings

0 comments on commit de9aa7e

Please sign in to comment.