natekspencer / hacs-vivint

Home Assistant integration for a Vivint home security system.
MIT License
66 stars 5 forks source link

Vivint Automation Error under HA 2021.7.1 #7

Closed dspille closed 3 years ago

dspille commented 3 years ago

I'm getting an error related to my Vivint automation on HA release 2021.7.1. Any ideas?

Source: components/device_automation/__init__.py:91
First occurred: 3:16:31 PM (2 occurrences)
Last logged: 3:16:31 PM

Invalid config for [automation]: Integration 'vivint' does not support device automation triggers (See /config/configuration.yaml, line 250).
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 85, in async_get_device_automation_platform
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 498, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 503, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/vivint/device_trigger.py", line 6, in <module>
    from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
ImportError: cannot import name 'TRIGGER_BASE_SCHEMA' from 'homeassistant.components.device_automation' (/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 104, in _try_async_validate_config_item
    config = await async_validate_config_item(hass, config, full_config)
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 72, in async_validate_config_item
    config[CONF_TRIGGER] = await async_validate_trigger_config(
  File "/usr/src/homeassistant/homeassistant/helpers/trigger.py", line 49, in async_validate_trigger_config
    conf = await platform.async_validate_trigger_config(hass, conf)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/trigger.py", line 17, in async_validate_trigger_config
    platform = await async_get_device_automation_platform(
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 91, in async_get_device_automation_platform
    raise InvalidDeviceAutomationConfig(
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: Integration 'vivint' does not support device automation triggers
natekspencer commented 3 years ago

@dspille it looks like TRIGGER_BASE_SCHEMA was renamed to DEVICE_TRIGGER_BASE_SCHEMA via https://github.com/home-assistant/core/pull/51719 and released in 2021.7.1. I'll get an update in and push it.

natekspencer commented 3 years ago

This should be fixed in release 2021.7.0.

dspille commented 3 years ago

@natekspencer I applied the update, and all is well. Much thanks!