-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3 changes #71
base: master
Are you sure you want to change the base?
V3 changes #71
Conversation
These changes add the config items that will work with V3 firmware. However the code will work with either V2 or V3 pysonofflan
With the r3 version of pysonofflan stored in a subdirectory of the HA custom_components directory
A single file with the component and side by side dependency of pysonofflan (v3)
README.md
Outdated
|
||
The feature is designed to only be used when there is no connection to the Itead cloud servers (e.g. if your internet connection is down, or their servers are down). As such, it is only enabled when the device is connected to your WiFi network, but unable to reach the Itead servers. You can find out more about the feature in the [Itead FAQ page](https://help.ewelink.cc/hc/en-us/articles/360007134171-LAN-Mode-Tutorial). | ||
Whilst older devices only dropped into LAN moe when the internet was unavailabel, the latest V3 firmware are designed to be used in LAN mode predominantly. Note: the eWeLink app doesn't show this very well and when you turn it to LAN mode, it doesn't report that it connect to V3 devices in this mode, so many users are unaware of this and believe the device to be connected via internet, however there is an icon against the device showing a LAN icon when using LAN mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor typos / sentence structure tweaks here - happy to tweak myself if merged though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some improvements, but please feel free to refine
switch.py
Outdated
_LOGGER.setLevel(logging.DEBUG) | ||
def __init__(self, hass, host, name, icon, device_id, api_key): | ||
|
||
from pysonofflan3 import SonoffSwitch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, I see - let's pick this up in the pysonofflan
PR thread, as this doesn't feel ideal to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, happy to discuss. It's certainly not ideal.
This reverts commit 98c64e2.
With this PR the logger gets the real package name. Due to the actual definition I was not able to correctly configure the log traces for this integration.
Real logger name
….7-to-0.108.9 Update homeassistant to 0.108.9
Rename async functions correctly
….9-to-0.109.2 Update homeassistant to 0.109.2
….2-to-0.109.3 Update homeassistant to 0.109.3
I just successfully tested Wifi enabled circuit breaker WDYK ZJSB9-80 Wifi which is also available from Hoch. The device works without any problems out of the box. Firmware is 3.4.0.
Change SwitchDevice to SwitchEnity
….3-to-0.110.1 Update homeassistant to 0.110.1
Add tested device
This PR has 2 commits in it. The first is to cover V3 firmware assuming that pysonofflan is upgraded to V3 on PyPi. The second supports deployment of this in a local directory (outside of PyPi).
Note it also contains previous PRs (on icons and removal of unecessary update calls) that have yet to be accepted into the main branch. #65