* Implement echo config option for pilight
Pilight switches can get a receive code configured. If so they act on
received codes. In the current implementation "act on" means not only
to set the internal state, but also to send the code again. If the
receiver is directly parred with the switch, to act even if HA is not
running, this causes it to receive the signal twice because the HA
sends it again.
In my case this causes a dimmer to start dimming until I hit the switch
again.
This implements a "echo" argument for the receive codes that let the
user choose if a received signal should result in any sending or not.
If not, only the status of pilight will be updated.
The echo option defaults to True, as this was the default since now.
Simply set it to halse to disable this behaviour.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add documentation to set_state in switch/pilight.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Pilight: dont protocol as list in COMMAND_SCHEMA
As described in bug #4637 the protocol should not be wrapped in a list
in the spec of COMMAND_SCHEMA because this causes the component to
never successfully match any received rf code.
As pointed ot in PR #4639 the easiest way to do this, is to not derive
COMMAND_SCHEMA from RF_CODE_SCHEMA and specify protocol as simple
string there.
This fixes bug #4637.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Pilight: Add "unitcode" to command schema.
This adds "unitcode" to the COMMAND_SCHEMA. It is used for example in
the brennenstuhl protocol of pilight.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Convert switch to AsnycIO
* Move update entity to service
* use time better for faster handling
* Change to suggestion from paulus
* Use new shedule_update_ha_state
* fix lint
* minimize executor calls
* Change pilight systemcode validation to integer
According to the pilight code the systemcode should be an integer and
not a string (it is an int in the pilight code). Passing this as a
string caused errors from pilight:
"ERROR: elro_800_switch: insufficient number of arguments"
This fixes#4282
* Change pilight unit-id to positive integer
According to the pilight code the unit of an entity is also evrywhere
handled as an integer. So converting and passing this as string causes
pilight not to work.
This fixes#4282
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* New component to interface with a pilight-daemon for RF send/receive
* Fix bug that changed the received data, add connected flag, clean up
* New pilight switch component
* New optional whitelist filter to filter uninteressting devices
* Add pilight
* PEP8: too long lines, white spaces
* To keep up the good coverage ...
* PEP 257
* pylint enhancements
* pylint enhancements
* PEP 257
* Better HA config validation and cleanup following code review for #2742
* Fix requirenments to require fixed pilight version
* Change config validation to use voluptuous
* Pilight switch exclude not needed due to wildcard pilight exclude
* Enhance configuration parsing using voluptuous