mirror of
https://github.com/home-assistant/core.git
synced 2025-11-06 09:29:27 +00:00
Enable Ruff FLY002 rule (#115112)
Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
This commit is contained in:
@@ -212,15 +212,12 @@ async def test_if_fires_on_state_change(
|
||||
"action": {
|
||||
"service": "test.automation",
|
||||
"data_template": {
|
||||
"some": "turn_on {{ trigger.%s }}"
|
||||
% "}} - {{ trigger.".join(
|
||||
(
|
||||
"platform",
|
||||
"entity_id",
|
||||
"from_state.state",
|
||||
"to_state.state",
|
||||
"for",
|
||||
)
|
||||
"some": (
|
||||
"turn_on {{ trigger.platform }}"
|
||||
" - {{ trigger.entity_id }}"
|
||||
" - {{ trigger.from_state.state }}"
|
||||
" - {{ trigger.to_state.state }}"
|
||||
" - {{ trigger.for }}"
|
||||
)
|
||||
},
|
||||
},
|
||||
@@ -236,15 +233,12 @@ async def test_if_fires_on_state_change(
|
||||
"action": {
|
||||
"service": "test.automation",
|
||||
"data_template": {
|
||||
"some": "turn_off {{ trigger.%s }}"
|
||||
% "}} - {{ trigger.".join(
|
||||
(
|
||||
"platform",
|
||||
"entity_id",
|
||||
"from_state.state",
|
||||
"to_state.state",
|
||||
"for",
|
||||
)
|
||||
"some": (
|
||||
"turn_off {{ trigger.platform }}"
|
||||
" - {{ trigger.entity_id }}"
|
||||
" - {{ trigger.from_state.state }}"
|
||||
" - {{ trigger.to_state.state }}"
|
||||
" - {{ trigger.for }}"
|
||||
)
|
||||
},
|
||||
},
|
||||
@@ -260,15 +254,12 @@ async def test_if_fires_on_state_change(
|
||||
"action": {
|
||||
"service": "test.automation",
|
||||
"data_template": {
|
||||
"some": "turn_on_or_off {{ trigger.%s }}"
|
||||
% "}} - {{ trigger.".join(
|
||||
(
|
||||
"platform",
|
||||
"entity_id",
|
||||
"from_state.state",
|
||||
"to_state.state",
|
||||
"for",
|
||||
)
|
||||
"some": (
|
||||
"turn_on_or_off {{ trigger.platform }}"
|
||||
" - {{ trigger.entity_id }}"
|
||||
" - {{ trigger.from_state.state }}"
|
||||
" - {{ trigger.to_state.state }}"
|
||||
" - {{ trigger.for }}"
|
||||
)
|
||||
},
|
||||
},
|
||||
@@ -332,15 +323,12 @@ async def test_if_fires_on_state_change_legacy(
|
||||
"action": {
|
||||
"service": "test.automation",
|
||||
"data_template": {
|
||||
"some": "turn_off {{ trigger.%s }}"
|
||||
% "}} - {{ trigger.".join(
|
||||
(
|
||||
"platform",
|
||||
"entity_id",
|
||||
"from_state.state",
|
||||
"to_state.state",
|
||||
"for",
|
||||
)
|
||||
"some": (
|
||||
"turn_off {{ trigger.platform }}"
|
||||
" - {{ trigger.entity_id }}"
|
||||
" - {{ trigger.from_state.state }}"
|
||||
" - {{ trigger.to_state.state }}"
|
||||
" - {{ trigger.for }}"
|
||||
)
|
||||
},
|
||||
},
|
||||
@@ -397,15 +385,12 @@ async def test_if_fires_on_state_change_with_for(
|
||||
"action": {
|
||||
"service": "test.automation",
|
||||
"data_template": {
|
||||
"some": "turn_off {{ trigger.%s }}"
|
||||
% "}} - {{ trigger.".join(
|
||||
(
|
||||
"platform",
|
||||
"entity_id",
|
||||
"from_state.state",
|
||||
"to_state.state",
|
||||
"for",
|
||||
)
|
||||
"some": (
|
||||
"turn_off {{ trigger.platform }}"
|
||||
" - {{ trigger.entity_id }}"
|
||||
" - {{ trigger.from_state.state }}"
|
||||
" - {{ trigger.to_state.state }}"
|
||||
" - {{ trigger.for }}"
|
||||
)
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user