I followed Creating custom UI (https://home-assistant.io/developers/frontend_creating_custom_ui/) and created a custom state card for a light. But it does not work, instead it generates a console error as below:
Uncaught TypeError: Class constructor StateCardMyCustomLight cannot be invoked without 'new'
at new j (custom-elements-es5-adapter.js:4)
at Object.window.hassUtil.dynamicContentUpdater (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:11)
at HTMLElement.value (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:86)
at Object.k [as fn] (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
at a (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
at e (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
at HTMLElement.value (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
at HTMLElement.value (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
at HTMLElement.value (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
at HTMLElement.value (frontend-e84e1290a07d0d0a1558bfa6b421c785.html:1)
Configuration:
homeassistant:
customize:
light.study:
custom_ui_state_card: state-card-my-custom-light
frontend:
extra_html_url:
- /local/custom_ui/state-card-my-custom-light.html
The content of state-card-my-custom-light.html is identical to the state-card-my-custom-light.html file in https://home-assistant.io/developers/frontend_creating_custom_ui
Is this error related to the Polymer 2 upgrade? How can I fix ?
Thanks