Make hassfest import detection better (#29932)

* Make hassfest import detection better

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-12-16 08:22:20 +01:00
1 parent 8fe17c0933
commit 9e51a18845
6 files changed
+209 -33

No files matched your search

@@ -3,8 +3,6 @@
"name": "Filter",
"documentation": "https://www.home-assistant.io/integrations/filter",
"requirements": [],
"dependencies": [],
"codeowners": [
"@dgomes"
]
"dependencies": ["history"],
"codeowners": ["@dgomes"]
}
+2 -2
View File
@@ -8,7 +8,7 @@ import time
from sqlalchemy import and_, func
import voluptuous as vol
from homeassistant.components import recorder, script
from homeassistant.components import recorder
from homeassistant.components.http import HomeAssistantView
from homeassistant.components.recorder.models import States
from homeassistant.components.recorder.util import execute, session_scope
@@ -430,4 +430,4 @@ def _is_significant(state):
Will only test for things that are not filtered out in SQL.
"""
# scripts that are not cancellable will never change state
return state.domain != "script" or state.attributes.get(script.ATTR_CAN_CANCEL)
return state.domain != "script" or state.attributes.get("can_cancel")