Use state attribute enums in Modbus (#175946)