Just starting to appreciate recurrence relations
Let $T_n = $ number of length-n ternary sequences with an even number of ones and an even number of zeroes.
$T_0 = 1$, because $0$ is an even number, and there are zero $1$s and zero $0$s.
$T_1 = 1$, because the sequence $\{2\}$ has zero $1$s and zero $0$s
How to find $T_n$?
Possibility: split into cases.
Case 1: We have an $n$ digit sequence with an even number of $0$s and an even number of $1$s.
To get to length $n$, we have all of the length $n-1$ sequences with an even number of $0$s and $1$s, which is $T_{n-1}$
Case 2: We have an $n$ digit sequence with an odd number of $0$s and an odd number of $1$s.
Here, we basically need the total amount of length-$n$ sequences with an odd number of $0$s and an odd number of $1$. This should be $3^n - T_{n-1}$.
Case 3: We have an even number of 0s, but an odd number of 1s.
Case 4: We have an odd number of 0s, but an even number of 1s.
How to account for cases 3 and 4?
Consider all the strings with an even number of total ones and zeros. Let there be $k$ total one's and zeros. Then $k$ is even. Fix $k$, let’s count the number of trenary strings. First, there are ${ n \choose k}$ positions for the 1’s and 0’s, and then there are 2 choices for the value in each of these positions. The rest of the positions must be 2. Hence, there are $\sum_{ k \text{ even } } {n \choose k} 2^k $ of them.
Of these, pair them up according to those that differ only in the first non 2 digit. In this pair, clearly one of them has an even number of ones and an even number of 2's. Note that the only string not paired is the string of all 2's.
Hence, the total number of strings with an even number of 1 and even number of 0 is
$$.5 \times (-1+\sum_{ k even } {n \choose k} 2^k) +1 $$
This matches Pedro's answer.