Thanks - really appreciated
I was thinking of using this:
The only problem that I might have to figure a workaround for is that I am on Hassio and since it is in docker I don’t know if it can run a shell command. I had tried for something else and was having some difficulties, but I may be able to call it in python as well.
I am so hyped! I am waiting for your next big update too!
Can you show your configuration.yaml section supporting this approach?
Hello, thanks again for all the hard work. I’m having an issue trying to get the custom panel to display. I have a fresh install of hass with the same problem, but had the issue appear shortly before my fresh install too.
I get nothing but a blank screen, and have changed the javascript version to latest, tried several different browsers, and cleared all the caches.
The error that shows up in the log and web console is:
ERROR (MainThread) [frontend.js.latest.201805264] https://*hass*/frontend/panels/alarm-89a9dcd19218929b09433a87851823b2.html:248:47 Uncaught TypeError: Cannot read property 'LocalizeMixin' of undefined
Thanks in advance for any help that anyone is able to provide!
Ok so just upgraded to 0.70 (release) and alarm isn’t showing up in the front end. Getting the following error in logs:
data:text/javascript;charset=utf-8,%0A%09class%20HaPanelAlarm%20extends%20window.hassMixins.LocalizeMixin(Polymer.Element)%20%7B%0A%09%09static%20get%20is()%7B%20return%20'ha-panel-alarm'%3B%20%7D%0A%09%09%0A%09%09%2F%2F%20Element%20class%20can%20define%20custom%20element%20reactions%0A%09%09connectedCallback()%20%7B%0A%09%09%09super.connectedCallback()%3B%0A%0A%09%09%09if%20(this.alarm.attributes.weather)%7B%0A%09%09%09%09this.getWeather()%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09ready()%7B%0A%09%09%09super.ready()%3B%0A%20%20%20%20%09%09this.loadResources()%3B%0A%09%09%09this.hideSensors%20%3D%20this.alarm.attributes.hide_sensor_groups%0A%09%09%09this.hideCustom%20%20%3D%20this.alarm.attributes.hide_custom_panel%0A%0A%09%09%09this.errors%20%3D%20%5B%5D%3B%0A%09%09%09if%20(this.alarm.attributes.hide_sidebar%20%3D%3D%20true)%09this.toggleSidebar()%3B%0A%20%20%09%09%7D%0A%0A%09%20%20%09static%20get%20properties()%7B%0A%20%20%20%20%09%09return%20%7B%0A%09%09%09%09hass%3A%20%20%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Object%20%7D%2C%0A%09%09%09%09panel%3A%20%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Object%20%7D%2C%0A%09%09%09%09narrow%3A%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20false%20%7D%2C%0A%09%09%09%09showMenu%3A%20%20%20%20%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20false%20%7D%2C%0A%0A%09%09%09%09alarm%3A%20%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Object%2C%20observer%3A%20'monitorAlarm'%20%7D%2C%0A%0A%09%09%09%09%2F%2F%20Sensor%20Groups%0A%09%09%09%09immediate%3A%20%20%20%20%20%20%20%7B%20type%3A%20Array%2C%20computed%3A%20'computeSensors(hass%2C%20alarm.attributes.immediate)'%20%7D%2C%0A%09%09%09%09delayed%3A%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Array%2C%20computed%3A%20'computeSensors(hass%2C%20alarm.attributes.delayed)'%20%7D%2C%0A%09%09%09%09allsensors%3A%20%20%20%20%20%20%7B%20type%3A%20Array%2C%20computed%3A%20'computeSensors(hass%2C%20alarm.attributes.allsensors)'%7D%2C%0A%09%09%09%09overrideSensors%3A%20%7B%20type%3A%20Array%2C%20computed%3A%20'computeSensors(hass%2C%20alarm.attributes.override)'%20%7D%2C%0A%09%09%09%09ignored%3A%20%09%09%20%7B%20type%3A%20Array%2C%20computed%3A%20'computeSensors(hass%2C%20alarm.attributes.ignored)'%20%7D%2C%0A%0A%09%09%09%09opencount%3A%20%20%20%20%20%20%20%7B%20type%3A%20Number%2C%20value%3A%200%20%7D%2C%0A%0A%09%09%09%09time%3A%20%20%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Object%20%7D%2C%0A%09%09%09%09weather%3A%09%20%20%20%20%20%7B%20type%3A%20Object%20%7D%2C%0A%09%09%09%09temp%3A%09%20%20%20%20%20%20%20%20%20%7B%20type%3A%20String%20%7D%2C%0A%0A%09%09%09%09code%3A%20%20%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20String%2C%20value%3A%20''%20%7D%2C%0A%09%09%09%09display_code%3A%20%20%20%20%7B%20type%3A%20String%2C%20value%3A%20''%20%7D%2C%0A%0A%09%09%09%09timeoutID%3A%20%20%20%20%20%20%20%7B%20type%3A%20Number%20%7D%2C%0A%0A%09%09%09%09cleanup%3A%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Array%2C%20value%3A%20%5B%5D%20%7D%2C%0A%09%09%09%09attemptedArm%3A%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20false%20%7D%2C%20%0A%09%09%09%09screensaver%3A%20%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20false%20%7D%2C%0A%09%09%09%09settings%3A%09%20%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20false%20%7D%2C%0A%0A%09%09%09%09%2F%2FENUMS%20USED%20FOR%20CSS%20CLASS%20SELECTION%0A%09%09%09%09panel_locked%3A%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20false%20%7D%2C%0A%0A%09%09%09%09hideSensors%3A%20%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20true%20%7D%2C%0A%09%09%09%09hideCustom%3A%20%20%20%20%20%20%7B%20type%3A%20Boolean%2C%20value%3A%20true%20%7D%2C%0A%09%09%09%09notificationAnim%3A%20%7B%20type%3A%20String%2C%20value%3A%20'remove'%20%7D%2C%0A%0A%09%09%09%09errors%3A%20%20%20%20%20%20%20%20%20%20%7B%20type%3A%20Array%2C%20value%3A%20%5B%5D%20%7D%2C%20%0A%09%09%09%09version%3A%20%20%20%20%20%20%20%20%20%7B%20type%3A%20String%2C%20value%3A%20'1.1.0'%7D%2C%20%0A%09%20%20%09%09%7D%3B%0A%09%20%20%09%7D%0A%0A%09%09%2F%2F%20Polymer%20observers%20definition%0A%09%09static%20get%20observers()%20%7B%0A%20%20%09%09%09return%20%5B%0A%20%20%20%20%09%09%09'onPanelUpdate(hass%2C%20panel)'%2C%0A%20%20%20%20%09%09%09'updateTime(hass)'%0A%20%20%09%09%09%5D%0A%09%09%7D%0A%0A%09%09error(message)%7B%0A%09%09%09this.errors.push(message)%3B%0A%09%09%09console.log(message)%3B%0A%09%09%7D%0A%0A%09%09computeValue(entity)%7B%0A%09%09%20%20%20%09if%20(entity%20%3D%3D%20undefined)%7B%0A%09%09%09%20%20%20%20return%20false%3B%0A%09%09%09%7D%20else%20%7B%0A%09%09%09%20%20%20%20return%20entity%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09toggleCSS(ev)%7B%0A%09%09%09ev.stopPropagation()%3B%0A%09%09%09var%20css%20%3D%20ev.target.getAttribute('data-css')%3B%0A%09%09%09%09switch%20(css)%7B%0A%09%09%09%09case%20'sensors'%3A%20this.hideSensors%20%3D%20!this.hideSensors%3B%0A%09%09%09%09%09break%3B%0A%09%09%09%09case%20'custom'%3A%20this.hideCustom%20%3D%20!this.hideCustom%3B%0A%09%09%09%09%09break%3B%0A%09%09%09%09case%20'notification'%3A%20%0A%09%09%09%09%09if%20(this.notificationAnim%20%3D%3D%20%22zoomIn%22)%7B%0A%09%09%09%09%09%09this.notificationAnim%20%3D%20%22zoomOut%20remove%22%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%09else%20this.notificationAnim%20%3D%20%22zoomIn%22%3B%0A%09%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09toggleSidebar()%7B%0A%09%09%09if%20(this.alarm)%20if(this.alarm.state%20!%3D%20'disarmed')%20this.fire('hass-close-menu')%3B%0A%09%09%09this.async(this.toggleSidebar%2C%20100)%3B%0A%09%09%7D%0A%0A%09%09monitorAlarm()%7B%0A%09%09%09var%20countdownTimerDiv%20%3D%20Polymer.dom(this.root).querySelector('%23countdown360_countdown')%3B%0A%09%09%09if%20(countdownTimerDiv)%20countdownTimerDiv.remove()%3B%0A%0A%09%09%09this.updateStyles(%7B'--countdown-timer-display'%3A%20'none'%7D)%3B%0A%09%09%09this.updateStyles(%7B'--time-display'%3A%20'initial'%7D)%3B%0A%09%09%09if%20(this.alarm.state%20%3D%3D%20'disarmed')%7B%0A%09%09%09%09if%20(this.attemptedArm%20%3D%3D%20true)%7B%20this.resetButtons()%3B%20%7D%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22disarmed%22%5D%7D)%3B%0A%09%09%09%7D%20else%20if%20(this.alarm.state%20%3D%3D%20'armed_away')%7B%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22armed_away%22%5D%7D)%3B%0A%09%09%09%7D%20else%20if%20(%20this.alarm.state%20%3D%3D%20'armed_home')%7B%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22armed_home%22%5D%7D)%3B%0A%09%09%09%7D%20else%20if%20(%20this.alarm.state%20%3D%3D%20'armed_perimeter')%7B%0A%09%09%20%20%20%20%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22perimeter%22%5D%7D)%3B%20%2F%2FSORT%20THIS%20OUT%0A%09%09%09%7D%20else%20if%20(this.alarm.state%20%3D%3D%20'pending')%7B%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22pending%22%5D%7D)%3B%0A%09%09%09%09this.updateStyles(%7B'--countdown-timer-display'%3A%20'initial'%7D)%3B%0A%09%09%09%09this.updateStyles(%7B'--time-display'%3A%20'none'%7D)%3B%0A%09%09%09%09this.loadTimer(false%2C%20this.alarm.attributes.pending_time_by_state%5Bthis.alarm.attributes.arm_state%5D)%3B%0A%09%09%09%7D%20else%20if%20(this.alarm.state%20%3D%3D%20'warning')%7B%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22warning%22%5D%7D)%3B%0A%09%09%09%09this.updateStyles(%7B'--countdown-timer-display'%3A%20'initial'%7D)%3B%0A%09%09%09%09this.updateStyles(%7B'--time-display'%3A%20'none'%7D)%3B%0A%09%09%09%09this.loadTimer(false%2C%20this.alarm.attributes.pending_time_by_state%5Bthis.alarm.attributes.arm_state%5D)%3B%0A%09%09%09%7D%20else%20if%20(this.alarm.state%20%3D%3D%20'triggered')%7B%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20this.alarm.attributes.colours%5B%22triggered%22%5D%7D)%3B%0A%09%09%09%7D%0A%09%09%09if%20(this.alarm.attributes.panel_locked%20%3D%3D%20true)%7B%0A%09%09%09%09console.log(%22Panel%20locked%22)%3B%0A%09%09%09%09this.updateStyles(%7B'--primary-color'%3A%20'grey'%7D)%3B%20%2F%2F%5BTODO%5D%20Implement%20panel%20locked%20colour%20-%20this.alarm.attributes.colours%5B%22panel_locked%7D)%3B%0A%09%09%09%09this.updateStyles(%7B'--countdown-timer-display'%3A%20'initial'%7D)%3B%0A%09%09%09%09this.updateStyles(%7B'--time-display'%3A%20'none'%7D)%3B%0A%09%09%09%09this.loadTimer(true%2C%20this.alarm.attributes.passcode_attempt_timeout)%3B%0A%09%09%09%09this.panel_locked%20%3D%20true%3B%0A%09%09%09%7D%0A%09%09%09else%20this.panel_locked%20%3D%20false%3B%0A%09%09%7D%0A%0A%09%09getClass(cssClass)%7B%0A%09%09%09return%20cssClass%20%3F%20%22slideup%22%20%3A%20%22slidedown%22%3B%0A%09%09%7D%0A%0A%09%09loadTimer(locked%2C%20time)%7B%0A%09%09%09var%20startColour%20%3D%20'%238ac575'%3B%0A%09%09%09var%20middleColour%20%3D%20'orange'%3B%0A%09%09%09var%20endColour%20%3D%20'red'%0A%0A%09%09%09if%20(locked%20%3D%3D%20true)%20startColour%20%3D%20middleColour%20%3D%20endColour%20%3D%20'red'%3B%0A%0A%09%09%09var%20countdownDiv%20%3D%20Polymer.dom(this.root).querySelector('%23countdown')%3B%0A%09%09%09%24(countdownDiv).unbind().removeData()%3B%0A%09%09%09var%20countdown%20%3D%20%24(countdownDiv).countdown360(%0A%09%09%09%7B%0A%09%09%09%09radius%20%20%20%20%20%20%3A%2050%2C%0A%09%09%09%09fontColor%20%20%20%3A%20'%23FFFFFF'%2C%0A%09%09%09%09autostart%20%20%20%3A%20false%2C%0A%09%09%09%09label%20%20%20%20%20%20%20%3A%20false%2C%0A%09%09%09%09smooth%20%20%20%20%20%20%3A%20true%2C%0A%09%09%09%09seconds%20%20%20%20%20%3A%20time%2C%0A%09%09%09%09fillStyle_0to50%3A%20startColour%2C%0A%09%09%09%09fillStyle_50to75%3A%20middleColour%2C%0A%09%09%09%09fillStyle_75to100%3A%20endColour%0A%09%09%09%7D)%3B%0A%09%09%09countdown.start()%3B%0A%09%09%7D%0A%0A%09%20%20%20%20getWeather()%7B%0A%09%09%09this.weather%20%3D%20this.hass.states%5B'sensor.weather_summary'%5D%3B%0A%09%09%09%2F%2Fif%20the%20above%20sensor%20can't%20be%20found%20then%20try%20dark_sky%0A%09%09%09if%20(this.weather%20%3D%3D%20null)%7B%0A%09%09%09%09this.weather%20%3D%20this.hass.states%5B'sensor.dark_sky_summary'%5D%3B%0A%09%09%09%7D%20%0A%09%09%09%2F%2FNo%20weather%20entity%20found%20display%20error%0A%09%09%09if%20(this.weather%20%3D%3D%20null)%7B%20%0A%09%09%09%09this.error(%22Weather%20entity%20not%20found%20in%20HA%22)%3B%0A%09%09%09%7D%20%0A%0A%09%09%09%2F%2Fset%20weather%20temperature%0A%09%09%09if%20(this.hass.states%5B'sensor.weather_temperature'%5D)%7B%0A%09%09%09%09this.temp%20%3D%20Math.ceil((this.hass.states%5B'sensor.weather_temperature'%5D).state)%3B%0A%09%09%09%7D%0A%09%09%09%2F%2Fif%20the%20above%20sensor%20is%20not%20found%20look%20for%20the%20dark%20sky%20one%0A%09%09%09else%20if%20(this.hass.states%5B'sensor.dark_sky_temperature'%5D)%7B%0A%09%09%09%09this.temp%20%3D%20Math.ceil((this.hass.states%5B'sensor.dark_sky_temperature'%5D).state)%3B%0A%09%09%09%7D%0A%09%09%09%2F%2Fif%20either%20isn't%20found%20show%20an%20error%0A%09%09%09else%20%7B%0A%09%09%09%09this.error(%22Weather%20temperature%20entity%20not%20found%20in%20HA%22)%3B%0A%09%09%09%7D%0A%09%20%20%20%20%7D%0A%0A%09%09updateTime(hass)%7B%0A%09%09%09if%20(this.alarm.attributes.clock)%7B%0A%09%09%09%09this.time%20%3D%20this.hass.states%5B'sensor.time'%5D%3B%0A%0A%09%09%09%09if%20(this.time%20%3D%3D%20null)%7B%0A%09%09%09%09%09this.error(%22Time%20Sensor%20(sensor.time)%20not%20found%20in%20HA%22)%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09isdisarmed(alarm)%7B%20%0A%09%09%09return%20alarm.state%20%3D%3D%20%22disarmed%22%3B%20%0A%09%09%7D%0A%09%09%20%20%20%20%0A%09%20%20%20%20isperimeter(alarm)%7B%20%0A%09%20%20%20%20%09return%20alarm.state%20%3D%3D%20%22armed_perimeter%22%3B%20%0A%09%20%20%20%20%7D%0A%09%09%20%20%20%0A%09%20%20%20%20issecureall()%7B%20%0A%09%20%20%20%20%09return%20this.opensensors(alarm%2C%20all).length%20%3D%3D%200%3B%20%0A%09%20%20%20%20%7D%0A%0A%09%09opensensors(alarm%2C%20all)%20%20%20%7B%20%0A%09%09%09var%20ret%20%3D%20%5B%5D%3B%0A%09%09%09if%20(all%20%3D%3D%20false)%7B%0A%09%09%09%09return%20false%3B%0A%09%09%09%7D%20else%20%7B%0A%09%09%09%09ret%20%3D%20all.filter(function%20(e)%7B%20return%20alarm.attributes.supported_statuses_on.indexOf(e.state.toLowerCase())%20%3E%20-1%3B%20%7D)%3B%20%0A%09%09%09%09this.opencount%20%3D%20ret.length%3B%0A%09%09%09%09return%20ret%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09closedsensors(alarm%2C%20all)%20%20%20%7B%0A%09%09%09var%20ret%20%3D%20%5B%5D%3B%0A%09%09%09if%20(all%20%3D%3D%20false)%7B%0A%09%09%09%09return%20false%3B%0A%09%09%09%7D%20else%20%7B%0A%09%09%09%09ret%20%3D%20all.filter(function%20(e)%7B%20return%20alarm.attributes.supported_statuses_off.indexOf(e.state.toLowerCase())%20%3E%20-1%3B%20%7D)%3B%0A%09%09%09%09return%20ret%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09computeSensors(hass%2C%20ids)%7B%0A%09%09%09if%20(ids%20%3D%3D%20undefined)%7B%0A%09%09%09%2F%2F%20Control%20the%20exception%20when%20this.alarm%20is%20not%20ready%0A%09%09%09%09return%20false%3B%0A%09%09%09%7D%20else%20%7B%0A%09%09%09%09return%20ids.map(function%20(key)%7B%20return%20hass.states%5Bkey%5D%3B%20%7D).filter(function%20(e)%7B%20return%20e%20!%3D%20undefined%3B%20%7D)%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09computeArray(array)%7B%0A%09%09%09if%20(array.length%20%3E%200)%7B%0A%09%09%09%09return%20true%3B%0A%09%09%09%7D%0A%09%09%09return%20false%3B%0A%09%09%7D%0A%0A%09%09computeIcon(state)%7B%0A%09%09%09switch%20(state)%7B%0A%09%09%09%09case%20'disarmed'%3A%20%20%20%20%20%20%20%20return%20'mdi%3Ashield-outline'%3B%0A%09%09%09%09case%20'armed_away'%3A%20%20%20%20%20%20return%20'mdi%3Asecurity-home'%3B%0A%09%09%09%09case%20'armed_home'%3A%20%20%20%20%20%20return%20'mdi%3Asecurity-home'%3B%0A%09%09%09%09case%20'pending'%3A%20%20%20%20%20%20%20%20%20return%20'mdi%3Awalk'%3B%0A%09%09%09%09case%20'warning'%3A%20%20%20%20%20%20%20%20%20return%20'mdi%3Arun'%3B%0A%09%09%09%09case%20'triggered'%3A%20%20%20%20%20%20%20return%20'mdi%3Aalert-circle'%3B%0A%09%09%09%09case%20'armed_perimeter'%3A%20return%20'mdi%3Asecurity-home'%3B%0A%09%09%09%7D%0A%09%09%09return%20'mdi%3Ahelp'%3B%0A%09%09%7D%0A%0A%09%09computeLabel(state)%7B%0A%09%09%09switch%20(state)%7B%0A%09%09%09%09case%20'disarmed'%3A%20%20%20%09%20return%20'disarmed'%3B%0A%09%09%09%09case%20'armed_away'%3A%20%09%20return%20'away'%3B%0A%09%09%09%09case%20'armed_home'%3A%20%09%20return%20'home'%3B%0A%09%09%09%09case%20'pending'%3A%20%20%20%20%09%20return%20'leave'%3B%0A%09%09%09%09case%20'warning'%3A%20%20%20%20%09%20return%20'warning'%3B%0A%09%09%09%09case%20'triggered'%3A%20%20%09%20return%20'triggered'%3B%0A%09%09%09%09case%20'armed_perimeter'%3A%20return%20'perimeter'%3B%0A%09%09%09%7D%0A%09%09%09return%20state%3B%0A%09%09%7D%0A%0A%09%09callcode(ev)%7B%0A%09%09%09ev.stopPropagation()%3B%0A%09%09%09var%20digit%20%3D%20ev.target.getAttribute('data-digit')%3B%0A%09%09%09this.code%20%3D%20this.code%20%2B%20digit%3B%0A%09%09%09var%20display_digit%20%3D%20digit%3B%0A%09%09%09if%20(this.alarm.attributes.hide_passcode)%7B%0A%09%09%09%20%20display_digit%20%3D%20'*'%3B%0A%09%09%09%7D%0A%09%09%09this.display_code%20%3D%20this.display_code%20%2B%20display_digit%3B%0A%09%09%7D%0A%0A%09%09callclearcode(ev)%7B%0A%09%09%09ev.stopPropagation()%3B%0A%09%09%09this.code%20%3D%20''%3B%0A%09%09%09this.display_code%20%3D%20''%3B%0A%09%09%7D%0A%0A%09%09callService(ev)%7B%0A%09%09%09ev.stopPropagation()%3B%0A%09%09%09var%20call%20%3D%20ev.target.getAttribute('data-call')%3B%0A%09%09%09if%20(call%20%3D%3D%20'cancel')%7B%20%2F%2Fcancel%20alarm%20set%20and%20return%20page%20to%20default%20settings%0A%09%09%09%09this.resetButtons()%3B%0A%09%09%09%7D%20else%20if%20(ev.target.getAttribute('data-override'))%7B%20%2F%2FOverride%20of%20open%20sensors%20has%20been%20pressed%20so%20activate%20alarm%0A%09%09%09%09this.hass.callService('alarm_control_panel'%2C%20call%2C%20%7B'entity_id'%3A%20this.alarm.entityId%2C%20'code'%3A%20this.code%7D)%3B%0A%09%09%09%7D%20else%20if%20((call%20%3D%3D%20'alarm_arm_home'%20%7C%7C%20call%20%3D%3D%20'alarm_arm_away'%20%7C%7C%20call%20%3D%3D%20'alarm_arm_night')%20%26%26%20this.checkOpenSensors(call))%7B%20%2F%2FCheck%20if%20trying%20to%20activate%20home%20with%20open%20sensors.%20If%20so%20ping%20the%20warning%20message%0A%09%09%09%09console.log('WARNING%20open%20sensors')%3B%0A%09%09%09%7D%20else%20%7B%20%2F%2FNo%20open%20sensors%20or%20another%20service%20call%0A%09%09%09%09this.hass.callService('alarm_control_panel'%2C%20call%2C%20%7B'entity_id'%3A%20this.alarm.entityId%2C%20'code'%3A%20this.code%20%7D)%3B%0A%09%09%09%09this.code%20%3D%20''%3B%0A%09%09%09%09this.display_code%20%3D%20''%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09checkOpenSensors(call)%7B%0A%09%09%09if%20(this.opencount%20%3D%3D%200)%20return%20false%3B%20%2F%2Fcheck%20to%20see%20how%20many%20open%20sensors%20there%20are%2C%20if%20none%20arm%20alarm%0A%0A%09%09%09for%20(var%20sensor%20in%20this.allsensors)%7B%20%2F%2Fcheck%20to%20see%20if%20the%20open%20sensor%20is%20one%20to%20ignore%2C%20if%20so%20arm%20alarm%0A%09%09%09%09%2F%2Fis%20it%20open%3F%0A%09%09%09%09if%20(%5B'on'%2C%20'open'%2C%20'true'%2C%20'detected'%2C%20'unlocked'%5D.indexOf(this.allsensors%5Bsensor%5D.state.toLowerCase())%20%3E%20-1)%7B%20%2F%2Fyes%0A%09%09%09%09%2F%2Fis%20it%20in%20the%20override%20list%3F%0A%09%09%09%09%09if%20(this.ovverideSensors%20%3D%3D%20null%20%7C%7C%20this.overrideSensors.indexOf(this.allsensors%5Bsensor%5D)%20%3D%3D%20-1)%7B%20%2F%2FNo%3A%20return%20so%20display%20message%0A%09%09%09%09%09%09this.attemptedArm%20%3D%20true%3B%20%2F%2Fdisplay%20the%20warning%20message%20and%20shake%0A%0A%09%09%09%09%09%09var%20btnArmHome%20%20%20%20%20%20%3D%20Polymer.dom(this.root).querySelector('%23arm-home')%3B%0A%09%09%09%09%09%09var%20btnArmAway%20%20%20%20%20%20%3D%20Polymer.dom(this.root).querySelector('%23arm-away')%3B%0A%0A%09%09%09%09%09%09if%20(this.alarm.attributes.perimeter_mode)%7B%0A%09%09%09%09%09%09%09var%20btnArmPerimeter%20%3D%20Polymer.dom(this.root).querySelector('%23arm-perimeter')%3B%0A%09%09%09%09%09%09%09btnArmPerimeter.classList.add('remove')%3B%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09btnArmHome.classList.add('big')%3B%0A%09%09%09%09%09%09btnArmAway.classList.add('little')%3B%0A%0A%09%09%09%09%09%09this.override%20%3D%20document.createAttribute(%22data-override%22)%3B%0A%09%09%09%09%09%09this.override.value%20%3D%20%22true%22%3B%0A%09%09%09%09%09%09btnArmHome.setAttributeNode(this.override)%3B%0A%0A%09%09%09%09%09%09var%20arm_mode%20%3D%20document.createAttribute(%22data-call%22)%3B%0A%09%09%09%09%09%09arm_mode.value%20%3D%20call%3B%0A%09%09%09%09%09%09btnArmHome.setAttributeNode(arm_mode)%3B%0A%0A%09%09%09%09%09%09var%20arm_mode2%20%3D%20document.createAttribute(%22data-call%22)%3B%0A%09%09%09%09%09%09arm_mode2.value%20%3D%20'cancel'%3B%0A%09%09%09%09%09%09btnArmAway.setAttributeNode(arm_mode2)%3B%0A%09%09%09%09%09%09btnArmHome.innerHTML%20%3D%20'Override%20Sensors%20and%20Arm%20Alarm'%3B%0A%09%09%09%09%09%09btnArmAway.innerHTML%20%3D%20'Cancel%20Arm'%3B%0A%0A%09%09%09%09%09%09var%20pageContent%20%3D%20Polymer.dom(this.root).querySelector('.content')%3B%0A%09%09%09%09%09%09pageContent.classList.add('shake')%3B%0A%0A%09%09%09%09%09%09return%20true%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%20%20%20%20%20%20%20%20%20%20%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09resetButtons()%7B%0A%09%09%09this.attemptedArm%20%3D%20false%3B%0A%0A%09%09%09var%20pageContent%20%3D%20Polymer.dom(this.root).querySelector('.content')%3B%0A%09%09%09pageContent.classList.remove('shake')%3B%0A%0A%09%09%09var%20btnArmHome%20%20%20%20%20%20%3D%20Polymer.dom(this.root).querySelector('%23arm-home')%3B%0A%09%09%09var%20btnArmAway%20%20%20%20%20%20%3D%20Polymer.dom(this.root).querySelector('%23arm-away')%3B%0A%09%09%09if%20(this.alarm.attributes.perimeter_mode)%7B%0A%09%09%09%09var%20btnArmPerimeter%20%3D%20Polymer.dom(this.root).querySelector('%23arm-perimeter')%3B%0A%09%09%09%09btnArmPerimeter.classList.remove('remove')%3B%0A%09%09%09%7D%0A%09%09%09btnArmHome.classList.remove('big')%3B%0A%09%09%09btnArmAway.classList.remove('little')%3B%0A%0A%09%09%09%2F%2Fvar%20override%20%3D%20document.createAttribute(%22data-override%22)%3B%0A%09%09%09btnArmHome.removeAttributeNode(this.override)%3B%0A%0A%09%09%09var%20arm_mode%20%3D%20document.createAttribute(%22data-call%22)%3B%0A%09%09%09arm_mode.value%20%3D%20'alarm_arm_home'%3B%0A%09%09%09btnArmHome.setAttributeNode(arm_mode)%3B%0A%0A%09%09%09var%20arm_mode2%20%3D%20document.createAttribute(%22data-call%22)%3B%0A%09%09%09arm_mode2.value%20%3D%20'alarm_arm_away'%3B%0A%09%09%09btnArmAway.setAttributeNode(arm_mode2)%3B%0A%0A%09%09%09btnArmHome.innerHTML%20%3D%20%22%3Ciron-icon%20icon%3D'mdi%3Alock-outline'%3E%3C%2Firon-icon%3E%26nbsp%3BHome%20Mode%22%3B%0A%09%09%09btnArmAway.innerHTML%20%3D%20%22%3Ciron-icon%20icon%3D'mdi%3Alock'%3E%3C%2Firon-icon%3E%26nbsp%3BAway%20Mode%22%3B%0A%09%09%7D%0A%0A%09%09entityTapped(ev)%7B%0A%09%09%09ev.stopPropagation()%3B%0A%09%09%09var%20entityId%20%3D%20ev.target.getAttribute('data-entity')%3B%0A%09%09%09this.fire('hass-more-info'%2C%20%7B%20entityId%3A%20entityId%20%7D)%3B%0A%09%09%7D%0A%0A%09%09%2F%2F%20Observer%3A%20polymer%20gaurantees%20that%20this%20won't%20be%20called%20util%20hass%20and%20panel%20are%20both%20defined%0A%09%09onPanelUpdate(hass%2C%20panel)%7B%0A%09%09%09this.alarm%20%3D%20hass.states%5Bpanel.config.alarmid%5D%3B%0A%09%09%7D%0A%09%7D%0A%09customElements.define(HaPanelAlarm.is%2C%20HaPanelAlarm)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Fapt.codes%3A8123%2Ffrontend%2Fpanels%2Falarm-89a9dcd19218929b09433a87851823b2.html.js%0A:2:46 TypeError: undefined is not an object (evaluating 'window.hassMixins.LocalizeMixin')
08:33 components/system_log/__init__.py (ERROR)
Safari showing this error in console:
[Error] TypeError: undefined is not an object (evaluating 'window.hassMixins.LocalizeMixin')
Global Code (data:text/javascript;charset=utf-8,%0A…%0A:2)
Any ideas?
I seem to have a similar issue in 0.70. Worked perfect in 0.69.
Yeah it’s a breaking change: https://developers.home-assistant.io/blog/2018/05/22/custom-ui-panels-api.html
Ah figured as much. Thought a fix would have been implemented. There seems to be a fall back but not sure how its implemented.
@gazoscalvertos any chance of a hot fix?
I could have sworn this was happening to me before .70. Maybe I updated to the beta without realizing. I’ll probably roll back to .69 until a fix is made. Nothing in .70 is more appealing to me this far
See I wanted to play with FaceBox soooo… Upgrade
Hope you updated the alarm.html soon as there is breadking change which couldn’t load the alarm anymore.
Ok, so .70 has broke the interface.
Will post an urgent update soon
Great stuff
Any update on the fix?
I would rollback to 69.1 till fix is out and tested
Ok folks, code is up on the repo.
Should only require you to update panels/alarm.html
Could you test fly this and post results please?
HI
Whilst it looks like it working and arming and disarming the alarm works, i get the following errors inthe log
018-05-29 21:02:51 ERROR (MainThread) [frontend.js.latest.201805264] http://10.0.0.18:8123/frontend/panels/alarm-8f550bd10f0a305e50f5934163775b21.html:364:9 Uncaught TypeError: this.async is not a function
2018-05-29 21:03:39 ERROR (MainThread) [frontend.js.latest.201805264] http://10.0.0.18:8123/frontend/panels/alarm-8f550bd10f0a305e50f5934163775b21.html:364:9 Uncaught TypeError: this.async is not a function
2018-05-29 21:03:51 ERROR (MainThread) [frontend.js.latest.201805264] http://10.0.0.18:8123/frontend/panels/alarm-8f550bd10f0a305e50f5934163775b21.html:363:60 Uncaught TypeError: this.fire is not a function
After update alarm.html VERSION: 1.1.1
Everything works perfect.
PASS: Test on raspbian stretch lite + ha 0.70.0 + rp3b
PASS: Test on raspbian stretch lite + ha 0.70.0 + rp3b+
PASS: Test on hassbian + ha 0.70.0 + rp3b
PASS: Test on hassbian + ha 0.70.0 + rp3b+
For people who got frontend.js.latest error ************
please change your javascript_version to auto / from what I read auto support more browser
frontend:
javascript_version: auto
Thanks, it looks as though 0.70 prevents access to locking down the sidebar when armed. Will have to figure out another solution to that