* timediff is of type timedelta. Divide by timedelta does not work.
- convert a timedelta to int
- make sure the test inputs real timestamps
* Convert the total_seconds to decimal and round the result
readings are of type Decimal, so fix test to reflect that
* split line into multiple statements
Line too long
* use total_seconds instead of timediff
* Make both values float instead of Decimal
* First webhook commands for getting and deleting single registrations
* Keep a list of deleted webhook IDs so we can 410 if the webhook receives traffic in the future
* Return a empty JSON object instead of None
* Split up mobile_app bits into individual files
* Add typing
* Sort keys
* Remove unused async_setup_entry
* New decorator method of registering webhooks
* Add tests for cloud hook forwarding and improve error handling for cloud hooks
* Initial implementation of platform specific logic
* Add get registrations by user ID websocket call, minor style fixes
* Stop using resp dictionary during registration
* Move mobile_app/ios.py to ios/mobile_app.py
* Log any errors encountered during webhook
* Improve update registration call
* Split up mobile_app tests to match split up component
* Fix tests
* Remove integration_map in favor of component name in registration
* Add a few helper functions for custom logic components to use
* Load the app_component platform at device registration or component setup time
* Remove extraneous function
* Use guard function for checking if component is in device
* Inline websocket schemas
* Rename ATTR_s used in storage to DATA_ prefix
* squash flake8 and pylint issues
* Remove ios.mobile_app platform
* Dont mark websocket_api as a dependency
* Return standard empty_okay_response with 400 if no JSON sent
* Ensure deleted webhook IDs are registered at launch
* Remove the creation of cloudhooks during handle_webhook
* Rename device to registration everywhere applicable
* Dont check if cloud is logged in, just check if cloud is in components
* Dont ever use cloudhook_id
* Remove component loading logic for a later PR
* Cast exception to string
* Remove unused functions
* fix empty TOPIC_BASE issue
if the value of the TOPIC_BASE is empty then we need to remove "~" from the topic value if it exists.
by doing `if base:` on line 239 the condition will be false if the value is empty so the '~' will not be stripped from the topic value.
I simply removed the `if base:` line and added `if TOPIC_BASE in payload:`
* Update homeassistant/components/mqtt/discovery.py
Co-Authored-By: engrbm87 <engrbm87@gmail.com>
* Quick return if attr is null
There are some case where attr is null. Returning null doesn't change anything (in my case this is mapped to a volume that doesn't exist, not sure what others are seeing).
If you have confirmed you hass instance for C instead of F you do not see this error.
* update == to is
* whitespace
* Move cisco me to new layout
* Add docstring
* Move items out of init method and pass the controller instance to the scanner in get_scanner
* Update homeassistant/components/cisco_mobility_express/device_tracker.py
Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>
* Update homeassistant/components/cisco_mobility_express/device_tracker.py
Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>
* Update homeassistant/components/cisco_mobility_express/device_tracker.py
Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>
* Update homeassistant/components/cisco_mobility_express/device_tracker.py
Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>
* Fix build error
* Cleanup based on comments.
* Add Time of Flight Sensor using VL53L1X
* Fix issues found by bot
* Fix issues from bot
* Remove extra logs
* Keep removing logs dependencies not used
* Remove log from update
* Add logger info to async_update
* Fix over-indented line
* Fix pylint error
* Remove logger reporting successful operation
* Update requirements
* Update requirements_all.txt
* Update requirements_test_all.txt
* Used isort to keep imports and added STMicroelectronics to docstring
* Replace time.sleep by asyncio.sleep
* Add requirements to COMMENT_REQUIREMENTS and fix typo
* Using async_add_executor_job to schedule the call in the pool
* Fix typo
* Optimize async_update
* Updated requirements files
* Group and schedule calls that should be run sequentially
* Fix lint errors
* Revision showing development history
* Cleaning and typos
* Cleaning and typos
* Fix wrong-import-order
* Fix gen_requirements_all
* Schedule rpi_gpio I/O on the executor thread pool
* Fix partial parameters
* Fix bot error - add blank line
* Fix lint error
* Remove dependencies from requirements
* Review initial commits
* Move all device I/O to async_update
* Update requirements_all.txt
* Revised header with no url to the docs
* Use async_added_to_hass to add and initialize the sensor
* Add docstring to init()
* Move sensor.open() to async_setup_platform
* Remove logging and async
* Fix typo
* Move sensor.open to safe initialization
* Fix typo
* Fix typo
* Add the new tof module to .coveragerc
* Move the sensor platform under a tof package
* Update .coveragerc and requirements_all for tof package
* Fix Name of Accesspoint if name is configured
* fix lint
* Simplyfied naming
* applied suggestion
Co-Authored-By: SukramJ <markus@mm-jankowski.de>
* update comment