Removed commented code

This commit is contained in:
NjDaGreat
2024-07-09 11:36:57 +00:00
parent 43153dd61f
commit 7d016e8689
5 changed files with 0 additions and 40 deletions
@@ -14,13 +14,9 @@ from .const import DOMAIN
LOGGER = logging.getLogger(__package__)
# For your initial PR, limit it to 1 platform.
# PLATFORMS: list[Platform] = [Platform.COVER]
PLATFORMS: list[Platform] = [Platform.BUTTON]
# type FlussConfigEntry = ConfigEntry[FlussData] # noqa: F821
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Fluss+ from a config entry."""
-23
View File
@@ -44,29 +44,6 @@ class FlussApiClient:
headers={"Authorization": self._api_key},
)
# Cover functionality
# async def async_open_cover(self, deviceId: str) -> any:
# """Open the cover."""
# return await self._api_wrapper(
# method="post",
# url=f"https://zgekzokxrl.execute-api.eu-west-1.amazonaws.com/v1/api/device/{deviceId}/trigger",
# headers={"Authorization": self._api_key},
# )
# async def async_close_cover(self, deviceId: str) -> any:
# """Open the cover."""
# return await self._api_wrapper(
# method="post",
# url=f"https://zgekzokxrl.execute-api.eu-west-1.amazonaws.com/v1/api/device/{deviceId}/trigger",
# headers={"Authorization": self._api_key},
# data={
# "timeStamp": int(
# datetime.datetime.now().timestamp() * 1000
# ), # Convert to milliseconds
# "metaData": {},
# },
# )
async def async_trigger_device(self, deviceId: str) -> typing.Any:
"""Trigger the device."""
timestamp = int(datetime.datetime.now().timestamp() * 1000)
-4
View File
@@ -19,12 +19,8 @@ async def async_setup_entry(
"""Set up the Fluss Devices."""
api: FlussApiClient = hass.data[DOMAIN][entry.entry_id]
# for device in await api.async_get_devices():
# LOGGER.warning("INFO %s", device)
# # async_add_entities(FlussDevice() for device in )
devices = await api.async_get_devices()
# LOGGER.warning("Devices %s", devices)
if isinstance(devices, dict) and "devices" in devices:
devices = devices["devices"]
@@ -29,7 +29,6 @@ class PlaceholderHub:
async def authenticate(self) -> bool:
"""Test if we can authenticate with the host."""
# Actual authentication logic should be here.
return True
@@ -44,12 +43,6 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
if not await hub.authenticate():
raise InvalidAuth
# If you cannot connect:
# throw CannotConnect
# If the authentication is wrong:
# InvalidAuth
# Return info that you want to store in the config entry.
return {"title": "Fluss+"}
-2
View File
@@ -38,5 +38,3 @@ class FlussEntity(Entity):
async def async_update(self) -> None:
"""Update state, called by HA if there is a poll interval and by the service homeassistant.update_entity."""
# _LOGGER.debug("(%s) Updating entity", self.entry.data[])
# await self.device.status_query()