Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #55 from zweckj/main
Browse files Browse the repository at this point in the history
add remove, add lockentityfeature
  • Loading branch information
zweckj authored Jan 9, 2024
2 parents 4282d24 + 69d4d21 commit 18d6ab8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions custom_components/tedee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntry
from pytedee_async import TedeeClient

from .const import DOMAIN
Expand Down Expand Up @@ -49,7 +50,11 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):

if unload_ok:
hass.data[DOMAIN].pop(entry.entry_id)
hass.data[DOMAIN] = {}

return unload_ok


async def async_remove_config_entry_device(
hass: HomeAssistant, config_entry: ConfigEntry, device_entry: DeviceEntry
) -> bool:
"""Remove a config entry from a device."""
return True
4 changes: 2 additions & 2 deletions custom_components/tedee/lock.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from homeassistant.components.lock import SUPPORT_OPEN, LockEntity
from homeassistant.components.lock import LockEntity, LockEntityFeature
from homeassistant.const import (ATTR_BATTERY_CHARGING, ATTR_BATTERY_LEVEL,
ATTR_ID)
from homeassistant.core import callback
Expand Down Expand Up @@ -127,7 +127,7 @@ def __init__(self, lock, coordinator, entry):

@property
def supported_features(self):
return SUPPORT_OPEN
return LockEntityFeature.OPEN


async def async_unlock(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tedee/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": [],
"codeowners": ["@patrickhilker", "@joerg65", "@zweckj"],
"requirements": ["pytedee-async==0.1.4"],
"version": "2023.7.4",
"version": "2024.1.1",
"config_flow": true,
"iot_class": "cloud_polling"
}

0 comments on commit 18d6ab8

Please sign in to comment.