Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Script action doesn't work in element group #53

Closed
natabat opened this issue Feb 12, 2018 · 1 comment
Closed

Script action doesn't work in element group #53

natabat opened this issue Feb 12, 2018 · 1 comment

Comments

@natabat
Copy link

natabat commented Feb 12, 2018

This yaml:

- name: Garage Toggles
  elements:
    - garage_label
    - garage_area
  action:
    domain: script
    service: toggle_garage_door

results in this error:
Uncaught TypeError: Cannot read property 'elements' of undefined
URL: http://192.168.1.8:8123/local/custom_ui/floorplan/ha-floorplan.html
Line: 241, column: 46
Error: {}

The fix is pretty simple -- just add another check to the if statement on that line so it becomes:
if (elementGroup.action.data && elementGroup.action.data.elements) {

@pkozul
Copy link
Owner

pkozul commented Feb 9, 2021

Floorplan has been revamped. Please head over to to the new repo: https://github.com/ExperienceLovelace/ha-floorplan

@pkozul pkozul closed this as completed Feb 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants