Complete the code to define a rule that routes temperature data to the cooling system.
rule = {"condition": "data.type == '[1]'", "action": "send_to_cooling()"}The rule checks if the data type is 'temperature' to trigger cooling.
Complete the code to route data with value above 75 to the alert system.
rule = {"condition": "data.value [1] 75", "action": "send_alert()"}The rule triggers an alert when the data value is greater than 75.
Fix the error in the rule condition to correctly check if data.status equals 'active'.
rule = {"condition": "data.status [1] 'active'", "action": "process_active()"}The correct equality operator in conditions is '=='.
Fill both blanks to create a rule that routes data with type 'humidity' and value less than 30 to the dehumidifier.
rule = {"condition": "data.type == '[1]' and data.value [2] 30", "action": "activate_dehumidifier()"}The rule checks if data type is 'humidity' and value is less than 30 to activate the dehumidifier.
Fill all three blanks to define a rule that routes data with type 'pressure', value greater than 100, and status 'critical' to the emergency system.
rule = {"condition": "data.type == '[1]' and data.value [2] 100 and data.status == '[3]'", "action": "trigger_emergency()"}The rule activates emergency when data type is 'pressure', value is greater than 100, and status is 'critical'.