Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with custom actions and schedule where the actions don't appear #778

Open
2 tasks done
lucas-dumartin opened this issue Dec 24, 2023 · 4 comments
Open
2 tasks done
Labels

Comments

@lucas-dumartin
Copy link

Checklist

  • I checked for similar existing issues (both open and closed) before posting.
  • I will participate in further discussion about this issue and can help by testing (if requested).

Card Version

v3.2.12

Component Version

v3.2.15

Bug description

After I added custom actions with the customize keyword in the yaml and using them the following is happening :

When I want to edit the Scheme :
image

And I click on a time period with a custom action no other action value is proposed
image

But if I add a new period with no custom action assigned I get the proposition for all the actions possible:
image

Steps to reproduce

On a scheduler card add the following customize for lights :

customize:
  light:
    actions:
      - service: turn_on
        service_data:
          brightness: 50
        name: Conforting Light
        icon: mdi:lightbulb-on-40
      - service: turn_on
        service_data:
          brightness: 100
        name: Fully Lit Up
        icon: mdi:lightbulb-on

Then add an entry for a light and select "Make a scheme" :
image

Add an action for each time period :
image

Save then click on it to edit it again and you should not have any action proposition when you select a time period :
image

You can make them re appear by adding and deleting a new time period

Additional info

No response

@lucas-dumartin lucas-dumartin added the bug Something isn't working label Dec 24, 2023
@lucas-dumartin
Copy link
Author

lucas-dumartin commented Dec 25, 2023

Just found out that the UI can be fixed by changing the custom action with a % at the end of the values :

customize:
  light:
    actions:
      - service: turn_on
        service_data:
          brightness: 50%
        name: Conforting Light
        icon: mdi:lightbulb-on-40
      - service: turn_on
        service_data:
          brightness: 100%
        name: Fully Lit Up
        icon: mdi:lightbulb-on

But this just create a new issue as the string is now assigend to a int value in the brightness field

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Jan 25, 2024
@nielsfaber
Copy link
Owner

I have never seen such issue, have no idea what causes this.
There is nothing wrong with your configuration, adding the % behind is not a solution, it should no be used with the brightness parameter
At the moment I’m working on a big layout change, possibly this will become fixed inherently.
For the time being, you might want to use brightness_pct instead, this parameter accept a percentage which apparently works better.

@lucas-dumartin
Copy link
Author

For the time being, you might want to use brightness_pct instead, this parameter accept a percentage which apparently works better.

I did just that and it fixed the issue
Thanks for your good work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants