Yes, there are several ways.
One basic option is to just add the “not_moist” version of your current trigger and to use trigger IDs to conditionally branch actions in an If/Then or Choose action.
Example Automation Configuration
alias: Leak Detected
description: ""
triggers:
- id: moist
type: moist
device_id: 83ea2ce28774b28da892d6ba6db168f8
entity_id: 80de19b099e6dc7ca4b64f332050672e
domain: binary_sensor
metadata:
secondary: false
trigger: device
- id: dry
type: not_moist
device_id: 83ea2ce28774b28da892d6ba6db168f8
entity_id: 80de19b099e6dc7ca4b64f332050672e
domain: binary_sensor
metadata:
secondary: false
trigger: device
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: moist
sequence:
- action: notify.mobile_app_bob_s_phone
metadata: {}
data:
message: Leak detected in upstairs bathroom
title: Water Leak
- action: email_notifier.send
data:
account: notify.email_notification_sender_1
recipients: email address
title: Leak Detected
message: Leak detected in upstairs bathroom!
- conditions:
- condition: trigger
id: dry
sequence:
- action: notify.mobile_app_bob_s_phone
metadata: {}
data:
message: Dryness detected in upstairs bathroom
title: Leak Sensor Dried Out
- action: email_notifier.send
data:
account: notify.email_notification_sender_1
recipients: email address
title: Leak Sensor Dried Out
message: Dryness detected in upstairs bathroom!
mode: single
But, there are many other ways to do the same thing using other types of triggers and templating to make a more concise automation.