Commit Graph

69 Commits (92202709484abd555b785a9c245cfda9c3a86b5a)

Author SHA1 Message Date
Max 7331eb1f71 Allow removing Telegram reply keyboard ()
*  Allow removing telegram reply keyboard by setting `keyboard` to an empty list

* Telegram keyboard: [] clearing in services.yaml
2019-05-02 15:14:40 -04:00
Andrey "Limych" Khrolenok 2e57d48191 Adding Telegram bot leave_chat() service ()
* Adding leave_chat() service

* Fix indent
2019-04-17 10:15:33 -07:00
Nikolay Vasilchuk 7b1cbeaf80 Fix verify_ssl configuration ()
Fix verify_ssl configuration
2019-04-16 11:55:12 -07:00
Diogo Gomes 51508d69ad Bandage telegram bot ()
* Bandage

* lint

* move everything into __init__.py

* fix lint
2019-04-12 14:28:59 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements ()
* 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
Paulus Schoutsen e48ef7f441
Fix broken platform components ()
* Fix broken platform components

* Lint
2019-04-09 15:42:44 -07:00
Paulus Schoutsen cfe4cf30ad
Add manifests ()
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations ()
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
Nacho Barrientos 42265036ff Telegram_bot: Allow fetching data from unverified SSL endpoints () ()
* Telegram_bot: Allow fetching data from unverified SSL endpoints ()

This patch adds an extra option to the payload that describes the
resource to send to disable the SSL server verification when polling
data from URLs.

* Use the boolean interpretation of the variable directly

Co-Authored-By: nbarrientos <nacho@criptonita.com>
2019-03-16 09:18:10 +08:00
Ben Randall e14c8c788e Add PLATFORM_SCHEMA_BASE to telegram_bot component () 2019-02-28 18:27:40 +01:00
Daniel Høyer Iversen 519315f9c8 pylint 2.3.0 ()
* pylint 2.3.0

* remove const

*  disable=syntax-error
2019-02-27 16:10:40 -05:00
Fabian Affolter 127c55e0c1
Update file header ()
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
Luca Angemi 0f877711a0 Fixes Telegram webhooks () 2018-10-28 19:39:23 +01:00
Nikolay Vasilchuk 0c0c471447 Fix: Connection pool of Request object is smaller than optimal value (8) () 2018-10-16 10:22:57 +02:00
Fabian Affolter 5ac0469ef9 Upgrade python-telegram-bot to 11.1.0 () 2018-10-14 17:08:17 +02:00
cdce8p 3b5e5cbcd6 Async syntax 5, light & lock & remote & scene & telegram & helpers () 2018-10-01 08:56:50 +02:00
Nikolay Vasilchuk 917df1af00 Telegram_bot polling support proxy_url and proxy_params (Fix ) ()
* Telegram bot polling proxy support

* CI fix

* houndci-bot review fix

* houndci-bot review fix

* CI fix

* Review

* Update polling.py
2018-09-26 11:59:37 +02:00
Fabian Affolter ac3700d1c4 Upgrade python-telegram-bot to 11.0.0 () 2018-09-02 19:01:25 +02:00
Ville Skyttä b7c336a687 Pylint cleanups ()
* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
2018-07-23 10:16:05 +02:00
Fabian Affolter a5bff4cd8d Upgrade python-telegram-bot to 10.1.0 () 2018-05-13 17:59:25 +02:00
Fabian Affolter 9a9161477f
Upgrade python-telegram-bot to 10.0.2 () 2018-04-28 23:16:51 +02:00
Sebastian Muszynski 2532d67b9a Add send sticker service to telegram bot ()
* Add send sticker service to telegram bot

* A caption is not supported
2018-03-23 19:16:57 +01:00
Fabian Affolter dbc59ad1a7 Upgrade python-telegram-bot to 10.0.1 () 2018-03-17 17:41:10 +01:00
ruohan.chen 35bae1eef2 Telegram_bot three platform support proxy_url and proxy_params ()
* telegram_bot three platform support proxy_url and proxy_params

* add telegram_bot._initialize_bot to create the bot instance

