Unpack modbus sensor into boolean states

Hi,

I have a modbus sensor which returns a word of which individual bits indicate separate states. How can I “unpack” this word into different boolean values? I figure it has to be done using templates but have no idea where to start. Can anyone help me get started?

Thomas

You should probably use the bitwise_and filter. See Home Assistant template extensions. E.g.: