* Manual Alarm Control Panel: use proper "Arming" state
* Update previous and next attributes
* add CONF_ARMING_TIME
* Split up arming and pending time, pending_time --> arming_time
* update tests
* fix issort
* fix issort
* fix demo platform
* fix alarm test
* remove arming_time from the triggered state
* Match previous default "delay_time"
* fix tests
* fix arming state when triggering
* fix arming _arming_time_by_state for Triggering state
* change to not in list
* Update homeassistant/components/manual/alarm_control_panel.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* async_update_ha_state -> async_write_ha_state
* black formatting
* add Callback
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* import callback
* update device triggers alarm_control_panel
* Update test_device_trigger.py
* Update device_trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rename BinarySensorDevice to BinarySensorEntity
* Tweak
* Move deprecation warning to __new__, add test
* Move deprecation warning back to __init__
* Move deprecation warning to __init_subclass
* Display a QR code for homekit pairing
This will reduce the failure rate with HomeKit
pairing because there is less chance of entry
error.
* Add coverage
* Test that the qr code is created
* I cannot spell
* Update homeassistant/components/homekit/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/homekit/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* bravia-tv version bump
* Fix Auth Cookies
- Fix authentication cookie expiration.
- Remove obsolete error handling (since bravia-tv==1.0.2)
- Remove obsolete mac address references. (since bravia-tv==1.0.2)
- Update tests.
* fix async_refresh_playing_info
* Improve code format
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Config_entry needs mac address for HA restart
This was mistakenly taken out. Home-Assistant needs to store mac address in
case restarted. TV needs to be on to acquire mac address. This is neccesary
to allow TV to be turned on by Home-Assistant after Home-Assistant is
restarted.
* Skip update() during state changes
It is best for performance to skip updates during state change because
bravia.turn_on() will commonly push async_update() beyond it's update
interval.
* update tests
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 0.2.0 of the btsmarthub_devicelist package makes it compatable with BT's home hub 2.
The API has changed in the new version so this change also makes the component code compatible with the changes to the library.
* Update homeassistant/components/bt_smarthub/device_tracker.py
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/bt_smarthub/device_tracker.py
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Remove dep on config in BTSmartHubScanner
This should make BTSmartHubScanner easier to test as you can pass in a mock smarthub_client
* Black format bt_smarthub
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Add support for Lutron Keypad LEDs
* Removed unneeded attribute definitions
* Pull initial state from Lutron on startup
* Format updates per code review
* Altered caching code to only fetch state if needed
* Update homeassistant/components/lutron/switch.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Cloud pylint is also offended by this ;)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update state after adding a new torrent
* Use cached torrents list in check_started_torrent_info
* Add torrent_info to all sensors
* Add torrent_info for active torrents
* Fix typo
* Update codeowners
* Do not set eta if it's unknown
* Fix codeowners
* Extract TransmissionSpeedSensor
* Extract TransmissionStatusSensor
* Extract TransmissionTorrentsSensor
* Refactor device_state_attributes() and update()
* Remove unused methods
* Use async_on_remove
* Fix sensor update
* Add transmission.remove_torrent service
* Add transmission_removed_torrent event
* Fix naming
* Fix typo in services.yaml
* Added support for white value in Template Light integration.
* Tests now working.
* Clean up
* Make template more robust
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add Islamic Prayer Times config_flow
* Add Islamic Prayer Times config_flow
* handle options update and fix tests
* fix sensor update handling
* fix pylint
* fix scheduled update and add test
* update test_init
* update flow options to show drop list
* clean up code
* async scheduling and revert state to timestamp
* fix update retry method
* update strings
* keep title as root key
* Fix serial integration connection stability
Retry to connect if serial device is not available on start, or connection is lost.
Added some more log entries upon connection or when errors are encountered.
* Updated code based on review
* Fixed exception indentation
* Handle SerialException
* Sort imports
* Update homeassistant/components/serial/sensor.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/serial/sensor.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* More clean up
* Format and delint
* Extract error handler
* Clean up stop handler
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move removal of sensor entities into a base class
* Fix martins comments on sensors
* Reflect sensor changes on device_tracker platform
* Reflect sensor changes on switch platform
* Improve layering
* Make sure to clean up entity and device registry when removing entities
* Fix martins comments
* HomeKit: Store generated aid against unique_id where possible
* Fix conflict
* Fix max accessories check
* homekit counts the bridge as an accessory
* Add coverage for aidmanager
* prepare for merge
Co-authored-by: J. Nick Koston <nick@koston.org>
nad_receiver received a few fixes in 0.0.12, which enables the integration
for me. I assume it may depend on the receiver model, but my receiver only reports
mute state and volume when it's on, while the library used to assume to always
get a reply. With 0.0.11 the nad integration simply excepts on startup,
after bumping the version up it works.
Fixes this:
2020-04-18 22:59:38 ERROR (MainThread) [homeassistant.components.media_player] nad: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 324, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/nad/media_player.py", line 195, in update
if self._nad_receiver.main_mute("?") == "Off":
File "/usr/local/lib/python3.7/site-packages/nad_receiver/__init__.py", line 71, in main_mute
return self.exec_command('main', 'mute', operator, value)
File "/usr/local/lib/python3.7/site-packages/nad_receiver/__init__.py", line 62, in exec_command
return msg.decode().strip().split('=')[1]
IndexError: list index out of range
* Remove side effects from properties
* Remove redundant return value in async_send_command
* Move callback registeration to async_added_to_hass
* Code cleanup for roomba
* Add device type
* Use snake_case for devtype
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
* Validate device type as positive int
* Add device type 0x5f36 to switch
* Use default type for sensors
* Add RM4 to switch platform
* Use snake_case for devtype
* Support multiple types of remote
* Validate ip address
* Improve code readability
* Add const.py to .coveragerc
* Use None for unknown device types
* Fix sensors and standardize platform schemas
* Fix if statement
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* Fix signal collision in tado with multiple accounts
Tado signals were not unique enough to prevent collisions
between accounts with the same zone ids.
* Bump upstream to fix multiple tado accounts
* switch signal undo to async_on_remove
* Bump version now that upstream is released
* bump python-tado
* While its only the dep that changed since the last run, best to force another CI to be sure
* Add Braava support to iRobot Roomba component
* Replace async_add_job with async_add_executor_job in roomba
* Improve readability in roomba
* Improve error handling in roomba
* Cleanup async_update in roomba
* Split into multiple files in roomba
* Hide protocal details in braava
* Switch to push in braava
* Bump roombapy version to 1.5.1
* Add roomba files to .coveragerc
* Fix typo
* Remove side effects from init in roomba
* Implement StateVacuumDevice in Roomba
* Add IRobotEntity base class to braava
* Fix state in roomba
* Add @shenxn as a codeowner of braava
* Updating the panasonic_viera component
* Updating .coveragerc
* Removing testplatform
* Updating strings.json
* Commit before rebase
* Commit before rebase
* Commit before rebase
* Commit before rebase
* Commit before rebase
* Adding tests and stuff
* Fixing permission issues
* Ignoring Pylint warnings
* Fixing one more Pylint warning
* Refactoring
* Commiting changes - part 1
* Commiting changes: part 2
* Turning unknown error logs into exception logs
* Update strings.json
* Rebasing
* Updating the panasonic_viera component
* Removing testplatform
* Updating strings.json
* Commit before rebase
* Commit before rebase
* Commit before rebase
* Commit before rebase
* Commit before rebase
* Adding tests and stuff
* Fixing permission issues
* Ignoring Pylint warnings
* Fixing one more Pylint warning
* Refactoring
* Commiting changes - part 1
* Commiting changes: part 2
* Turning unknown error logs into exception logs
* Adding pt-BR translation
* Removing Brazilian Portugues translations
* Modifying error handling
* Adding SOAPError to except handling
* Updating translation
* Refactoring async_step_import
* Fixing indentation
* Fixing requirements after rebase
* Fixing translations
* Fixing issues after rebase
* Routing import step to user step
* Adding myself as a codeowner
* Extend knx brightness with rgb brightness if brightness addresses are not supported
* Fix explicit return value
* Check for None
* Remove not needed check
* Disable false positive pylint warning
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix emulated_hue brightness off by one
Hue uses a max brightness of 254, Home Assistant
uses a max brightness of 255. Values > 127 were
off by one.
* use constant
* fix test
* add debug
* Revert "add debug"
This reverts commit 242220a02e.
* added "allon" and "alloff" to the binary_sensor
Ref to the issue: https://github.com/home-assistant/core/issues/32399
* Cosmetic fix
* Fix format
* Update test
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Rollback modbus to version 0.107.7
Update manifest to not use async.
Rollback entities to sync version.
Keep newer modifications apart from async.
Rollback __init__ to sync version but keep the new functionality.
add async sub directory
Adding the current (not working) version in a sub directory,
to allow easy sharing with a few alfa testers.
The async version are to be updated to use the serial/tcp already
available instead of the flaky pymodbus version. pymodbus is still
needed to encode/decode the messagess.
Update test cases to reflect sync implementation, but
keep the new functionality like e.g. conftest.py.
* do not publish async version
The async version will be made available in a forked repo, until
it is ready to replace the production code.
* Allow disable wired bug work around
* Move small improvements from closed PR #34065
* Fix failing test
* Add new test
* Some extra logging
* Harmonize log outputs
* Add config flow string
* Fix Balloobs comments
* Add device tracker based on arris-tg2492lg
* Return name of device and update version of arris_tg2492lg
* Update CODEOWNERS, requirements_all.txt and .coveragerc
* Change default url to host
* Use f-strings
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Clean up
* Fix formatting
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add config flow to nws and remove yaml
* Don't duplicate scan_time
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Use _abort_if_unique_id_configured
Co-Authored-By: J. Nick Koston <nick@koston.org>
* fix abort
* Add unavailable tests
* update and use better strings
* lint
Co-authored-by: J. Nick Koston <nick@koston.org>
* maxcube: Make it possible to return to auto mode
It's currently not possible to switch back to auto (schedule) mode after
changing to manual or vacation. Add `PRESET_NONE` to list of presets
that will return thermostat back into auto (schedule) mode.
Additionally, use `PRESET_AWAY` instead of custom preset name for
vacation mode.
* maxcube: Provide `hvac_action` based on valve state
Not supported for wall thermostats.
* maxcube: Add support for Comfort, Eco, Off and On modes
Off is mapped to HVAC_OFF, while On - to HVAC_HEAT.
* maxcube: Add `hvac_action` support for wall thermostats
We check all thermostats in the same room as the wall thermostat. If at
least one of them has its valve open - the room is being heated.
* maxcube: Expose valve position as state attribute
Also fix a small logical error in `hvac_action`.
* maxcube: Fix linter errors and formatting
* maxcube: Adjust mapping between MAX! and HA modes and presets
MAX! 'Manual' mode now corresponds to 'Heating' mode of HA. MAX! 'Eco'
and 'Comfort' temperatures are 'Heating' mode presets. MAX! 'On' mode is
now a 'Heating' preset, too.
* maxcube: Address review comments
* Prevent a single accessory setup failure from breaking all HomeKit accessories
Raise the max devices to 150 as the spec allows for this
many. Previously 100 made sense because of the event
storms when homekit started would sometimes break pairing,
as these have largely been fixed in 0.109 (still a few
to cleanup) using the HAP spec limit of 150 is now possible.
* Handle both failure states
* Convert homekit fans to use service callbacks
* Convert homekit fans to use service callbacks
Service callbacks allow us ensure that we call
fan services in the correct order.
* Avoid calling turn_on if a speed is sent and the device is on
* Fix test to not leave files behind
* Fix test
* Update homeassistant/components/homekit/type_fans.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Set homekit alarm/sensor/switch state as soon as possible
This change is part of a multi-part effort to fix the
HomeKit event storms on startup.
Previously we would set the states after HomeKit
had started up which meant that when the controller
client connected it would request the states and get
a list of default states so all the initial states
would always be wrong. The defaults states generally went
unnoticed because we set the state of each HomeKit device
soon after which would result in an event storm in the log
that looked like the following for every client and every
device:
Sending event to client: ('192.168.x.x', 58410)
Sending event to client: ('192.168.x.x', 53399)
Sending event to client: ('192.168.x.x', 53399)
To solve this, we now set the state right away when we
create the entity in HomeKit, so it is correct on
initial sync, which avoids the event storm. Additionally,
we now check all states values before sending an update
to HomeKit to ensure we do not send events when nothing
has changed.
* pylint
* Fix event storm in covers as well
* fix refactoring error in security system
* cover positions, now with constants
* Add NUT tests for an Eaton 5E650I UPS
* add a test to make sure multiple ups get setup
* Add a few more upses
* fix missing status key
* cover
* Force CI run
* Allow async_setup changes to config entry data be taken into account
* Fix tests
* Limit scope try…finally
* Update tests/test_config_entries.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Fix import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Run scripts
* Improvement strings
* Fix FlowOptions update listener
* Update .ceveragerc
* Add tests
* Better strings
* Add test for OptionsFlow
* Run gen_requirements_all.py once again
* Fix pylint errors
* Log error when there is no bravia.conf file during import
* Improvement strings
* Use braviarc object from hass.data in options flow
* Use async_add_executor_job for IO
* Fix options flow test
* Fix tests
* Remove host_reachable method
* Remove dependencies
* Change setup_platform method to async
* Remove calling system_info
* Save mac in the config entry
* Fix get ignore sources
* Fix read config from file
* Remove the side effect from init
* Fix user_input for user step
* Switch OrderedDict to dict
* New config_entry instance for each test
* Revert change
* Patch async_setup_entry in test_import
* Change a way to create source list
* Consolidate repeated block of code
* Update tests
* Suggested change
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Suggested channge
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Suggested change
* Patch async_setup_entry
* Remove unnecesary if
* suggested change
* Suggested change
* Fix tests
* Fix pylint error
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
In order to make this automatically discoverable via the registry
there needs to be a DEVICE_CLASS_BATTERY_CHARING in binary sensor
so we can tell what is a battery and what is a charge sensor.
* Reduce loss of precision when setting light percent brightness
This part of an effort to fix all the round trip light
brightness percentages that cause errors with homekit
, alexa, and other devices that use percentage.
* fix demo light test
* Move consts to const, general cleanup
* Add unique id
* Add default icon
* Set supported features based on sound output
* Update homeassistant/components/webostv/media_player.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Set device class
* Add software_info to client mock
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Implemented snapcast latency attributes
* Code review changes and Snapcast maintenance
Updated how entity services get called - now conforms to most
current method
* Cleanup tasks
Moved constants into separate file
Removed unnecessary logger message
Remove unnecessary schemas
* FIx linting errors
* Sort imports
* Update with requested change
Better - use next()
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Add guards for bad service calls
* Add back in platform schema
* Add check for unjoin service call
* Fix lint/format
* remove comma inserted by black
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Convert sense to use DataUpdateCoordinator for trends
* remove unused
* request update right away
* clarify
* call async refresh later
* Update homeassistant/components/sense/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/sense/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>