INNER CODE UNIT · Python
on_reg_state_callback
arnonym/ha-plugins · ha-sip/src/main.py:168
def on_reg_state_callback(account_index: int, code: int, reason: str) -> None:
sensor_updater.update_registration_status(account_index, code, reason)
for key, account_config in account_configs.items():
if account_config.enabled:
sip_accounts[key] = account.create_account(
end_point,
account_config,
command_handler,
event_sender,
ha_config,
on_reg_state_callback,
is_first_enabled_account,
)
is_first_enabled_account = False
mqtt_client = mqtt.create_client_and_connect(global_options, command_handler) if global_options.enable_mqtt else None
def trigger_webhook(event: Any, webhook_id: Optional[str] = None):