Transformer get_d_state formula to SaltStack module
Something like
ps.d_state
.