Summing queries with condition

I am using Grafana cloud and Prometheus data source (Http requests using Python to send the data).

I am trying to get a float metric when another metric is a certain value. In this case it is motor power for particular run type(int value). This works fine as long as I query a single motor like this:
((m1_run_type{} == 1) * m1_pwr{})
But what I want to do is get the total system power(2 motors) for this run type:
((m1_run_type{} == 1) * m1_pwr{}) + ((m2_run_type{} == 1) * m2_pwr{})
This work when both run types are 1, but if either is 0 the total value is also zero.

I tried creating to separate queries like this:
((m1_run_type{} == 1) * m1_pwr{})
((m2_run_type{} == 1) * m2_pwr{})
And then doing a math expression:
$B+$C

I also tried adding “or vector (0)”:
(((rigens_jb1_run_type{} == 1) * rigens_jb_1_pwr{}) or on () vector (0)) + (((rigens_jb2_run_type{} == 1) * rigens_jb_2_pwr{}) or on () vector (0))

But neither of these get the desired result.

In picture below:

  1. Sum correct when for both motors run type is 1.
  2. If only one motor run type is 1, sum is zero