* rename _initialize_bot to initialize_bot
2018-03-07 12:44:07 +01:00
Sergio Viudes f0d9e5d7ff Fix: timeout data attribute now is parsed to float () 2018-02-15 14:49:46 -08:00
Paulus Schoutsen f32911d036 Cleanup http ()
* Clean up HTTP component

* Clean up HTTP mock

* Remove unused import

* Fix test

* Lint
2018-02-15 22:06:14 +01:00
Otto Winter 678f284015 Upgrade pylint to 1.8.2 ()
* Upgrade pylint to 1.8.1

* Fix no-else-return

* Fix bad-whitespace

* Fix too-many-nested-blocks

* Fix raising-format-tuple

See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst

* Fix len-as-condition

* Fix logging-not-lazy

Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string

* Fix stop-iteration-return

* Fix useless-super-delegation

* Fix trailing-comma-tuple

Both of these seem to simply be bugs:
 * Nest: The value of self._humidity never seems to be used anywhere
 * Dovado: The called API method seems to expect a "normal" number

* Fix redefined-argument-from-local

* Fix consider-using-enumerate

* Fix wrong-import-order

* Fix arguments-differ

* Fix missed no-else-return

* Fix no-member and related

* Fix signatures-differ

* Revert "Upgrade pylint to 1.8.1"

This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.

* Fix arguments-differ

* except for device_tracker

* Cleanup

* Fix test using positional argument

* Fix line too long

I forgot to run flake8 - shame on me... 🙃

* Fix bad-option-value for 1.6.5

* Fix arguments-differ for device_tracker

* Upgrade pylint to 1.8.2

* 👕 Fix missed no-member
2018-02-11 09:20:28 -08:00
Otto Winter 8dcfd35b8b Spelling fixes ()
* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
2018-01-29 23:37:19 +01:00
Ville Skyttä 55ee8959ba Spelling fixes () 2018-01-27 11:58:27 -08:00
Anders Melchiorsen 8267a21bfe Lazy loading of service descriptions ()
* Lazy loading of service descriptions

* Fix tests

* Load YAML in executor

* Return a copy of available services to allow mutations

* Remove lint

* Add zha/services.yaml

* Only cache descriptions for known services

* Remove lint

* Remove description loading during service registration

* Remove description parameter from async_register

* Test async_get_all_descriptions

* Remove lint

* Fix typos from multi-edit

* Remove unused arguments

* Remove unused import os

* Remove unused import os, part 2

* Remove unneeded coroutine decorator

* Only use executor for loading files

* Cleanups suggested in review

* Increase test coverage

* Fix races in existing tests
2018-01-07 14:54:16 -08:00
Fabian Affolter a7ebba6863
Upgrade python-telegram-bot to 9.0.0 () 2017-12-29 10:08:14 +01:00
Vignesh Venkat 96e7944fa8 telegram_bot: Support for sending videos ()
* telegram_bot: Support for sending videos

Telegram python library has a sendVideo function that can be used
similar to sending photos and documents.

* fix lint issue

* fix grammar
2017-11-12 00:13:35 +01:00
sander76 143d9492b2 Fix for telegram polling. (added pausing when error occurs) ()
* Fix for telegram polling. (added pausing when error occurs)

* fix pylint error.
invalid variable name ( Exception as _e)). Don't understand why as
removing the underscore fails with my local pylint..

* fixing too short variable name.

* moved logic to `check_incoming`

* fix line too long error.

* Simplify
2017-11-09 21:17:23 +01:00
Fabian Affolter de9d19d6f4 Use constants for HTTP headers ()
* Use constants for HTTP headers

* Fix ordering

* Move 'no-cache' to platform
2017-11-04 12:04:05 -07:00
Fabian Affolter cc293db5ab
Update services.yaml files ()
* Add period to the description

* Update abbreviation
2017-10-30 21:39:12 +01:00
Eugenio Panadero b1dc48822d Upgrade python-telegram-bot to 8.1.1 ()
* update python-telegram-bot to v8.1.1

* update python-telegram-bot to v8.1.1
2017-10-15 21:22:51 +02:00
Fabian Affolter 7c7a5a4a15 Upgrade python-telegram-bot to 8.0.0 () 2017-09-03 17:21:51 -04:00
Eugenio Panadero 96f8c37dcd Xiaomi vacuum as platform of new `vacuum` component derived from ToggleEntity, and services ()
* Xiaomi vacuum as component with switch, sensors and services

