Switch tests to use hass objects instead of direct (#37530)
* Switch tests to use hass objects instead of direct * Make sure sensor update state * Add some initial binary sensor tests * Add initial binary sensor tests * Add tests for pt2262 * Add test for off delay
This commit is contained in:
1 parent
3ad59f877c
commit
01fd33f173
11 files changed
+640
-548
No files matched your search
@@ -92,6 +92,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
continue
|
||||
sensor = sensors[data_type]
|
||||
sensor.event = event
|
||||
if sensor.hass:
|
||||
sensor.schedule_update_ha_state()
|
||||
# Fire event
|
||||
if sensor.should_fire_event:
|
||||
sensor.hass.bus.fire(
|
||||
|
||||
Reference in new issue
Block a user