* 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
* 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
* 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
* 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
* 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
* Xiaomi vacuum as component with switch, sensors and services
- Conversion from switch platform to async component.
- Add services proposed in #8416 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
* Add `name` var to BytesIO content to get recognized
Sometimes the python-telegram-bot doesn't recognize the mimetype of the file and looks after a name variable to deduce it. Fixes#7413
* bytesio stream recycle less explicit
* fix double template rendering when messages come from notify.telegram
* fix 'chat' information not present in callback queries
* better inline keyboards with yaml
To make a row of InlineKeyboardButtons you pass:
- a list of tuples like: `[(text_b1, data_callback_b1), (text_b2, data_callback_b2), ...]
- a string like: `/cmd1, /cmd2, /cmd3`
- or a string like: `text_b1:/cmd1, text_b2:/cmd2`
Example:
```yaml
data:
message: 'TV is off'
disable_notification: true
inline_keyboard:
- TV ON:/service_call switch.turn_on switch.tv, Other:/othercmd
- /help, /init
```
* fix send file to multiple targets
* fix message templating, multiple file targets, HA cameras
- Allow templating for caption, url, file, longitude and latitude fields
- Fix send a file to multiple targets
- Load data with some retrying for HA cameras, which return 500 one or two times sometimes (generic cams, always!).
- Doc in services for new inline keyboards yaml syntax: `Text button:/command`
* HttpDigest authentication as proposed in #7396
* review changes
- Don't use `file` as variable name.
- For loop
- Simplify filter allowed `chat_id`s.
* Don't use `file` as variable name!
* make params outside the while loop
* fix chat_id validation when editing sent messages
* bugfix for Telegram chat_ids
- Negative `chat_id`s for groups.
- Include `chat_id` in event data.
- Handle KeyError when receiving other types of messages, as `new_chat_member` ones, and send them as text.
* unused import
* fix double quote style, fix boolean expr, change warning msg
* mistake
* some more fixes
- fix if condition for msg bad fields.
- return True for a correct but not allowed or not recognized message: if not, the message arrives continuously.
- Allow to receive messages from unauthorized users if they come from authorized groups.
* support for `edited_message`s
- They come as normal messages, except for the 'edited_message' field instead of 'message'.
* telegram_bot and notify.telegram enhancements:
- Receive callback queries and produce `telegram_callback` events.
- Custom reply_markup (keyboard or inline_keyboard) for every type of message (message, photo, location & document).
- `disable_notification`, `disable_web_page_preview`, `reply_to_message_id` and `parse_mode` optional keyword args.
- Line break between title and message fields: `'{}\n{}'.format(title, message)`
- Move Telegram notification services to `telegram_bot` component and forward service calls from the telegram notify service to the telegram component, so now the `notify.telegram` platform depends of `telegram_bot`, and there is no need for `api_key` in the notifier configuration. The notifier calls the new notification services of the bot component:
- telegram_bot/send_message
- telegram_bot/send_photo
- telegram_bot/send_document
- telegram_bot/send_location
- telegram_bot/edit_message
- telegram_bot/edit_caption
- telegram_bot/edit_replymarkup
- telegram_bot/answer_callback_query
- Added descriptions of the new notification services with a services.yaml file.
- CONFIG_SCHEMA instead of PLATFORM_SCHEMA for the `telegram_bot` component, so only one platform is allowed.
- Async component setup.
* telegram_bot and notify.telegram enhancements: change in requirements_all.txt.