- Conversion from switch platform to async component.
- Add services proposed in  to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)

* path change in requirements_all (from switch platform to component)

* copy pasting is a bad habit

* services to the components services.yaml, modify .coveragerc

* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services

* `icon_for_battery_level` util method

* Xiaomi vacuum as platform of new component vacuum

- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.

* fix coveragerc

* fix battery icon helper to use more icons

* remove sensors, create properties and support flags for custom UI

* cleaning

* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`

* fix platform rename

* change fanspeed and expose `fanspeed_list` to use speed steps

* minor fixes

- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes

* rename state attrs

* rename state attrs

* review changes: cut fan__speed, style changes, remove logging, and more

* add ATTR_COMMAND = 'command' to const

* pop entity_id from service data

* remove property accessor for vacuum object

* lint fix

* fix extra attrs names

* module level functions for calling the services

* params as optional keyword for `send_command`

* params as optional keyword for `send_command`, remove debug logs

* explicit parameters for `set_fan_speed` and `send_command`

* Demo platform for the vacuum component

* vacuum tests for the Demo platform

* some fixes

* don't omit vacuum

* vacuum tests for the Xiaomi platform

* fix test

* fix

* fix xiaomi test

* fix coveragerc

* test send command

* fix coveragerc

* fix string formatting

* The coverage is to low. It need 93% or more
2017-08-04 15:27:10 +02:00
Eugenio Panadero 37fef4016e Add proxy support for telegram_bot ()
* Add proxy support for telegram_bot

New optional config parameters `proxy_url` and `proxy_params` (a dict)
```yaml
telegram_bot:
  platform: polling
  api_key: !secret telegram_bot_api_key
  allowed_chat_ids:
    - !secret telegram_bot_chatid
  proxy_url: socks5://proxy_ip:proxy_port
  proxy_params:
    username: my-username
password: my-secret-password
```

* change `ATTR_` for `CONF_` for config params
2017-07-30 12:08:19 +02:00
Eugenio Panadero cee49f313f Retry set_webhook up to three times, reduce timeout to 5s again () 2017-07-30 11:14:28 +02:00
Eugenio Panadero 05330ac763 bump python-telegram-bot to 7.0.1 for fully support Bot API 3.2 () 2017-07-30 11:13:51 +02:00
Eugenio Panadero cca0d3ed44 Attach the `chat_id` for a callback query from a chat group (fixes ) () 2017-07-17 13:47:28 +02:00
Paulus Schoutsen 46e030662d Fix pylint 1.7.2 no-else-return issues ()
* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
2017-07-05 23:30:01 -07:00
Eugenio Panadero 1fb4eefc2c better logging to debug when a message is not sent () 2017-06-29 21:13:46 +02:00
Eugenio Panadero 596093d564 telegram_bot platform to only send messages ()
* add new telegram_bot platform to only send messages

* Fix async
2017-06-26 22:22:33 -07:00
Pascal Vizeli 2dd7f0616e Add security layer to send file output things ()
* Add security layer to send file output things

* Make telegram secure

* fix lint

* fix handling

* invert check

* resolve relative paths

* add test for relative paths

* fix lint

* fix tests

* Address paulus comments

* fix style

* fix tests

* Add more tests

* fix tests

* fix tests

* fix test p2

* fix lint

* fix tests

* Make it available for windows

* Change name / address comments

* fix set

* fix test

* fix tests

* fix test

* fix lint
2017-06-26 00:10:30 +02:00
Eugenio Panadero 07293e8d1e add telegram_bot service: delete_message ()
* add telegram_bot service: delete_message

* better validating for `last` message_id option
2017-06-22 15:03:11 +02:00
Fabian Affolter 349746f5f2 Upgrade python-telegram-bot to 6.1.0 () 2017-06-22 13:27:02 +02:00
Eugenio Panadero 77aa2e940d increase timeout for setWebhook to 10s ()
Add an optional extended description…
2017-06-19 12:03:58 +02:00
sander76 1c06b51968 Fixing Client connection error () 2017-06-11 21:42:35 -07:00