verbose at emerg

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2022-06-12 19:56:00 +03:00
parent b704aee0fc
commit 2c3206fc06
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -403,6 +403,7 @@ def polling_method_for_room_monitor(request: schemas.MonitorUpdateReadings,
if request.temperature >= EMERG_TEMP or request.smoke_sensor_reading >= EMERG_SMOKE: if request.temperature >= EMERG_TEMP or request.smoke_sensor_reading >= EMERG_SMOKE:
print("********EMERGENCY AT %s********" % device.description) print("********EMERGENCY AT %s********" % device.description)
door : models.IotEntity = device.door door : models.IotEntity = device.door
print("********OPENING DOOR %s ID:%d********" % (door.description, door.id))
crud.set_open_door_request(db, door.id, T_HOUR_SEC) crud.set_open_door_request(db, door.id, T_HOUR_SEC)
crud.record_emergancy_entry(db, request, device.id) crud.record_emergancy_entry(db, request, device.id)
# Call into a hook to notify with room and people # Call into a hook to notify with room and people