How to specify multiple if entities in json

in my motion trigger, i have the following under if,

$entities("input_boolean.master_bedroom_automation").state = "on" 

This says if there is motion and the boolean is set to on.

I want to add

and the time of day boolean is = day or evening (it can also be is not equal to night)

How to i modify the json statement to stay the automation boolean is on and the time of day boolean is day or evening?

I haven’t used JSONata within HA, but there are some good examples here, including and/or conditions (example #3).

anyone else how to format the json code to account for two variables? I want to say master bedroom automation = on and time of day boolean is = day or evening (it can also be is not equal to night)

I usually use function nodes or switch nodes to do that.

What have you tried? I would have thought the following would work:

    ($entities("input_boolean.master_bedroom_automation").state = "on") and
    (
        ($entities("your_time_of_day").state = "day") or ($entities("your_time_of_day").state = "evening")
    )

Having said that, your say the time of day is a boolean, which only allows for true/false, not day/evening/night.

In one of my J fields I have this to evaluate two attributes of the msg, but they’re both strings. Not sure if you need to do something else to test against a boolean and a string in the same statement.

payload.entity_suffix = “coffee_maker” and payload.event.new_state.state = “off”