The rewrite addresses a problem with the tellstick hardware dropping
commands when too many simultaneous calls is being made from HA. Also fixes a bug when the dim level was changed externally.
This breaks previous configurations.
The new config for tellstick is
```yaml
tellstick:
signal_repetitions: X
```
Lights and Switches are detected automatically.
Sensors work like before because they do not share any functionality with the other devices and they also needs a complete other configuration.
The default configuration of the mFi controller generates self-signed
certificates which are valid for short periods of time, and which are
regnerated on start or as needed. This makes requests mad. Since most
people will be using the self-signed certificates anyway, add options
to let them choose non-TLS, or unverified connections if they want/need.
This bumps the mficlient requirement to 0.3.0 for proper handling of
verify=False.
The exception we were catching incorrectly referenced the client variable
in local scope instead of the module. Also, if we fail to connect we can
get a requests exception, so catch and handle that as well.
* Move S_LIGHT and V_LIGHT from light back to switch platform, to avoid
double devices showing.
* Remove MySensorsLightPlain class from light platform, since it's not
needed anymore.
* A light switch with only a switch, ie no dimmer or
RGB controls, will show as a regular switch device.
* Add mysensors binary sensor.
* Add discovery platforms to binary_sensor base component.
* Replace device_state_attributes with state_attributes in
binary_sensor base class.
* Fix docstrings.
* Add discovery of binary sensor to mysensors component.
* Add child.type as argument to mysensors device_class.
* Move binary sensor types from sensor to binary_sensor module.
* Fix binary_sensor attribute tests. Use state_attributes instead of
device_state_attributes.
* Make a flatter one level inheritance, with MySensorsLight as parent
with four children, one per light type.
* Break out helper methods. One per plain light, dimmer and RGB/RGBW
children and per update, turn_on and turn_off, nine in total. Put
these in the parent.
* Call the helper methods as needed from the child methods update,
turn_on and turn_off.
* Change name of MySensorsLightLight to MySensorsLightPlain.
* Fix module docstrings according to pep257.
* Change name of color util method from rgb_hex_to_list to
rgb_hex_to_rgb_list.
* Add unit tests for rgb_hex_to_rgb_list.
* Make light controllable independently with types V_LIGHT, V_DIMMER,
V_RGB and V_RGBW. V_RGBW is not implemented in the frontend yet.
* Add discovery for light platform.
* Add optimistic mode config setting for switch and light
to allow feedback state from actuator.
* Move S_LIGHT, V_LIGHT, V_STATUS types from switch to light platform.
* Change node update logging to debug from info level.
* Fix some inaccurate comments.
This is extremely useful if you want to support wemos that are on
another subnet or across a VPN. It also lets you sidestep the discovery
process, which is problematic for a lot of people and situations.
In order for this to work, we need to bump the pywemo requirement to
0.3.10, which includes my changes to make this possible.
WeMo devices can be manually configured by adding a static section to
the config, like this:
switch:
platform: wemo
static:
- 192.168.100.5
- 192.168.100.6
Most of the mFi sensors are able to reasonably provide accurate
readings to a tenth of a unit or so. This patch rounds them for
better display in the UI. Normally, I would expect this to be a view
action instead of altering the actual data emitted, but since these
values are reasonable for sensor precision, we're not really losing
anything. I followed the model from the openweathermap component, which
rounds for readability in the backend.
When we update the mFi server for the state of a switch, the new
state is not always reported immediately if we update right after
the action (the server is not RESTful).
This patch adds some internal target-state handling to report the
desired state on the next poll, allowing any subsequent polls to
override that state.
Also, bump the version requirement for mficlient to 0.2.2 to absorb
a bug fix.
* The application of the version check in unit_of_measurement was
messed up after the last refactor. Fix that again.
* An error could occur in device_state_attributes if there was a
mismatch between used value_type in the device and mysensors
version in config. Add try... except to handle that.
Bump pyvera version.
Bump pywemo version.
Add unavailable status before properly initialised for maker and insight.
Major bugfix. ``` get_bulbs ``` and similar methods were always returning empty lists.
Better unit tests have been added to https://github.com/bradsk88/python-wink to avoid this regression.
* The application of the version check in unit_of_measurement was
messed up after the last refactor. Fix that again.
* An error could occur in device_state_attributes if there was a
mismatch between used value_type in the device and mysensors
version in config. Add try... except to handle that.
Support the SCSGate device. This will allow home-assistant to interact
with BTicino/Legrand MyHome system.
Signed-off-by: Flavio Castelli <flavio@castelli.me>
To be able to handle new platforms with multiple used v_types but
single states, a new more strict mapping was required. Each s_type is
now mapped to its corresponding v_type(s) in a dict of lists.
Devices were not added without persistence enabled and restart of HA.
Node id was added to defaultdict(list) by mistake when checking if list
of defaultdict was empty.
* Fix adding devices in mysensors_callback.
* Change devices to regular dict.