* Entities from the same config entry should have the same device identifier
* Clean up unused device entries with no entities after sensor setup
Co-authored-by: James Pan <32176676+jzpan1@users.noreply.github.com>
Co-authored-by: Theo Ma <62950302+t1an-xyz@users.noreply.github.com>
Co-authored-by: Jonathan McDevitt <69861492+Jonmcd1@users.noreply.github.com>
Co-authored-by: Jadon Yack <86989502+jadonyack@users.noreply.github.com>
Co-authored-by: Ashton Foley <121987068+foleyash@users.noreply.github.com>
Co-authored-by: Leon Yan <138124222+leony7@users.noreply.github.com>
The contextmanager decorator creates a new context manager every
time its run, but since we only have a single context var, we can
use the same one every time. Creating the contextmanager was roughly
20% of the time time of the template render
I was a bit suprised to find it creates a new context manager
object every time https://stackoverflow.com/questions/34872535/why-contextmanager-is-slow
* Prevent accidentally reusing an entity object
* Fix group reload service
* Revert "Fix group reload service"
* Improve test
* Add tests aserting entity can't be reused
Avoid constructing an inner function each time we call async_listen
and use a partial which holds a reference to the function body with new
args instead of making another full function
* Bump py_nextbusnext to v1.0.1 to fix TypeError
Currently throwing an error as a set is passed into the method that is currently
expecting a Sequence. That method is technically compatible with Iterable, so the
latest patch relaxes that restriction.
* Bump version to v1.0.2 to fix error message
* Initial caldav config flow with broken calendar platform
* Set up calendar entities
* Remove separate caldav entity
* Update tests after merge
* Readbility improvements
* Address lint issues
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add checking for duplicate configuration entries
* Use verify SSL as input into caldav and simplify test setup
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add supports_response to platform entity services
* support multiple entities in entity_service_call
* support legacy response format for service calls
* revert changes to script/shell_command
* add back test for multiple responses for legacy service
* remove SupportsResponse.ONLY_LEGACY
* Apply suggestion
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* test for entity_id remove None
* revert Apply suggestion
* return EntityServiceResponse from _handle_entity_call
* Use asyncio.gather
* EntityServiceResponse not Optional
* styling
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>