Skip to content

Commit

Permalink
#59 add compatibility to previous HA versions (before 2022.7)
Browse files Browse the repository at this point in the history
  • Loading branch information
slashback100 committed Jul 1, 2022
1 parent 421c75c commit 70c4ca5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion custom_components/presence_simulation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
from homeassistant.components.recorder import get_instance
import homeassistant.util.dt as dt_util
from homeassistant.const import EVENT_HOMEASSISTANT_START
from homeassistant.components.recorder.db_schema import States, StateAttributes
try:
from homeassistant.components.recorder.db_schema import States, StateAttributes
except ImportError:
from homeassistant.components.recorder.models import States, StateAttributes
from homeassistant.components.recorder.const import DATA_INSTANCE
from .const import (
DOMAIN,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/presence_simulation/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"issue_tracker": "https://github.com/slashback100/presence_simulation/issues",
"dependencies": ["history", "recorder", "scene"],
"config_flow": true,
"version": "2.0",
"version": "2.1",
"codeowners": [
"@slashback100"
],
Expand Down

0 comments on commit 70c4ca5

Please sign in to comment.