* Check if message_text has a value instead of checking if its not None
* Strip message_text to ensure that its actually empty or not
* Add test with multipart payload having empty plain text
Avoid addtional timestamp conversion to set state
Since we already have the timestamp, we can pass it on to the State
object and avoid the additional timestamp conversion which can be as
much as 30% of the state write runtime.
Since datetime objects are limited to microsecond precision, we need
to adjust some tests to account for the additional precision that we
will now be able to get in the database
* Always do thread safety check when writing state
Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.
Previously the check was limited to custom components
because they were the most common source of thread
safety issues.
* Always do thread safety check when writing state
Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.
Previously the check was limited to custom components
because they were the most common source of thread
safety issues.
* async_fire is more common than expected with ccs
* fix mock
* fix hass mocking
* Add support for sending telegram messages to topics
Based on original PR #104059 by [jgresty](https://github.com/jgresty).
Did not manage to merge conflicts, so I remade the changes from scratch, including suggestions from previous PR reviews.
Topics were added to telegram groups in November 2022, and to the
telegram-bot library in version 20.0. They are a purely additive change
that is exposed by a single parameter `message_thread_id`. Not passing
this parameter will not change the behaviour from current.
This same parameter is used to send messages to threads and messages to
topics inside groups.
https://telegram.org/blog/topics-in-groups-collectible-usernames/it?setln=en#topics-in-groupsFixes#81888Fixes#91750
* telegram_bot: add tests for threads feature.
* telegram_bot: fixed tests for threads.
* telegram_bot: fixed wrong line.
* Update test_telegram_bot.py
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Detach name from unique id in incomfort
* Add entity descriptions to incomfort
* Revert "Detach name from unique id in incomfort"
This reverts commit 1744844466.
* yes
* blebox: udpdate version in manifest and add new sensor key mapping
* blebox: add more sensor types
* blebox: use blebox_uniapi==2.4.1
* blebox: use blebox_uniapi==2.4.2
* blebox: update requirements_all.txt
* blebox: revert introduction of illuminance and power meter sensors set
* Detach name from unique id in incomfort
* Add entity descriptions to incomfort
* Revert "Add entity descriptions to incomfort"
This reverts commit 2b6ccd4c3b.