akasma74 / Hass-Custom-Alarm

It is a fork of "Yet another take on a home assistant custom alarm" that will exist until its author is back to our Earth
79 stars 29 forks source link

The integration doesn't start with default config #16

Closed mclaudiopt closed 5 years ago

mclaudiopt commented 5 years ago

hello i get this error on the log

  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 410, in async_setup_platform
    alarm = BWAlarm(hass, config, mqtt)
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 431, in __init__
    self.init_variables()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 570, in init_variables
    arm_states_dict = self._config[CONF_STATES]
KeyError: 'states'

what can i do? thanks

akasma74 commented 5 years ago

Can you edit your issue to make it a proper one? Otherwise I won't be able to help you as I can't see THAT far..

johntdyer commented 5 years ago

FWIW I am also running into this

Installed via HAC's

Version. 1.4 Hass version 0.95.0b1

I think its my config but I am not seeing it yet..


platform: bwalarm
name: House
code: '0711'
panic_code: '1170'
warning: automation.alarm_warning
alarm: automation.alarm_triggered
armed_away:
  pending_time: 25

armed_home:
  pending_time: 10
akasma74 commented 5 years ago

I don't know what "Installed via HAC's" is, it will be supported in the next HACS release and so far it is NOT the way to update as per this discussion.

I also don't get the bit after version info - is that another issue?

Anyway, I'd recommend to download the latest release and try it out (but read the release notes first).

mclaudiopt commented 5 years ago

hi. i manually updated, not via HAC but the error is not solvable

This component is not working! Error while setting up platform bwalarm (custom_components/bwalarm/alarm_control_panel.py) Check the Home Assistant log for more details. Home Assistant: v0.94.4

This Panel: v1.3.8_ak74

log:

2019-06-23 21:35:37 WARNING (MainThread) [custom_components.bwalarm.alarm_control_panel] [LOAD_YAML] Error loading file "/config/alarm.yaml": [Errno 2] No such file or directory: '/config/alarm.yaml'
2019-06-23 21:35:39 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up platform bwalarm
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 410, in async_setup_platform
    alarm = BWAlarm(hass, config, mqtt)
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 431, in __init__
    self.init_variables()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 570, in init_variables
    arm_states_dict = self._config[CONF_STATES]
KeyError: 'states'
akasma74 commented 5 years ago

try to download this file and save it into /config/custom_components/bwalarm folder

akasma74 commented 5 years ago

do you have that alarm.yaml file in your /config folder at all?

mclaudiopt commented 5 years ago

now i have and have this

Invalid config for [alarm_control_panel]: expected a dictionary. Got OrderedDict([('sun', OrderedDict([('monitored_conditions', ['elevation', 'sunrise', 'sunset', 'max_elevation', 'daylight']), ('scan_interval', OrderedDict([('minutes', 10)]))])), ('script', {}), ('plant', OrderedDict([('planta', OrderedDict([('sensors', OrderedDict([('moisture', 'sensor.planta_moisture'), ('battery', 'sensor.planta_battery'), ('temperature', 'sensor.planta_temperature'), ('conductivity', 'sensor.planta_conductivity'), ('brightness', 'sensor.planta_light_intensity')])), ('min_.... (See ?, line ?). Please check the docs at https://home-assistant.io/components/alarm_control_panel/
akasma74 commented 5 years ago

that's because you need to save this file to your /config folder as alarm.yaml.

I'd strongly recommen reading this and this before proceeding.

mclaudiopt commented 5 years ago

working ! thanks

akasma74 commented 5 years ago

Looks like the issue is resolved.