Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #214 from robmarkcole/fix-213
Browse files Browse the repository at this point in the history
Fix 213
  • Loading branch information
robmarkcole authored Feb 12, 2020
2 parents 35016a8 + 0db38c4 commit 5132da4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
4 changes: 4 additions & 0 deletions custom_components/huesensor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"""The huesensors component."""
import asyncio
import logging

import async_timeout

_LOGGER = logging.getLogger(__name__)


def get_bridges(hass):
from homeassistant.components import hue
Expand Down
9 changes: 4 additions & 5 deletions custom_components/huesensor/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
Binary sensor for Hue motion sensors.
"""
import asyncio
import async_timeout
import logging
import threading
from datetime import timedelta

from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import STATE_ON, STATE_OFF
import async_timeout

from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.helpers.event import async_track_time_interval

from . import get_bridges, update_api

DEPENDENCIES = ["hue"]


_LOGGER = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions custom_components/huesensor/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
from datetime import timedelta

import async_timeout

import homeassistant.util.dt as dt_util
from homeassistant.components import zone
from homeassistant.components.device_tracker import PLATFORM_SCHEMA
from homeassistant.components.device_tracker.const import (
ATTR_ATTRIBUTES,
Expand All @@ -24,11 +26,9 @@
)
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.util import slugify
from homeassistant.components import zone

from . import get_bridges, update_api

DEPENDENCIES = ["hue"]

_LOGGER = logging.getLogger(__name__)

Expand Down
10 changes: 7 additions & 3 deletions custom_components/huesensor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"name": "Hue sensor custom component",
"documentation": "https://github.com/robmarkcole/Hue-sensors-HASS",
"requirements": [],
"dependencies": ["hue"],
"codeowners": ["@robmarkcole"]
}
"dependencies": [
"hue"
],
"codeowners": [
"@robmarkcole"
]
}
14 changes: 3 additions & 11 deletions custom_components/huesensor/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,18 @@
Hue remotes.
"""
import asyncio
import async_timeout
import logging
import threading
from datetime import timedelta

from homeassistant.components.remote import (
PLATFORM_SCHEMA,
RemoteDevice,
)
from homeassistant.helpers.entity import (
Entity,
ToggleEntity,
)
import async_timeout

from homeassistant.components.remote import PLATFORM_SCHEMA, RemoteDevice
from homeassistant.helpers.entity import Entity, ToggleEntity
from homeassistant.helpers.event import async_track_time_interval

from . import get_bridges, update_api

DEPENDENCIES = ["hue"]


_LOGGER = logging.getLogger(__name__)

Expand Down

0 comments on commit 5132da4

Please sign in to comment.