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
* fix aiohttp InvalidURL exception when fetching media player image
The first call for the HA proxy (`/api/media_player_proxy/media_player.kodi?token=...&cache=...`)
is receiving relative urls that are failing, this is a simple fix to precede the base_url when hostname is None.
* fix import location and sort stdlib imports
* light.tplink: initialize min & max mireds only once, avoid i/o outside update
* revert the index change
* fix indent, sorry for overwriting your fix, balloob
* light.tplink: initialize min & max mireds only once, avoid i/o outside update
* revert the index change
* fix indent, sorry for overwriting your fix, balloob
## 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**
* Add event handler to capture binary sensor on messages
* Log event trigger
* Log event firing
* Capture platform correctly
* Fix test for platform eq binary_sensor
* Create sensor events
* Add light and battery sensors
* Bump insteonplm version to 0.11.6
* Fix naming of BUTTON_PRESSED_STATE_NAME
* Fix naming of fire event methods
* Add logging
* Add DOMAIN definition
* Get state name from plm.devices
* Remove stale reference to button ID
* Fix reference to state name
* Remove incorrect ref to self
* Log remote button pressed event
* Change mode to button_mode and fix values to array
* Rename CONF_MODE to CONF_BUTTON_MODE
* Log platform create with mode
* Properly assign button_mode to track mode
* Implement is_on
* Change mini-remotes to events only
* Remove button_mode config option
* Fix reference to _fire_button_on_off_event
* Bump insteon version to 0.11.7
* Flake8 clean up
* Flake8 cleanup
* Use % format in logging per pylint
* Code review updates
* Resolve conflict
* Lint