Skip to content

Add ability to change button name when toggling #32

Open

Description

@truckerboy

Change name of button when toggling, based on output of a script with support for a default in case the output is invalid.

Activity

  1. StorageB commented on Jul 2, 2026

    @StorageB
    Owner

    Hello and thanks for the suggestion. This is an interesting idea and could be done, but I'm wondering what is the use case for this? I don't think I've seen any other toggle buttons that have this behavior.

  2. Edexiel commented on Aug 27, 2026

    @Edexiel

    Hey ! Thanks for this extension
    I was looking for a way to change the text of a button with a script return value and ended up here.
    For my use case I'm trying to fetch data from home assistant sensors, thought it would be fun to have them here

  3. StorageB commented on Aug 29, 2026

    @StorageB
    Owner

    Hello @Edexiel, thanks for the message. I will look into this a bit more when I have some time. I think it can done, but I also want to avoid making this extension too heavy. It is an interesting idea though.

    Could you give an example of what the button name would change to or what your script output would be? Would it be the output of the check status command, or the output of the on and off commands depending on if the button is toggled on or off?

  4. Edexiel commented on Aug 30, 2026

    @Edexiel

    It would be the output of the status command, sensors do not have states, just values.
    But lights do have states
    With my script I can query a sensor and get a string output (ex 26.0c) , Might be interesting to have a templated string feature to only change part of the string : "Temperature living room : {status}" -> Temperature living room : 26.0c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions