Switches by default use the payload_on and payload_off configuration parameters to specify both the payload the switch should send for a state but also what will be returned for the current state - which isnt always the same
As a toggle switch might always send an ON or TOGGLE to toggle the switch, but still receive an ON or an OFF for the state topic - This change allows for splitting them apart
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
* Fix ZWave RGBW lights not producing color without explicit white_value (#13930)
* simplify conditional in previous commit (#13930)
* ZwaveColorLight - only zero _white if white_value not specified in call (#13930)
## Description:
Make typing checks more strict: add `--strict-optional` flag that forbids implicit None return type. This flag will become default in the next version of mypy (0.600)
Add `homeassistant/util/` to checked dirs.
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
* Add HomematicIP security zone
* Update access point tests
* Fix state if not armed and coments
* Add comment for the empty state_attributes
* Fix comment
* Fix spelling
* Add python 3.7 to travis and tox
* Use pyyaml from github
* Don't version constraints
* Fix version tag
* Change to new pyyaml release
* Python 3.7 requires xenial
* Fix namespace detection
* Use correct RegEx type
* Update pexpect to 4.6
* Use correct validation for dictionaries
* Disable Py37 incompatible packages
* Upgrade all pexpect to 4.6
* Add explicit None as default param
* Add HomematicIP Cloud to config flow
* Inititial trial for config_flow
* Integrations text files
* Load and write config_flow and init homematicip_cloud
* Split into dedicated files
* Ceanup of text messages
* Working config_flow
* Move imports inside a function
* Enable laoding even no accesspoints are defined
* Revert unnecassary changes in CONFIG_SCHEMA
* Better error handling
* fix flask8
* Migration to async for token generation
* A few fixes
* Simplify config_flow
* Bump version to 9.6 with renamed package
* Requirements file
* First fixes after review
* Implement async_step_import
* Cleanup for Config Flow
* First tests for homematicip_cloud setup
* Remove config_flow tests
* Really remove all things
* Fix comment
* Update picture
* Add support for async_setup_entry to switch and climate platform
* Update path of the config_flow picture
* Refactoring for better tesability
* Further tests implemented
* Move 3th party lib inside function
* Fix lint
* Update requirments_test_all.txt file
* UPdate of requirments_test_all.txt did not work
* Furder cleanup in websocket connection
* Remove a test for the hap
* Revert "Remove a test for the hap"
This reverts commit 968d58cba1.
* First tests implemented for config_flow
* Fix lint
* Rework of client registration process
* Implemented tests for config_flow 100% coverage
* Cleanup
* Cleanup comments and code
* Try to fix import problem
* Add homematicip to the test env requirements
* Added push camera
* add camera.push
* Address comments and add tests
* auff auff
* trip time made no sense
* travis lint
* Mock dependency
* hound
* long line
* long line
* better mocking
* remove blank image
* no more need to mock dependency
* remove import
* cleanup
* no longer needed
* unused constant
* address @pvizeli review
* add force_update
* Revert "add force_update"
This reverts commit e203785ea8.
* rename parameter
* Only create frontend client_id once
* Check user and client_id before create refresh token
* Lint
* Follow code review comment
* Minor clenaup
* Update doc string
* Force to use access_token if hass.auth.active
* Not allow Basic auth with api_password if hass.auth.active
* Block websocket api_password auth when hass.auth.active
* Add legacy_api_password auth provider
* lint
* lint
* Use new trusted_proxies setting for X-Forwarded-For whitelist
* Only use the last IP in the header
Per Wikipedia (https://en.wikipedia.org/wiki/X-Forwarded-For#Format):
> The last IP address is always the IP address that connects to the last proxy,
> which means it is the most reliable source of information.
* Add two additional tests
* Ignore nonsense header values instead of failing