Commit Graph

12 Commits (e45f2cf5a298251b511105019b357aae0db53f46)

Author SHA1 Message Date
springstan 8d61893c39
Use HTTP_OK constant (#33798)
* Use http ok constant

* Remove incorrect use

* Run isort

* Fix pylint by adding missing imports

* Fix pylint by fixing one import
2020-04-08 11:47:38 -05:00
springstan ba0aaeeddb
Use f-strings in integrations starting with "M" (#32271)
* Use f-strings in integrations starting with "M"

* Format mqtt light init with black

* Fix lint error

* Fix pylint error

* Restore constants

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Format with Black
2020-03-10 23:34:54 +01:00
rccoleman 4a2987e790 Allow specific status codes while notifying mobile_app devices (#30496)
* Removed check and return with a notification status of 201

* Allow additional result codes

Allow 200, 201, and 202 as valid result codes
2020-01-06 23:41:07 +01:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Diefferson Koderer Môro 3e9d28f28a Move imports in mobile_app component (#28027) 2019-10-21 10:05:41 +02:00
Tsvi Mostovicz 80136f3591 Change datetime.now() to dt_util.now() (#26582)
* Change datetime.now() to dt_util.now() in cases where the functionality should stay the same

These changes should not affect the functionality, rather cleanup our codebase.

In general we would like integrations to not to use datetime.now() unless there's a very good
reason for it, rather use our own dt_util.now() which makes the code aware of our current time
zone.

* Use datetime.utcnow() for season sensor to get offset-naive utc time

* Revert "Use datetime.utcnow() for season sensor to get offset-naive utc time"

This reverts commit 5f36463d9c7d52f8e11ffcec7e57dfbc7b21bdd1.

* BOM sensor last_updated should be UTC as well

* Run black

* Remove unused last_partition_update variable
2019-09-19 08:39:09 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Robbie Trencheny a252065f99 Fix calling notify.notify with mobile_app targets in play. Fixes #24064 (#24156) 2019-05-29 09:09:24 -07:00
Paulus Schoutsen f995ab9d54
Don't pass in loop (#23984)
* Don't pass in loop

* Revert some changes

* Lint + Axis revert

* reinstate loop

* Fix a test

* Set loop

* Update camera.py

* Lint
2019-05-22 21:09:59 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Robbie Trencheny 02b7fd93ed Fix for rate limits should be optional (#22823) 2019-04-07 07:37:27 -07:00
Robbie Trencheny b797b1513a Add mobile_app notify platform (#22580)
* Add mobile_app notify platform

* Requested changes

* Fix incorrect param for status code

* Move push_registrations to notify platform file

* Trim down registration information sent in push

* quotes

* Use async version of load_platform

* Add warning for duplicate device names

* Switch to async_get_service

* add mobile_app.notify test

* Update tests/components/mobile_app/test_notify.py

* Update tests/components/mobile_app/test_notify.py
2019-04-03 08:21:25 -04:00