Skip to content

Commit

Permalink
Fully finish the GatewayAlarm class and fix style issues (#633)
Browse files Browse the repository at this point in the history
* add new line

* remove To Do comment

Since this does not have to do with the gateway (I think)

* Fully finish the GatewayAlarm class

* black fix styles

* fix hound issue

* flake8 was wrong, black is wright

* ignore flake8 E203 error since black handles that

* Turning --> Turn

Co-Authored-By: Teemu R. <tpr@iki.fi>

* Turning --> Turn

Co-Authored-By: Teemu R. <tpr@iki.fi>

* add type return

Co-Authored-By: Teemu R. <tpr@iki.fi>

* add flake8 exception for single line

* remove global flake8 ignore

* add extra space

* add return types

* fix return types

* datatime.datetime is unknown type

* remove print()

* Reorganize classes

* Use parent and improve init

* Add Xiaomi Aqara Gateway to readme

Co-authored-by: Teemu R. <tpr@iki.fi>
  • Loading branch information
starkillerOG and rytilahti authored Mar 6, 2020
1 parent 46a1a46 commit 420b659
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 185 deletions.
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Supported devices
- :doc:`Xiaomi Mi Robot Vacuum <vacuum>` (:class:`miio.vacuum`)
- Xiaomi Mi Home Air Conditioner Companion (:class:`miio.airconditioningcompanion`)
- Xiaomi Mi Air Purifier (:class:`miio.airpurifier`)
- Xiaomi Aqara Camera (:class:`miia.aqaracamera`)
- Xiaomi Aqara Camera (:class:`miio.aqaracamera`)
- Xiaomi Aqara Gateway (:class:`miio.gateway`)
- :doc:`Xiaomi Mi Smart WiFi Socket <plug>` (:class:`miio.chuangmi_plug`)
- :doc:`Xiaomi Chuangmi Plug V1 (1 Socket, 1 USB Port) <plug>` (:class:`miio.chuangmi_plug`)
- :doc:`Xiaomi Chuangmi Plug V3 (1 Socket, 2 USB Ports) <plug>` (:class:`miio.chuangmi_plug`)
Expand Down Expand Up @@ -52,6 +53,7 @@ Home Assistant support
- `Xiaomi Smart WiFi Socket and Smart Power Strip <https://home-assistant.io/components/switch.xiaomi_miio/>`__
- `Xiaomi Universal IR Remote Controller <https://home-assistant.io/components/remote.xiaomi_miio/>`__
- `Xiaomi Mi Air Quality Monitor (PM2.5) <https://home-assistant.io/components/sensor.xiaomi_miio/>`__
- `Xiaomi Aqara Gateway Alarm <https://home-assistant.io/components/alarm_control_panel.xiaomi_miio/>`__
- `Xiaomi Mi Home Air Conditioner Companion <https://github.com/syssi/xiaomi_airconditioningcompanion>`__
- `Xiaomi Mi WiFi Repeater 2 <https://www.home-assistant.io/components/device_tracker.xiaomi_miio/>`__
- `Xiaomi Mi Smart Pedestal Fan <https://github.com/syssi/xiaomi_fan>`__
Expand Down
2 changes: 1 addition & 1 deletion miio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
from miio.aqaracamera import AqaraCamera

from miio.discovery import Discovery
from miio.gateway import Gateway
from miio.gateway import Gateway
2 changes: 0 additions & 2 deletions miio/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ class Listener:
def __init__(self):
self.found_devices = {} # type: Dict[str, Device]

# TODO add win32 check/ubuntu on windows check, as it doesn't support mdns

def check_and_create_device(self, info, addr) -> Optional[Device]:
"""Create a corresponding :class:`Device` implementation
for a given info and address.."""
Expand Down
Loading

0 comments on commit 420b659

Please sign in to comment.