Dynamically Updating Icons Using SF Symbols (JXA)

I don't want to report this as a bug simply because I'm not sure if I'm doing this right. I'm reviewing some of my Touch Bar widgets, one of which is a weather widget that is updated via an external AppleScript that's executed by a system service that pulls data from my personal weather station. To update the widget(s), I use the following function:

function customTriggerUpdate(uuid, settings) {
    BTT.update_trigger(uuid, {
        json: JSON.stringify(settings),
        shared_secret: my_shared_secret,

This is utilized throughout the script. To update the main weather display buttons, it runs:

// Contextual string modification to display rain emoji if the PWS is reporting a rain rate
    let sf_symbol = "thermometer";
    if (data_precip_rate_current > 0) {
        sf_symbol = "cloud.rain";
    for (let i in main_temperature) {
        customTriggerUpdate(main_temperature[i], {
            BTTTouchBarButtonName: data_current_temperature_rounded + data_temperature_unit,
            BTTTriggerConfig: {
                BTTTouchBarButtonColor: bg_main,
                BTTTouchBarItemSFSymbolDefaultIcon: sf_symbol

However, the icon does not change either way. Am I doing something incorrectly? Is there another way to change the icon, or is altering SF Icon configurations not implemented yet?

This should be fixed in 3.560 alpha which will be online in about 10 minutes. (Get via check for alpha version updates)

1 Like