Hass-Custom-Alarm
Hass-Custom-Alarm copied to clipboard
HACS installation does not work
The component:
- Current version: 1.12.6 (but shows 1.3.6 in UI)
Your setup:
- Home Assistant version: 0.113.3
- OS: Ubuntu Server LTS 20.04 with Home assistant core in Docker
- Browser name & version: Various, e.g.: Firefox (79.0), Vivaldi (3.1.1929.45), Iridium (2019.04), Chrome (84.0.4147.125), Safari (13.1.2)
Describe the bug Custom alarm is not updated in HACS. It was working, but stopped at some point (not sure when, haven't used it in a while). No upgrade is shown as available in HACS.
When completely removing, and re-installing with HACS, it shows that the correct version (1.12.6) is available and installed (config/custom_components/bwalarm/resources/panel.html
shows var _VERSION = 'v1.12.6';
).
When navigating to the Alarm panel in HA UI, it shows:
This Panel: v1.3.6_ak74
This is regardless of browser, and clearing cache.
To Reproduce
Steps to reproduce the behavior:
- Install via HACS
- Create the
config/resources
as described and copy the bwalarm folder to here. (yes, the correct one, this one, not this one) - Restart HA (as instructed by integration, but have also tried without restarting)
- Clear browser cache
- Log in to HA
- Navigate to alarm panel
Expected behavior Custom alarm working, like it used to.
Your bwalarm.yaml Have tried with my old config, but [as suggested](platform: bwalarm), I also tried with just minimal config.
platform: bwalarm
Home Assistant log
2020-08-18 08:13:54 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up bwalarm platform for alarm_control_panel
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/bwalarm/alarm_control_panel.py", line 395, in async_setup_platform
await hass.components.panel_custom.async_register_panel(
File "/usr/src/homeassistant/homeassistant/components/panel_custom/__init__.py", line 144, in async_register_panel
hass.components.frontend.async_register_built_in_panel(
File "/usr/src/homeassistant/homeassistant/components/frontend/__init__.py", line 196, in async_register_built_in_panel
raise ValueError(f"Overwriting panel {panel.frontend_url_path}")
ValueError: Overwriting panel alarm
I have also had logging on for HACS. They are too long to paste here (github won't let me). I have uploaded two different logs here (trying to start) and here (logging is on while installing)
Screenshots
Additional context
Out of curiosity, have you tried removing the alarm and installing it manually? If yes, does that make any difference?
Unfortunately, I don't use HACS (had to remove it as it was too resource-hungry) and it will be difficult to reproduce the issue. On top of that, your HA log shows that there is another problem that does not allow the panel to be setup.
If you rename that file, restart HA, clear cache and navigate to alarm panel, do you see any changes comparing to your screenshot?
No, none of those things worked. Which was very weird, and got me searching through everything I had. A locate alarm
finally helped solve it.
Apparently, I had in panel_custom.yaml:
- name: alarm
sidebar_title: Alarm
sidebar_icon: mdi:shield-home
config:
alarmid: alarm_control_panel.house ## USE THE SAME ID AS USED IN YOUR ALARM.YAML
Not sure why re-naming the panel.html and clearing cache didn't work, but cleaning this old part of the config helped. So no error in Hass_Custom_Alarm
or HACS, just some stupid leftover code that I (and others, judging from the other issue) hadn't cleaned properly.
Not sure why re-naming the panel.html and clearing cache didn't work, but cleaning this old part of the config helped.
so tell me what exactly did you do? and have it solved the issue?
In configuration.yaml
I had
panel_custom: !include config_files/panel_custom.yaml
and in my panel_custom.yaml
I had (among other things):
- name: alarm
sidebar_title: Alarm
sidebar_icon: mdi:shield-home
config:
alarmid: alarm_control_panel.house
I just removed that part from panel_custom.yaml
, cleared cache (again), installed Hass-Custom-Alarm (manually), and everything was back to normal.
I then removed Hass-Custom-Alarm again, and installed via HACS, which also works as expected now (using my old bwalarm.yaml
config).
Removing the config about panel_custom
worked. Problem solved. I was just noting that renaming panel.html
(before removing panel_custom
part) didn't change anything, and though that was odd. But yes, everything works as expected now, regardless of method of installation.