Do async_setup_platform in background (#36244)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Paulus SchoutsenandJ. Nick Koston authored and GitHub committed 2020-05-31 22:18:30 -07:00
1 parent d488c779fc
commit 276f3afb00
161 files changed
+1184 -305

No files matched your search

@@ -35,6 +35,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "1")
self.hass.block_till_done()
@@ -62,6 +63,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
now = dt_util.utcnow()
for val in [10, 0, 20, 30]:
@@ -103,6 +105,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
now = dt_util.utcnow()
for val in [30, 20, 30, 10]:
@@ -137,6 +140,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "2")
self.hass.block_till_done()
@@ -162,6 +166,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "1")
self.hass.block_till_done()
@@ -187,6 +192,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "2")
self.hass.block_till_done()
@@ -212,6 +218,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "State", {"attr": "1"})
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "State", {"attr": "2"})
@@ -236,6 +243,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "State", {"attr": "2"})
self.hass.block_till_done()
@@ -262,6 +270,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
for val in [0, 1, 2, 3, 2, 1]:
self.hass.states.set("sensor.test_state", val)
@@ -285,6 +294,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "Non")
self.hass.block_till_done()
@@ -310,6 +320,7 @@ class TestTrendBinarySensor:
}
},
)
self.hass.block_till_done()
self.hass.states.set("sensor.test_state", "State", {"attr": "2"})
self.hass.block_till_done()