Before scheduling turn_on do a last-minute check if lights are off (#671)

* Before scheduling turn_on do a last-minute check if lights are off

* Pass force

* add comment

* fix for proactive

* commetn

* No default for force

* rm newline

* no force

* Return bool
This commit is contained in:
Bas Nijholt 2023-08-02 23:11:45 -07:00 • committed by GitHub
commit e0e04da0f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 1 deletions

View file

@ -312,6 +312,7 @@ async def test_prepare_adaptation_data(
service_data,
split,
filter_by_state,
force=False,
)
generated_service_datas = [item async for item in data.service_call_datas]

View file

@ -1342,6 +1342,7 @@ async def test_cancellable_service_calls_task(hass):
context,
0,
_create_service_call_data_iterator(hass, [service_data], False),
force=False,
max_length=1,
which="both",
)