How to get HA url from AppDaemon

Are there any ways to get home assistant url in AppDaemon app?

you have the HA url set in the appdaemon yaml.
to get the info from the (hass) plugin you can use the function
self.get_plugin_config()

I have tried, I don’t see ha_url here:

{‘components’: [‘switch.command_line’, ‘lock’, ‘sensor.yweather’, ‘zone’, ‘owntracks’, ‘config.group’, ‘sensor.systemmonit
or’, ‘config.entity_registry’, ‘config.script’, ‘lovelace’, ‘sensor.template’, ‘media_player.ps4’, ‘http’, ‘onboarding’, ’
light.group’, ‘binary_sensor.template’, ‘tts’, ‘auth’, ‘binary_sensor’, ‘media_player’, ‘camera.synology’, ‘device_tracker
‘, ‘updater’, ‘xiaomi_aqara’, ‘config.customize’, ‘notify.group’, ‘fan’, ‘telegram_bot’, ‘switch.template’, ‘script’, ‘swi
tch.xiaomi_aqara’, ‘shell_command’, ‘input_text’, ‘config.device_registry’, ‘google_assistant’, ‘logbook’, ‘input_number’,
‘websocket_api’, ‘group’, ‘system_log’, ‘sun’, ‘config’, ‘notify.telegram’, ‘notify.lametric’, ‘media_player.plex’, ‘lame
tric’, ‘cast’, ‘cover.xiaomi_aqara’, ‘conversation’, ‘alarm_control_panel.manual’, ‘frontend’, ‘notify’, ‘config.auth’, ‘s
witch’, ‘api’, ‘camera’, ‘discovery’, ‘binary_sensor.ping’, ‘lock.xiaomi_aqara’, ‘scene’, ‘scene.homeassistant’, ‘history’
, ‘config.auth_provider_homeassistant’, ‘climate’, ‘config.core’, ‘sensor.mqtt’, ‘cover’, ‘sensor.xiaomi_aqara’, ‘sensor.m
in_max’, ‘alarm_control_panel’, ‘notify.html5’, ‘lock.template’, ‘binary_sensor.xiaomi_aqara’, ‘sensor.gh_alarm_and_timer’
, ‘sensor’, ‘binary_sensor.internet’, ‘webhook’, ‘recorder’, ‘ffmpeg’, ‘mqtt’, ‘switch.wake_on_lan’, ‘light.xiaomi_aqara’,
‘config.config_entries’, ‘automation’, ‘remote.xiaomi_miio’, ‘light’, ‘media_player.cast’, ‘light.xiaomi_miio’, ‘python_s
cript’, ‘remote’, ‘input_boolean’, ‘config.automation’, ‘fan.xiaomi_miio’], ‘config_dir’: ‘/config’, ‘elevation’: 210, ‘la
titude’: 1, ‘location_name’: ‘1’, ‘longitude’: 1, ‘time_zone’: ‘1’, ‘unit_system’: {‘le
ngth’: ‘km’, ‘mass’: ‘g’, ‘temperature’: ‘°C’, ‘volume’: ‘L’}, ‘version’: ‘0.84.1’, ‘whitelist_external_dirs’: [’/config/w
ww’]}

sorry i did get it wrong (happens with stuff that i never use :wink: )

you can use

self.config[“plugins”][“HASS”][“ha_url”]

unless you named your plugin with a different name.

1 Like

Thanks this worked