You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"Added deployment for sensor with serial number {sensor.serial_no}, deployed to {thing.name}: | Installation Date: {installation_date} | Removal Date: {removal_date}"
101
+
)
102
+
103
+
"""
104
+
Developer's notes
105
+
106
+
Since it's unclear beforehand if a sensor has been removed just update
107
+
the sensor_status based off of each deployments installation/removal
108
+
dates
109
+
"""
110
+
ifinstallation_date:
111
+
sensor.sensor_status="In Service"
112
+
ifremoval_date:
113
+
sensor.sensor_status="Retired"
114
+
session.commit()
115
+
exceptExceptionase:
116
+
logger.critical(f"Could not add sensor and deployment: {e}")
0 commit comments