* Add breeze switch
* Cleanup code
* Replace switch entity with new fan entity
* Revert "Replace switch entity with new fan entity"
This reverts commit 4fc1ac22e67091a7e980aefd217652f2a88bed17.
* Add toggle service to climate
* Fix mqtt test
* Add comments
* Fix rebase
* Remove not needed properties
* Fix toggle service
* Fix test
* Test
* Mod mqtt test
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Make context in data entry flow possible to modify for subclasses
* mypy
* Make get_context
* base view
* Review comments
* Remove context from options flow
* Add media player play file option
* Add media playback from HA
* Remove volume capability
* Add missing imports
* Apply suggestions from code review
* Update homeassistant/components/dunehd/media_player.py
* Apply suggestions from code review
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix recorder ws_info blocking the event loop
Fixes
```
2024-02-15 06:37:55.423 WARNING (MainThread) [asyncio] Executing <Task pending name=websocket_api.async:ws_info coro=<_handle_async_response() running at /usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py:26> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()] created at /usr/local/lib/python3.12/asyncio/tasks.py:712> cb=[set.remove()] created at /usr/src/homeassistant/homeassistant/core.py:653> took 0.332 seconds
```
* no instance did not actually work
fixes
```
File "/usr/src/homeassistant/homeassistant/components/elkm1/__init__.py", line 416, in _set_time_service
_getelk(service).panel.set_time(dt_util.now())
File "/usr/local/lib/python3.11/site-packages/elkm1_lib/panel.py", line 55, in set_time
self._connection.send(rw_encode(datetime))
File "/usr/local/lib/python3.11/site-packages/elkm1_lib/connection.py", line 152, in send
self._send(QueuedWrite(msg.message, msg.response_command), priority_send)
File "/usr/local/lib/python3.11/site-packages/elkm1_lib/connection.py", line 148, in _send
self._check_write_queue.set()
File "/usr/local/lib/python3.11/asyncio/locks.py", line 192, in set
fut.set_result(True)
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 763, in call_soon
self._check_thread()
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 800, in _check_thread
raise RuntimeError(
RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one
```
- Use async_entity_ids_count instead of async_all
I also tried to make the code wrap a bit less but
I didn't want to refactor it to much in this PR
This one blocks the event loop for just a bit so there
are probably some more parts that could be optimized
`2024-02-15 07:17:30.034 WARNING (MainThread) [asyncio] Executing <Task
pending name='analytics schedule' coro=<Analytics.send_analytics()
running at
/usr/src/homeassistant/homeassistant/components/analytics/analytics.py:220>
wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel()
at /usr/local/lib/python3.12/asyncio/futures.py:387, Task.task_wakeup()]
created at /usr/local/lib/python3.12/asyncio/base_events.py:447>
cb=[set.remove()] created at
/usr/src/homeassistant/homeassistant/core.py:598> took 0.335 seconds`
current_average_demand and maximum_demand_current_month are missing a state class, which gives errors in the statistics tab in HA.
So adding them to the sensor.
* Move late import of config flows in loader to load time
There does not seem to be any reason to import the
generated flows late. Import them at load time
with the rest of the generated files
* tests