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

Non Admin users can no longer activate scenes without adding the new action code. #64

Open
MrKuenning opened this issue Apr 27, 2021 · 1 comment

Comments

@MrKuenning
Copy link

MrKuenning commented Apr 27, 2021

First of all thank for you a fantastic Home Assistant addon.

After updating to 0.5 all users in my house that are not Home Assistant admins can no longer activate any of the buttons below the slider.

Logs show this error.
hacsfiles/light-popup-card/light-popup-card.js:4002:31 Uncaught TypeError: Cannot add property action, object is not extensible

The change log says that exsisting services dont need to be changed to work, but that seems to only be for admin users.
Because once I added the action call service line it now works for all users.

That brings me to the second thing I wanted to point out. The example code says to use action:call-service with no spaces.

Here is the section from the readme.

actions:
  - action:call-service
    service: scene.turn_on
    service_data:
      entity_id: scene.energie
    color: "#8BCBDD"
    name: energie
  - action:call-service
    service: homeassistant.toggle
    service_data:
      entity_id: light.voordeurlicht
    name: voordeur
    icon: mdi:lightbulb
  - action: fire-dom-event
    name: test
    browser_mod:
      command: popup
      title: 'My Title'
      card:
        type: 'custom:mini-graph-card'
        entities:
          - weather.weersverwachting

However my config errors out when I don't insert a space between action: and call-service.

After modifying all of my slider configs with action: call-service all of my home users can use the lights normally again.

TL:DR - Configs need to be changed to allow non-admin users to still use lighting presets and documentation for the scene seems to be incorrect.

@windos2k
Copy link

Great find, your solution solved my problems.

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

No branches or pull requests

2 participants